5 /* Highest address of the user mode stack */
6 _estack = ORIGIN(STACKRAM) + LENGTH(STACKRAM); /* end of RAM */
8 /* Base address where the quad spi. */
9 __octospi1_start = ORIGIN(OCTOSPI1);
10 __octospi2_start = ORIGIN(OCTOSPI2);
12 /* Generate a link error if heap and stack don't fit into RAM */
13 _Min_Heap_Size = 0; /* required amount of heap */
14 _Min_Stack_Size = 0x800; /* required amount of stack */
16 /* Define output sections */
19 _isr_vector_table_flash_base = LOADADDR(.isr_vector);
20 PROVIDE (isr_vector_table_flash_base = _isr_vector_table_flash_base);
25 PROVIDE (isr_vector_table_base = .);
26 KEEP(*(.isr_vector)) /* Startup code */
28 PROVIDE (isr_vector_table_end = .);
31 _ram_isr_vector_table_base = LOADADDR(.ram_isr_vector);
32 PROVIDE (ram_isr_vector_table_base = _ram_isr_vector_table_base);
34 .ram_isr_vector (NOLOAD) :
36 . = ALIGN(512); /* Vector table offset must be multiple of 0x200 */
37 PROVIDE (ram_isr_vector_table_base = .);
38 . += (isr_vector_table_end - isr_vector_table_base);
40 PROVIDE (ram_isr_vector_table_end = .);
43 /* The program code and other data goes into MAIN */
47 *(.text) /* .text sections (code) */
48 *(.text*) /* .text* sections (code) */
49 *(.rodata) /* .rodata sections (constants, strings, etc.) */
50 *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
51 *(.glue_7) /* glue arm to thumb code */
52 *(.glue_7t) /* glue thumb to arm code */
59 _etext = .; /* define a global symbols at end of code */
62 /* Critical program code goes into ITCM RAM */
63 /* Copy specific fast-executing code to ITCM RAM */
64 tcm_code = LOADADDR(.tcm_code);
77 *(.ARM.extab* .gnu.linkonce.armextab.*)
83 *(.ARM.exidx*) __exidx_end = .;
88 PROVIDE_HIDDEN (__pg_registry_start = .);
89 KEEP (*(.pg_registry))
90 KEEP (*(SORT(.pg_registry.*)))
91 PROVIDE_HIDDEN (__pg_registry_end = .);
96 PROVIDE_HIDDEN (__pg_resetdata_start = .);
97 KEEP (*(.pg_resetdata))
98 PROVIDE_HIDDEN (__pg_resetdata_end = .);
101 /* Storage for the address for the configuration section so we can grab it out of the hex file */
105 KEEP (*(.custom_defaults_start_address))
107 KEEP (*(.custom_defaults_end_address))
109 __custom_defaults_internal_start = .;
113 PROVIDE_HIDDEN (__custom_defaults_start = __custom_defaults_internal_start);
114 PROVIDE_HIDDEN (__custom_defaults_end = ORIGIN(CUSTOM_DEFAULTS) + LENGTH(CUSTOM_DEFAULTS));
116 /* used by the startup to initialize data */
117 _sidata = LOADADDR(.data);
119 /* Initialized data sections goes into RAM, load LMA copy after code */
123 _sdata = .; /* create a global symbol at data start */
124 *(.data) /* .data sections */
125 *(.data*) /* .data* sections */
128 _edata = .; /* define a global symbol at data end */
131 /* Non-critical program code goes into RAM */
132 /* Copy specific slow-executing code to RAM */
133 ram_code = LOADADDR(.ram_code);
144 /* Uninitialized data section */
148 /* This is used by the startup in order to initialize the .bss secion */
149 _sbss = .; /* define a global symbol at bss start */
150 __bss_start__ = _sbss;
152 *(SORT_BY_ALIGNMENT(.bss*))
156 _ebss = .; /* define a global symbol at bss end */
160 /* Uninitialized data section */
164 /* This is used by the startup in order to initialize the .sram2 secion */
165 _ssram2 = .; /* define a global symbol at sram2 start */
166 __sram2_start__ = _ssram2;
168 *(SORT_BY_ALIGNMENT(.sram2*))
171 _esram2 = .; /* define a global symbol at sram2 end */
172 __sram2_end__ = _esram2;
175 /* used during startup to initialized fastram_data */
176 _sfastram_idata = LOADADDR(.fastram_data);
178 /* Initialized FAST_DATA section for unsuspecting developers */
182 _sfastram_data = .; /* create a global symbol at data start */
183 *(.fastram_data) /* .data sections */
184 *(.fastram_data*) /* .data* sections */
187 _efastram_data = .; /* define a global symbol at data end */
191 .fastram_bss (NOLOAD) :
194 __fastram_bss_start__ = _sfastram_bss;
196 *(SORT_BY_ALIGNMENT(.fastram_bss*))
200 __fastram_bss_end__ = _efastram_bss;