1 /* Generated Linker Script file */
\r
3 * Template Version 1.0 dated 11 Oct 2012
\r
6 OUTPUT_FORMAT("elf32-littlearm")
\r
8 ENTRY(__Xmc4500_reset_cortex_m)
\r
9 GROUP(-lxmclibcstubs)
\r
13 FLASH_1_cached(RX) : ORIGIN = 0x08000000, LENGTH = 0x100000
\r
14 FLASH_1_uncached(RX) : ORIGIN = 0x0C000000, LENGTH = 0x100000
\r
15 PSRAM_1(!RX) : ORIGIN = 0x10000000, LENGTH = 0x10000
\r
16 DSRAM_1_system(!RX) : ORIGIN = 0x20000000, LENGTH = 0x10000
\r
17 DSRAM_2_comm(!RX) : ORIGIN = 0x30000000, LENGTH = 0x8000
\r
26 .text : AT(ORIGIN(FLASH_1_uncached))
\r
30 *(.Xmc4500.postreset);
\r
32 *(.text .text.* .gnu.linkonce.t.*);
\r
34 /* ARM <->THUMB interworking */
\r
41 __preinit_array_start = .;
\r
42 KEEP (*(.preinit_array))
\r
43 __preinit_array_end = .;
\r
44 __init_array_start = .;
\r
45 KEEP (*(SORT(.init_array.*)))
\r
46 KEEP (*(.init_array))
\r
47 __init_array_end = .;
\r
48 KEEP (*crtbegin.o(.ctors))
\r
49 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
\r
50 KEEP (*(SORT(.ctors.*)))
\r
51 KEEP (*crtend.o(.ctors))
\r
53 __fini_array_start = .;
\r
54 KEEP (*(.fini_array))
\r
55 KEEP (*(SORT(.fini_array.*)))
\r
56 __fini_array_end = .;
\r
58 KEEP (*crtbegin.o(.dtors))
\r
59 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
\r
60 KEEP (*(SORT(.dtors.*)))
\r
61 KEEP (*crtend.o(.dtors))
\r
63 /* Exception handling support */
\r
65 *(.ARM.extab* .gnu.linkonce.armextab.*)
\r
67 __extab_end = ABSOLUTE(.);
\r
70 /* Exception handling, exidx needs a dedicated section */
\r
71 .ARM.exidx ABSOLUTE(__extab_end): AT(__extab_end | 0x04000000)
\r
74 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
\r
76 __exidx_end = ABSOLUTE(.);
\r
79 /* CONST data section */
\r
80 .rodata ABSOLUTE(__exidx_end): AT(__exidx_end | 0x04000000)
\r
82 *(.rodata .rodata.*)
\r
88 /* End of RO-DATA and start of LOAD region for DATA */
\r
89 eROData = . | 0x04000000;
\r
91 /* DSRAM layout (Lowest to highest)*/
\r
92 /* Fully Descending Stack <-> BSS <-> DATA <-> HEAP */
\r
93 /* Dummy section for stack */
\r
97 __Xmc4500_stack = .;
\r
100 Communication_Buffers :
\r
102 *DMA_Descriptors.o (COMMON);
\r
108 __Xmc4500_sBSS = .;
\r
111 * (EXCLUDE_FILE(*DMA_Descriptors.o) COMMON);
\r
112 *(.gnu.linkonce.b*)
\r
113 __Xmc4500_eBSS = ALIGN(4);
\r
115 /* Yes, the size must be kept outside */
\r
116 __Xmc4500_BSS_Size = __Xmc4500_eBSS - __Xmc4500_sBSS;
\r
118 /* Standard DATA and user defined DATA/BSS/CONST sections */
\r
119 .data ABSOLUTE(ALIGN(16)): AT(eROData)
\r
121 __Xmc4500_sData = .;
\r
125 *(.gnu.linkonce.d*)
\r
126 __Xmc4500_eData = ALIGN(4);
\r
128 /* Yes, the size must be kept outside */
\r
129 __Xmc4500_Data_Size = __Xmc4500_eData - __Xmc4500_sData;
\r
132 __Xmc4500_heap_start = ALIGN(8);
\r
133 __Xmc4500_heap_end = ORIGIN(DSRAM_1_system) + LENGTH (DSRAM_1_system);
\r
134 Heap_Bank1_Start = __Xmc4500_heap_start;
\r
135 Heap_Bank1_Size = __Xmc4500_heap_end - __Xmc4500_heap_start;
\r
136 Heap_Bank1_End = ABSOLUTE(__Xmc4500_heap_end);
\r
141 /* To host DATA in DSRAM2 above heap, please be sure to augment
\r
142 * program loader code in the startup file */
\r
143 Heap_Bank2_Start = .;
\r
145 Heap_Bank2_Size = LENGTH(DSRAM_2_comm) - (Heap_Bank2_Start - ORIGIN(DSRAM_2_comm));
\r
150 /* To host DATA in PSRAM above heap, please be sure to augment
\r
151 * program loader code in the startup file */
\r
152 Heap_Bank3_Start = .;
\r
154 Heap_Bank3_Size = LENGTH(PSRAM_1) - (Heap_Bank3_Start - ORIGIN(PSRAM_1));
\r
161 .stab 0 (NOLOAD) : { *(.stab) }
\r
162 .stabstr 0 (NOLOAD) : { *(.stabstr) }
\r
165 .debug 0 : { *(.debug) }
\r
166 .line 0 : { *(.line) }
\r
168 /* GNU DWARF 1 extensions */
\r
169 .debug_srcinfo 0 : { *(.debug_srcinfo) }
\r
170 .debug_sfnames 0 : { *(.debug_sfnames) }
\r
172 /* DWARF 1.1 and DWARF 2 */
\r
173 .debug_aranges 0 : { *(.debug_aranges) }
\r
174 .debug_pubnames 0 : { *(.debug_pubnames) }
\r
175 .debug_pubtypes 0 : { *(.debug_pubtypes) }
\r
178 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
\r
179 .debug_abbrev 0 : { *(.debug_abbrev) }
\r
180 .debug_line 0 : { *(.debug_line) }
\r
181 .debug_frame 0 : { *(.debug_frame) }
\r
182 .debug_str 0 : { *(.debug_str) }
\r
183 .debug_loc 0 : { *(.debug_loc) }
\r
184 .debug_macinfo 0 : { *(.debug_macinfo) }
\r
187 .debug_ranges 0 : { *(.debug_ranges) }
\r
189 /* SGI/MIPS DWARF 2 extensions */
\r
190 .debug_weaknames 0 : { *(.debug_weaknames) }
\r
191 .debug_funcnames 0 : { *(.debug_funcnames) }
\r
192 .debug_typenames 0 : { *(.debug_typenames) }
\r
193 .debug_varnames 0 : { *(.debug_varnames) }
\r
195 /* Build attributes */
\r
196 .build_attributes 0 : { *(.ARM.attributes) }
\r