]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_GCC_Dave/LinkerScripts/RTOSDemo_XMC4400.ld
Add XMC4200 and XMC4400 build configurations to the XMC4000 Dave project.
[freertos] / FreeRTOS / Demo / CORTEX_M4F_Infineon_XMC4000_GCC_Dave / LinkerScripts / RTOSDemo_XMC4400.ld
1 /* Generated Linker Script file */\r
2 /*\r
3  * Template Version 1.2 dated 19 Nov 2012\r
4  */\r
5 \r
6 OUTPUT_FORMAT("elf32-littlearm")\r
7 OUTPUT_ARCH(arm)\r
8 ENTRY(__Xmc4400_reset_cortex_m)\r
9 GROUP(-lxmclibcstubs)\r
10 \r
11 MEMORY\r
12 {\r
13         FLASH_1_cached(RX) : ORIGIN = 0x08000000, LENGTH = 0x80000\r
14         FLASH_1_uncached(RX) : ORIGIN = 0x0C000000, LENGTH = 0x80000\r
15         PSRAM_1(!RX) : ORIGIN = 0x1FFFC000, LENGTH = 0x4000\r
16         DSRAM_1_system(!RX) : ORIGIN = 0x20000000, LENGTH = 0x8000\r
17         DSRAM_2_comm(!RX) : ORIGIN = 0x20008000, LENGTH = 0x8000\r
18         SRAM_combined(!RX) : ORIGIN = 0x1FFFC000, LENGTH = 0x14000\r
19 }\r
20 \r
21 stack_size = 2048;\r
22 \r
23 SECTIONS\r
24 {\r
25         /* TEXT section */\r
26 \r
27         .text : AT(ORIGIN(FLASH_1_uncached))\r
28         {\r
29                 sText = .;\r
30                 *(.Xmc4400.reset);\r
31                 *(.Xmc4400.postreset);\r
32                 *(.XmcStartup);\r
33                 *(.text .text.* .gnu.linkonce.t.*);\r
34 \r
35                 /* ARM <->THUMB interworking */\r
36                 *(.glue*)\r
37                 *(.v4*)\r
38                 *(.vfp11_veneer)\r
39 \r
40                 /* C++ Support */\r
41                 KEEP(*(.init))\r
42                 __preinit_array_start = .;\r
43                 KEEP (*(.preinit_array))\r
44                 __preinit_array_end = .;\r
45                 __init_array_start = .;\r
46                 KEEP (*(SORT(.init_array.*)))\r
47                 KEEP (*(.init_array))\r
48                 __init_array_end = .;\r
49                 KEEP (*crtbegin.o(.ctors))\r
50                 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))\r
51                 KEEP (*(SORT(.ctors.*)))\r
52                 KEEP (*crtend.o(.ctors))\r
53                 KEEP(*(.fini))\r
54                 __fini_array_start = .;\r
55                 KEEP (*(.fini_array))\r
56                 KEEP (*(SORT(.fini_array.*)))\r
57                 __fini_array_end = .;\r
58 \r
59                 KEEP (*crtbegin.o(.dtors))\r
60                 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))\r
61                 KEEP (*(SORT(.dtors.*)))\r
62                 KEEP (*crtend.o(.dtors))\r
63 \r
64                 /* Exception handling support */\r
65                 __extab_start = .;\r
66                 *(.ARM.extab* .gnu.linkonce.armextab.*)\r
67                 . = ALIGN(4);\r
68                 __extab_end = ABSOLUTE(.);\r
69         } > FLASH_1_cached\r
70 \r
71         /* Exception handling, exidx needs a dedicated section */\r
72         .ARM.exidx ABSOLUTE(__extab_end): AT(__extab_end | 0x04000000)\r
73         {\r
74                 __exidx_start = .;\r
75                 *(.ARM.exidx* .gnu.linkonce.armexidx.*)\r
76                 . = ALIGN(4);\r
77                 __exidx_end = ABSOLUTE(.);\r
78         } > FLASH_1_cached\r
79 \r
80         /* CONST data section */\r
81         .rodata ABSOLUTE(__exidx_end): AT(__exidx_end | 0x04000000)\r
82         {\r
83                 *(.rodata .rodata.*)\r
84                 *(.gnu.linkonce.r*)\r
85         } > FLASH_1_cached\r
86 \r
87         . = ALIGN(16);\r
88 \r
89         /* End of RO-DATA and start of LOAD region for DATA */\r
90         eROData = . | 0x04000000;\r
91 \r
92         /* DSRAM layout (Lowest to highest)*/\r
93         /* Fully Descending Stack <-> BSS <-> DATA <-> HEAP */\r
94         /* Dummy section for stack */\r
95         Stack (NOLOAD) : \r
96         {\r
97                 . = . + stack_size;\r
98                 __Xmc4400_stack = .;\r
99         } > SRAM_combined\r
100 \r
101         /* BSS section */\r
102         .bss : \r
103         {\r
104                 __Xmc4400_sBSS = .;\r
105                 * (.bss);\r
106                 * (.bss*);\r
107                 * (COMMON);\r
108                 *(.gnu.linkonce.b*)\r
109                 __Xmc4400_eBSS = ALIGN(4);\r
110         } > SRAM_combined\r
111         /* Yes, the size must be kept outside */\r
112         __Xmc4400_BSS_Size = __Xmc4400_eBSS - __Xmc4400_sBSS;\r
113 \r
114         /* Standard DATA and user defined DATA/BSS/CONST sections */\r
115         .data ABSOLUTE(ALIGN(16)): AT(eROData)\r
116         {\r
117                 __Xmc4400_sData = .;\r
118                 * (.data);\r
119                 * (.data*);\r
120                 *(*.data);\r
121                 *(.gnu.linkonce.d*)\r
122                 __Xmc4400_eData = ALIGN(4);\r
123         } > SRAM_combined\r
124         /* Yes, the size must be kept outside */\r
125         __Xmc4400_Data_Size = __Xmc4400_eData - __Xmc4400_sData;\r
126 \r
127         /* Heap - Bank1*/\r
128         __Xmc4400_heap_start = ALIGN(8);\r
129         __Xmc4400_heap_end = ORIGIN(SRAM_combined) + LENGTH (SRAM_combined);\r
130         Heap_Bank1_Start = __Xmc4400_heap_start;\r
131         Heap_Bank1_Size  = __Xmc4400_heap_end - __Xmc4400_heap_start;\r
132         Heap_Bank1_End   = ABSOLUTE(__Xmc4400_heap_end);\r
133 \r
134         /DISCARD/ :\r
135         {\r
136                 *(.comment)\r
137         }\r
138 \r
139         .stab           0 (NOLOAD) : { *(.stab) }\r
140         .stabstr        0 (NOLOAD) : { *(.stabstr) }\r
141 \r
142         /* DWARF 1 */\r
143         .debug                          0 : { *(.debug) }\r
144         .line                           0 : { *(.line) }\r
145 \r
146         /* GNU DWARF 1 extensions */\r
147         .debug_srcinfo          0 : { *(.debug_srcinfo) }\r
148         .debug_sfnames          0 : { *(.debug_sfnames) }\r
149 \r
150         /* DWARF 1.1 and DWARF 2 */\r
151         .debug_aranges          0 : { *(.debug_aranges) }\r
152         .debug_pubnames         0 : { *(.debug_pubnames) }\r
153         .debug_pubtypes         0 : { *(.debug_pubtypes) }\r
154 \r
155         /* DWARF 2 */\r
156         .debug_info                     0 : { *(.debug_info .gnu.linkonce.wi.*) }\r
157         .debug_abbrev           0 : { *(.debug_abbrev) }\r
158         .debug_line                     0 : { *(.debug_line) }\r
159         .debug_frame            0 : { *(.debug_frame) }\r
160         .debug_str                      0 : { *(.debug_str) }\r
161         .debug_loc                      0 : { *(.debug_loc) }\r
162         .debug_macinfo          0 : { *(.debug_macinfo) }\r
163 \r
164         /* DWARF 2.1 */\r
165         .debug_ranges           0 : { *(.debug_ranges) }\r
166 \r
167         /* SGI/MIPS DWARF 2 extensions */\r
168         .debug_weaknames        0 : { *(.debug_weaknames) }\r
169         .debug_funcnames        0 : { *(.debug_funcnames) }\r
170         .debug_typenames        0 : { *(.debug_typenames) }\r
171         .debug_varnames         0 : { *(.debug_varnames) }\r
172 \r
173         /* Build attributes */\r
174         .build_attributes       0 : { *(.ARM.attributes) }\r
175 }\r