77 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
		
		
			
		
	
	
			77 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
|  | OUTPUT_ARCH(arm) | ||
|  | ENTRY(Reset_Handler) | ||
|  | 
 | ||
|  | MEMORY | ||
|  | { | ||
|  | 	FLASH(rx): ORIGIN = 0x00000000, LENGTH = 64K | ||
|  | 	RAM(xrw) : ORIGIN = 0x10000000, LENGTH = 64K | ||
|  | } | ||
|  | 
 | ||
|  | SECTIONS | ||
|  | { | ||
|  | 	. = ALIGN(4); | ||
|  | 	__stext = .; | ||
|  | 	.text : | ||
|  | 	{ | ||
|  | 		KEEP(*(.isr_vector)) | ||
|  | 		*(.text) | ||
|  | 	} > FLASH | ||
|  | 	 | ||
|  | 	. = ALIGN(4); | ||
|  | 	__etext = .; | ||
|  | 	.data : AT (__etext) | ||
|  | 	{ | ||
|  | 		__data_start__ = .; | ||
|  | 		*(vtable) | ||
|  | 		*(.data*) | ||
|  | 		. = ALIGN(4); | ||
|  | 
 | ||
|  | 		PROVIDE (__preinit_array_start = .); | ||
|  | 		*(.preinit_array) | ||
|  | 		PROVIDE (__preinit_array_end = .); | ||
|  | 
 | ||
|  | 		. = ALIGN(4); | ||
|  | 		PROVIDE (__init_array_start = .); | ||
|  | 		*(SORT(.init_array.*)) | ||
|  | 		*(.init_array) | ||
|  | 		PROVIDE (__init_array_end = .); | ||
|  | 
 | ||
|  | 		. = ALIGN(4); | ||
|  | 		PROVIDE (__fini_array_start = .); | ||
|  | 		*(SORT(.fini_array.*)) | ||
|  | 		*(.fini_array) | ||
|  | 		PROVIDE (__fini_array_end = .); | ||
|  | 
 | ||
|  | 		. = ALIGN(4); | ||
|  | 		__data_end__ = .; | ||
|  | 	} > RAM | ||
|  | 	 | ||
|  | 	. = ALIGN(4); | ||
|  | 	.bss : | ||
|  | 	{ | ||
|  | 		__bss_start__ = .; | ||
|  | 		*(.bss) | ||
|  | 		__bss_end__ = .; | ||
|  | 	} > RAM | ||
|  | 	 | ||
|  | 	. = ALIGN(4); | ||
|  | 	.heap : | ||
|  | 	{		 | ||
|  | 		__end__ = .; | ||
|  | 		end = __end__; | ||
|  | 		*(.heap*) | ||
|  | 		__HeapLimit = .; | ||
|  | 	} > RAM | ||
|  | 	 | ||
|  | 	.stack_dummy : | ||
|  | 	{ | ||
|  | 		*(.stack) | ||
|  | 	} > RAM | ||
|  | 	 | ||
|  | 	__StackTop = ORIGIN(RAM) + LENGTH(RAM); | ||
|  | 	__StackLimit = __StackTop - SIZEOF(.stack_dummy); | ||
|  | 	PROVIDE(__stack = __StackTop); | ||
|  | 	 | ||
|  | 	ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") | ||
|  | } |