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 /* The startup code goes first into FLASH */
21 KEEP(*(.isr_vector)) /* Startup code */
25 /* The program code and other data goes into FLASH */
29 *(.text) /* .text sections (code) */
30 *(.text*) /* .text* sections (code) */
31 *(.glue_7) /* glue arm to thumb code */
32 *(.glue_7t) /* glue thumb to arm code */
39 _etext = .; /* define a global symbols at end of code */
42 /* Constant data goes into FLASH */
46 *(.rodata) /* .rodata sections (constants, strings, etc.) */
47 *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
51 .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH
60 PROVIDE_HIDDEN (__preinit_array_start = .);
61 KEEP (*(.preinit_array*))
62 PROVIDE_HIDDEN (__preinit_array_end = .);
66 PROVIDE_HIDDEN (__init_array_start = .);
67 KEEP (*(SORT(.init_array.*)))
68 KEEP (*(.init_array*))
69 PROVIDE_HIDDEN (__init_array_end = .);
73 PROVIDE_HIDDEN (__fini_array_start = .);
74 KEEP (*(SORT(.fini_array.*)))
75 KEEP (*(.fini_array*))
76 PROVIDE_HIDDEN (__fini_array_end = .);
79 /* Critical program code goes into RAM_CODE */
80 ram_code = LOADADDR(.ram_code);
91 /* used by the startup to initialize data */
92 _sidata = LOADADDR(.data);
94 /* Initialized data sections goes into RAM, load LMA copy after code */
98 _sdata = .; /* create a global symbol at data start */
99 *(.data) /* .data sections */
100 *(.data*) /* .data* sections */
103 _edata = .; /* define a global symbol at data end */
104 } >RAM_DATA AT> FLASH
106 _siccmram = LOADADDR(.ccmram);
111 * If initialized variables will be placed in this section,
112 * the startup code needs to be modified to copy the init-values.
117 _sccmram = .; /* create a global symbol at ccmram start */
122 _eccmram = .; /* create a global symbol at ccmram end */
125 /* Uninitialized data section */
129 /* This is used by the startup in order to initialize the .bss secion */
130 _sbss = .; /* define a global symbol at bss start */
131 __bss_start__ = _sbss;
137 _ebss = .; /* define a global symbol at bss end */
141 /* User_heap_stack section, used to check that there is enough RAM left */
142 ._user_heap_stack (NOLOAD) :
146 PROVIDE ( _end = . );
147 . = . + _Min_Heap_Size;
148 . = . + _Min_Stack_Size;
149 . = . + _Min_BL_Size;
153 /* Remove information from the standard libraries */
161 .ARM.attributes 0 : { *(.ARM.attributes) }