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 /* Uninitialized data section */
120 /* This is used by the startup in order to initialize the .bss secion */
121 _sbss = .; /* define a global symbol at bss start */
122 __bss_start__ = _sbss;
124 *(SORT_BY_ALIGNMENT(.bss*))
128 _ebss = .; /* define a global symbol at bss end */
132 /* Uninitialized data section */
136 /* This is used by the startup in order to initialize the .sram2 secion */
137 _ssram2 = .; /* define a global symbol at sram2 start */
138 __sram2_start__ = _ssram2;
140 *(SORT_BY_ALIGNMENT(.sram2*))
143 _esram2 = .; /* define a global symbol at sram2 end */
144 __sram2_end__ = _esram2;
147 /* used during startup to initialized fastram_data */
148 _sfastram_idata = LOADADDR(.fastram_data);
150 /* Initialized FAST_DATA section for unsuspecting developers */
154 _sfastram_data = .; /* create a global symbol at data start */
155 *(.fastram_data) /* .data sections */
156 *(.fastram_data*) /* .data* sections */
159 _efastram_data = .; /* define a global symbol at data end */
163 .fastram_bss (NOLOAD) :
166 __fastram_bss_start__ = _sfastram_bss;
168 *(SORT_BY_ALIGNMENT(.fastram_bss*))
172 __fastram_bss_end__ = _efastram_bss;