aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios-contrib/ext/mcux-sdk/devices/MIMXRT1051/gcc/MIMXRT1051xxxxx_flexspi_nor.ld
diff options
context:
space:
mode:
authorAkshay <[email protected]>2022-04-10 12:13:40 +0100
committerAkshay <[email protected]>2022-04-10 12:13:40 +0100
commitdc90387ce7d8ba7b607d9c48540bf6d8b560f14d (patch)
tree4ccb8fa5886b66fa9d480edef74236c27f035e16 /lib/chibios-contrib/ext/mcux-sdk/devices/MIMXRT1051/gcc/MIMXRT1051xxxxx_flexspi_nor.ld
Diffstat (limited to 'lib/chibios-contrib/ext/mcux-sdk/devices/MIMXRT1051/gcc/MIMXRT1051xxxxx_flexspi_nor.ld')
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/MIMXRT1051/gcc/MIMXRT1051xxxxx_flexspi_nor.ld258
1 files changed, 258 insertions, 0 deletions
diff --git a/lib/chibios-contrib/ext/mcux-sdk/devices/MIMXRT1051/gcc/MIMXRT1051xxxxx_flexspi_nor.ld b/lib/chibios-contrib/ext/mcux-sdk/devices/MIMXRT1051/gcc/MIMXRT1051xxxxx_flexspi_nor.ld
new file mode 100644
index 000000000..29cd8989a
--- /dev/null
+++ b/lib/chibios-contrib/ext/mcux-sdk/devices/MIMXRT1051/gcc/MIMXRT1051xxxxx_flexspi_nor.ld
@@ -0,0 +1,258 @@
1/*
2** ###################################################################
3** Processors: MIMXRT1051CVJ5B
4** MIMXRT1051CVL5B
5** MIMXRT1051DVJ6B
6** MIMXRT1051DVL6B
7**
8** Compiler: GNU C Compiler
9** Reference manual: IMXRT1050RM Rev.2.1, 12/2018 | IMXRT1050SRM Rev.2
10** Version: rev. 1.0, 2018-09-21
11** Build: b200110
12**
13** Abstract:
14** Linker file for the GNU C Compiler
15**
16** Copyright 2016 Freescale Semiconductor, Inc.
17** Copyright 2016-2020 NXP
18** All rights reserved.
19**
20** SPDX-License-Identifier: BSD-3-Clause
21**
22** http: www.nxp.com
23** mail: [email protected]
24**
25** ###################################################################
26*/
27
28/* Entry Point */
29ENTRY(Reset_Handler)
30
31HEAP_SIZE = DEFINED(__heap_size__) ? __heap_size__ : 0x0400;
32STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x0400;
33VECTOR_RAM_SIZE = DEFINED(__ram_vector_table__) ? 0x00000400 : 0;
34
35/* Specify the memory areas */
36MEMORY
37{
38 m_flash_config (RX) : ORIGIN = 0x60000000, LENGTH = 0x00001000
39 m_ivt (RX) : ORIGIN = 0x60001000, LENGTH = 0x00001000
40 m_interrupts (RX) : ORIGIN = 0x60002000, LENGTH = 0x00000400
41 m_text (RX) : ORIGIN = 0x60002400, LENGTH = 0x03FFDC00
42 m_data (RW) : ORIGIN = 0x20000000, LENGTH = 0x00020000
43 m_data2 (RW) : ORIGIN = 0x20200000, LENGTH = 0x00040000
44}
45
46/* Define output sections */
47SECTIONS
48{
49 __NCACHE_REGION_START = ORIGIN(m_data2);
50 __NCACHE_REGION_SIZE = 0;
51
52 .flash_config :
53 {
54 . = ALIGN(4);
55 __FLASH_BASE = .;
56 KEEP(* (.boot_hdr.conf)) /* flash config section */
57 . = ALIGN(4);
58 } > m_flash_config
59
60 ivt_begin= ORIGIN(m_flash_config) + LENGTH(m_flash_config);
61
62 .ivt : AT(ivt_begin)
63 {
64 . = ALIGN(4);
65 KEEP(* (.boot_hdr.ivt)) /* ivt section */
66 KEEP(* (.boot_hdr.boot_data)) /* boot section */
67 KEEP(* (.boot_hdr.dcd_data)) /* dcd section */
68 . = ALIGN(4);
69 } > m_ivt
70
71 /* The startup code goes first into internal RAM */
72 .interrupts :
73 {
74 __VECTOR_TABLE = .;
75 __Vectors = .;
76 . = ALIGN(4);
77 KEEP(*(.isr_vector)) /* Startup code */
78 . = ALIGN(4);
79 } > m_interrupts
80
81 /* The program code and other data goes into internal RAM */
82 .text :
83 {
84 . = ALIGN(4);
85 *(.text) /* .text sections (code) */
86 *(.text*) /* .text* sections (code) */
87 *(.rodata) /* .rodata sections (constants, strings, etc.) */
88 *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
89 *(.glue_7) /* glue arm to thumb code */
90 *(.glue_7t) /* glue thumb to arm code */
91 *(.eh_frame)
92 KEEP (*(.init))
93 KEEP (*(.fini))
94 . = ALIGN(4);
95 } > m_text
96
97 .ARM.extab :
98 {
99 *(.ARM.extab* .gnu.linkonce.armextab.*)
100 } > m_text
101
102 .ARM :
103 {
104 __exidx_start = .;
105 *(.ARM.exidx*)
106 __exidx_end = .;
107 } > m_text
108
109 .ctors :
110 {
111 __CTOR_LIST__ = .;
112 /* gcc uses crtbegin.o to find the start of
113 the constructors, so we make sure it is
114 first. Because this is a wildcard, it
115 doesn't matter if the user does not
116 actually link against crtbegin.o; the
117 linker won't look for a file to match a
118 wildcard. The wildcard also means that it
119 doesn't matter which directory crtbegin.o
120 is in. */
121 KEEP (*crtbegin.o(.ctors))
122 KEEP (*crtbegin?.o(.ctors))
123 /* We don't want to include the .ctor section from
124 from the crtend.o file until after the sorted ctors.
125 The .ctor section from the crtend file contains the
126 end of ctors marker and it must be last */
127 KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors))
128 KEEP (*(SORT(.ctors.*)))
129 KEEP (*(.ctors))
130 __CTOR_END__ = .;
131 } > m_text
132
133 .dtors :
134 {
135 __DTOR_LIST__ = .;
136 KEEP (*crtbegin.o(.dtors))
137 KEEP (*crtbegin?.o(.dtors))
138 KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors))
139 KEEP (*(SORT(.dtors.*)))
140 KEEP (*(.dtors))
141 __DTOR_END__ = .;
142 } > m_text
143
144 .preinit_array :
145 {
146 PROVIDE_HIDDEN (__preinit_array_start = .);
147 KEEP (*(.preinit_array*))
148 PROVIDE_HIDDEN (__preinit_array_end = .);
149 } > m_text
150
151 .init_array :
152 {
153 PROVIDE_HIDDEN (__init_array_start = .);
154 KEEP (*(SORT(.init_array.*)))
155 KEEP (*(.init_array*))
156 PROVIDE_HIDDEN (__init_array_end = .);
157 } > m_text
158
159 .fini_array :
160 {
161 PROVIDE_HIDDEN (__fini_array_start = .);
162 KEEP (*(SORT(.fini_array.*)))
163 KEEP (*(.fini_array*))
164 PROVIDE_HIDDEN (__fini_array_end = .);
165 } > m_text
166
167 __etext = .; /* define a global symbol at end of code */
168 __DATA_ROM = .; /* Symbol is used by startup for data initialization */
169
170 .interrupts_ram :
171 {
172 . = ALIGN(4);
173 __VECTOR_RAM__ = .;
174 __interrupts_ram_start__ = .; /* Create a global symbol at data start */
175 *(.m_interrupts_ram) /* This is a user defined section */
176 . += VECTOR_RAM_SIZE;
177 . = ALIGN(4);
178 __interrupts_ram_end__ = .; /* Define a global symbol at data end */
179 } > m_data
180
181 __VECTOR_RAM = DEFINED(__ram_vector_table__) ? __VECTOR_RAM__ : ORIGIN(m_interrupts);
182 __RAM_VECTOR_TABLE_SIZE_BYTES = DEFINED(__ram_vector_table__) ? (__interrupts_ram_end__ - __interrupts_ram_start__) : 0x0;
183
184 .data : AT(__DATA_ROM)
185 {
186 . = ALIGN(4);
187 __DATA_RAM = .;
188 __data_start__ = .; /* create a global symbol at data start */
189 *(m_usb_dma_init_data)
190 *(.data) /* .data sections */
191 *(.data*) /* .data* sections */
192 KEEP(*(.jcr*))
193 . = ALIGN(4);
194 __data_end__ = .; /* define a global symbol at data end */
195 } > m_data
196 __NDATA_ROM = __DATA_ROM + (__data_end__ - __data_start__);
197 .ncache.init : AT(__NDATA_ROM)
198 {
199 __noncachedata_start__ = .; /* create a global symbol at ncache data start */
200 *(NonCacheable.init)
201 . = ALIGN(4);
202 __noncachedata_init_end__ = .; /* create a global symbol at initialized ncache data end */
203 } > m_data
204 . = __noncachedata_init_end__;
205 .ncache :
206 {
207 *(NonCacheable)
208 . = ALIGN(4);
209 __noncachedata_end__ = .; /* define a global symbol at ncache data end */
210 } > m_data
211
212 __DATA_END = __NDATA_ROM + (__noncachedata_init_end__ - __noncachedata_start__);
213 text_end = ORIGIN(m_text) + LENGTH(m_text);
214 ASSERT(__DATA_END <= text_end, "region m_text overflowed with text and data")
215
216 /* Uninitialized data section */
217 .bss :
218 {
219 /* This is used by the startup in order to initialize the .bss section */
220 . = ALIGN(4);
221 __START_BSS = .;
222 __bss_start__ = .;
223 *(m_usb_dma_noninit_data)
224 *(.bss)
225 *(.bss*)
226 *(COMMON)
227 . = ALIGN(4);
228 __bss_end__ = .;
229 __END_BSS = .;
230 } > m_data
231
232 .heap :
233 {
234 . = ALIGN(8);
235 __end__ = .;
236 PROVIDE(end = .);
237 __HeapBase = .;
238 . += HEAP_SIZE;
239 __HeapLimit = .;
240 __heap_limit = .; /* Add for _sbrk */
241 } > m_data
242
243 .stack :
244 {
245 . = ALIGN(8);
246 . += STACK_SIZE;
247 } > m_data
248
249 /* Initializes stack on the end of block */
250 __StackTop = ORIGIN(m_data) + LENGTH(m_data);
251 __StackLimit = __StackTop - STACK_SIZE;
252 PROVIDE(__stack = __StackTop);
253
254 .ARM.attributes 0 : { *(.ARM.attributes) }
255
256 ASSERT(__StackLimit >= __HeapLimit, "region m_data overflowed with stack and heap")
257}
258