5 /* Highest address of the user mode stack */
6 _estack = ORIGIN(RAM_DATA) + LENGTH(RAM_DATA) - 0x80;
7 /* Reserve some RAM to exchange data for bootloader */
8 _bootloader_data = ORIGIN(RAM_DATA) + LENGTH(RAM_DATA) - 0x7C;
9 /* Generate a link error if heap and stack don't fit into RAM */
10 _Min_Heap_Size = 0x200; /* required amount of heap */
11 _Min_Stack_Size = 0x1000; /* required amount of stack */
12 _Min_BL_Size = 0x80; /* required amount of bootloader data */
14 /* Define output sections */
17 /* Critical program code goes into RAM_CODE */
18 ram_code = LOADADDR(.ram_code);
21 /* Vectors must be 512 bytes (128 words) aligned */
24 /* NOTE: Keep vectors first! */
32 /* Link vector code here to avoid bootloader update with the
33 * latest (14.x or newer) platfroms */
44 /* The program code and other data goes into FLASH */
48 *(.text) /* .text sections (code) */
49 *(.text*) /* .text* sections (code) */
50 *(.glue_7) /* glue arm to thumb code */
51 *(.glue_7t) /* glue thumb to arm code */
58 _etext = .; /* define a global symbols at end of code */
61 /* Constant data goes into FLASH */
65 *(.rodata) /* .rodata sections (constants, strings, etc.) */
66 *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
70 .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH
79 PROVIDE_HIDDEN (__preinit_array_start = .);
80 KEEP (*(.preinit_array*))
81 PROVIDE_HIDDEN (__preinit_array_end = .);
85 PROVIDE_HIDDEN (__init_array_start = .);
86 KEEP (*(SORT(.init_array.*)))
87 KEEP (*(.init_array*))
88 PROVIDE_HIDDEN (__init_array_end = .);
92 PROVIDE_HIDDEN (__fini_array_start = .);
93 KEEP (*(SORT(.fini_array.*)))
94 KEEP (*(.fini_array*))
95 PROVIDE_HIDDEN (__fini_array_end = .);
98 /* used by the startup to initialize data */
99 _sidata = LOADADDR(.data);
101 /* Initialized data sections goes into RAM, load LMA copy after code */
105 _sdata = .; /* create a global symbol at data start */
106 *(.data) /* .data sections */
107 *(.data*) /* .data* sections */
110 _edata = .; /* define a global symbol at data end */
111 } >RAM_DATA AT> FLASH
113 _siccmram = LOADADDR(.ccmram);
118 * If initialized variables will be placed in this section,
119 * the startup code needs to be modified to copy the init-values.
124 _sccmram = .; /* create a global symbol at ccmram start */
129 _eccmram = .; /* create a global symbol at ccmram end */
132 /* Uninitialized data section */
136 /* This is used by the startup in order to initialize the .bss secion */
137 _sbss = .; /* define a global symbol at bss start */
138 __bss_start__ = _sbss;
144 _ebss = .; /* define a global symbol at bss end */
148 /* User_heap_stack section, used to check that there is enough RAM left */
149 ._user_heap_stack (NOLOAD) :
153 PROVIDE ( _end = . );
154 . = . + _Min_Heap_Size;
155 . = . + _Min_Stack_Size;
156 . = . + _Min_BL_Size;
160 /* Remove information from the standard libraries */
168 .ARM.attributes 0 : { *(.ARM.attributes) }