1 /******************************************************************************
2 *
3 * Copyright (C) 2015 Xilinx, Inc. All rights reserved.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to deal
7 * in the Software without restriction, including without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 * copies of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
14 *
15 * Use of the Software is limited solely to applications:
16 * (a) running on a Xilinx device, or
17 * (b) that interact with a Xilinx device through a bus or interconnect.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
24 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25 * SOFTWARE.
26 *
27 * Except as contained in this notice, the name of the Xilinx shall not be used
28 * in advertising or otherwise to promote the sale, use or other dealings in
29 * this Software without prior written authorization from Xilinx.
30 *
31 ******************************************************************************/
33 _STACK_SIZE = DEFINED(_STACK_SIZE) ? _STACK_SIZE : 0x2000;
34 _HEAP_SIZE = DEFINED(_HEAP_SIZE) ? _HEAP_SIZE : 0x4000;
36 _ABORT_STACK_SIZE = DEFINED(_ABORT_STACK_SIZE) ? _ABORT_STACK_SIZE : 1024;
37 _SUPERVISOR_STACK_SIZE = DEFINED(_SUPERVISOR_STACK_SIZE) ? _SUPERVISOR_STACK_SIZE : 2048;
38 _IRQ_STACK_SIZE = DEFINED(_IRQ_STACK_SIZE) ? _IRQ_STACK_SIZE : 1024;
39 _FIQ_STACK_SIZE = DEFINED(_FIQ_STACK_SIZE) ? _FIQ_STACK_SIZE : 1024;
40 _UNDEF_STACK_SIZE = DEFINED(_UNDEF_STACK_SIZE) ? _UNDEF_STACK_SIZE : 1024;
42 /* Define Memories in the system */
44 MEMORY
45 {
46 psu_ddr_S_AXI_BASEADDR : ORIGIN = 0x3ED00000, LENGTH = 0x00020000
47 psu_ocm_ram_1_S_AXI_BASEADDR : ORIGIN = 0xFFFF0000, LENGTH = 0x00010000
48 psu_r5_tcm_ram_0_S_AXI_BASEADDR : ORIGIN = 0x00000000, LENGTH = 0x00010000
49 psu_r5_tcm_ram_1_S_AXI_BASEADDR : ORIGIN = 0x00020000, LENGTH = 0x00020000
50 }
52 /* Specify the default entry point to the program */
54 /* ENTRY(_boot) */
56 ENTRY(_vector_table)
58 /* Define the sections, and where they are mapped in memory */
60 SECTIONS
61 {
62 .vectors : {
63 KEEP (*(.vectors))
64 *(.boot)
65 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
67 .text : {
68 *(.text)
69 *(.text.*)
70 *(.gnu.linkonce.t.*)
71 *(.plt)
72 *(.gnu_warning)
73 *(.gcc_execpt_table)
74 *(.glue_7)
75 *(.glue_7t)
76 *(.vfp11_veneer)
77 *(.ARM.extab)
78 *(.gnu.linkonce.armextab.*)
79 } > psu_r5_tcm_ram_1_S_AXI_BASEADDR
81 .init : {
82 KEEP (*(.init))
83 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
85 .fini : {
86 KEEP (*(.fini))
87 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
89 .interp : {
90 KEEP (*(.interp))
91 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
93 .note-ABI-tag : {
94 KEEP (*(.note-ABI-tag))
95 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
97 .rodata : {
98 __rodata_start = .;
99 *(.rodata)
100 *(.rodata.*)
101 *(.gnu.linkonce.r.*)
102 __rodata_end = .;
103 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
105 .rodata1 : {
106 __rodata1_start = .;
107 *(.rodata1)
108 *(.rodata1.*)
109 __rodata1_end = .;
110 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
112 .sdata2 : {
113 __sdata2_start = .;
114 *(.sdata2)
115 *(.sdata2.*)
116 *(.gnu.linkonce.s2.*)
117 __sdata2_end = .;
118 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
120 .sbss2 : {
121 __sbss2_start = .;
122 *(.sbss2)
123 *(.sbss2.*)
124 *(.gnu.linkonce.sb2.*)
125 __sbss2_end = .;
126 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
128 .data : {
129 __data_start = .;
130 *(.data)
131 *(.data.*)
132 *(.gnu.linkonce.d.*)
133 *(.jcr)
134 *(.got)
135 *(.got.plt)
136 __data_end = .;
137 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
139 .data1 : {
140 __data1_start = .;
141 *(.data1)
142 *(.data1.*)
143 __data1_end = .;
144 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
146 .got : {
147 *(.got)
148 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
150 .ctors : {
151 __CTOR_LIST__ = .;
152 ___CTORS_LIST___ = .;
153 KEEP (*crtbegin.o(.ctors))
154 KEEP (*(EXCLUDE_FILE(*crtend.o) .ctors))
155 KEEP (*(SORT(.ctors.*)))
156 KEEP (*(.ctors))
157 __CTOR_END__ = .;
158 ___CTORS_END___ = .;
159 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
161 .dtors : {
162 __DTOR_LIST__ = .;
163 ___DTORS_LIST___ = .;
164 KEEP (*crtbegin.o(.dtors))
165 KEEP (*(EXCLUDE_FILE(*crtend.o) .dtors))
166 KEEP (*(SORT(.dtors.*)))
167 KEEP (*(.dtors))
168 __DTOR_END__ = .;
169 ___DTORS_END___ = .;
170 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
172 .fixup : {
173 __fixup_start = .;
174 *(.fixup)
175 __fixup_end = .;
176 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
178 .eh_frame : {
179 *(.eh_frame)
180 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
182 .eh_framehdr : {
183 __eh_framehdr_start = .;
184 *(.eh_framehdr)
185 __eh_framehdr_end = .;
186 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
188 .gcc_except_table : {
189 *(.gcc_except_table)
190 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
192 .mmu_tbl (ALIGN(16384)) : {
193 __mmu_tbl_start = .;
194 *(.mmu_tbl)
195 __mmu_tbl_end = .;
196 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
198 .ARM.exidx : {
199 __exidx_start = .;
200 *(.ARM.exidx*)
201 *(.gnu.linkonce.armexidix.*.*)
202 __exidx_end = .;
203 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
205 .preinit_array : {
206 __preinit_array_start = .;
207 KEEP (*(SORT(.preinit_array.*)))
208 KEEP (*(.preinit_array))
209 __preinit_array_end = .;
210 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
212 .init_array : {
213 __init_array_start = .;
214 KEEP (*(SORT(.init_array.*)))
215 KEEP (*(.init_array))
216 __init_array_end = .;
217 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
219 .fini_array : {
220 __fini_array_start = .;
221 KEEP (*(SORT(.fini_array.*)))
222 KEEP (*(.fini_array))
223 __fini_array_end = .;
224 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
226 .ARM.attributes : {
227 __ARM.attributes_start = .;
228 *(.ARM.attributes)
229 __ARM.attributes_end = .;
230 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
232 .sdata : {
233 __sdata_start = .;
234 *(.sdata)
235 *(.sdata.*)
236 *(.gnu.linkonce.s.*)
237 __sdata_end = .;
238 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
240 .sbss (NOLOAD) : {
241 __sbss_start = .;
242 *(.sbss)
243 *(.sbss.*)
244 *(.gnu.linkonce.sb.*)
245 __sbss_end = .;
246 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
248 .tdata : {
249 __tdata_start = .;
250 *(.tdata)
251 *(.tdata.*)
252 *(.gnu.linkonce.td.*)
253 __tdata_end = .;
254 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
256 .tbss : {
257 __tbss_start = .;
258 *(.tbss)
259 *(.tbss.*)
260 *(.gnu.linkonce.tb.*)
261 __tbss_end = .;
262 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
264 .bss (NOLOAD) : {
265 . = ALIGN(4);
266 __bss_start__ = .;
267 *(.bss)
268 *(.bss.*)
269 *(.gnu.linkonce.b.*)
270 *(COMMON)
271 . = ALIGN(4);
272 __bss_end__ = .;
273 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
275 _SDA_BASE_ = __sdata_start + ((__sbss_end - __sdata_start) / 2 );
277 _SDA2_BASE_ = __sdata2_start + ((__sbss2_end - __sdata2_start) / 2 );
279 /* Generate Stack and Heap definitions */
281 .heap (NOLOAD) : {
282 . = ALIGN(16);
283 _heap = .;
284 HeapBase = .;
285 _heap_start = .;
286 . += _HEAP_SIZE;
287 _heap_end = .;
288 HeapLimit = .;
289 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
291 .stack (NOLOAD) : {
292 . = ALIGN(16);
293 _stack_end = .;
294 . += _STACK_SIZE;
295 _stack = .;
296 __stack = _stack;
297 . = ALIGN(16);
298 _irq_stack_end = .;
299 . += _IRQ_STACK_SIZE;
300 __irq_stack = .;
301 _supervisor_stack_end = .;
302 . += _SUPERVISOR_STACK_SIZE;
303 . = ALIGN(16);
304 __supervisor_stack = .;
305 _abort_stack_end = .;
306 . += _ABORT_STACK_SIZE;
307 . = ALIGN(16);
308 __abort_stack = .;
309 _fiq_stack_end = .;
310 . += _FIQ_STACK_SIZE;
311 . = ALIGN(16);
312 __fiq_stack = .;
313 _undef_stack_end = .;
314 . += _UNDEF_STACK_SIZE;
315 . = ALIGN(16);
316 __undef_stack = .;
317 } > psu_r5_tcm_ram_0_S_AXI_BASEADDR
319 _end = .;
320 }