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