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 /* used by the startup to initialize data */
102 _sidata = LOADADDR(.data);
104 /* Initialized data sections goes into RAM, load LMA copy after code */
108 _sdata = .; /* create a global symbol at data start */
109 *(.data) /* .data sections */
110 *(.data*) /* .data* sections */
113 _edata = .; /* define a global symbol at data end */
116 /* Non-critical program code goes into RAM */
117 /* Copy specific slow-executing code to RAM */
118 ram_code = LOADADDR(.ram_code);
129 /* Uninitialized data section */
133 /* This is used by the startup in order to initialize the .bss secion */
134 _sbss = .; /* define a global symbol at bss start */
135 __bss_start__ = _sbss;
137 *(SORT_BY_ALIGNMENT(.bss*))
141 _ebss = .; /* define a global symbol at bss end */
145 /* Uninitialized data section */
149 /* This is used by the startup in order to initialize the .sram2 secion */
150 _ssram2 = .; /* define a global symbol at sram2 start */
151 __sram2_start__ = _ssram2;
153 *(SORT_BY_ALIGNMENT(.sram2*))
156 _esram2 = .; /* define a global symbol at sram2 end */
157 __sram2_end__ = _esram2;
160 /* used during startup to initialized fastram_data */
161 _sfastram_idata = LOADADDR(.fastram_data);
163 /* Initialized FAST_DATA section for unsuspecting developers */
167 _sfastram_data = .; /* create a global symbol at data start */
168 *(.fastram_data) /* .data sections */
169 *(.fastram_data*) /* .data* sections */
172 _efastram_data = .; /* define a global symbol at data end */
176 .fastram_bss (NOLOAD) :
179 __fastram_bss_start__ = _sfastram_bss;
181 *(SORT_BY_ALIGNMENT(.fastram_bss*))
185 __fastram_bss_end__ = _efastram_bss;