diff options
Diffstat (limited to 'lib/chibios-contrib/ext/mcux-sdk/devices/MIMXRT1051/gcc/MIMXRT1051xxxxx_ram.ld')
-rw-r--r-- | lib/chibios-contrib/ext/mcux-sdk/devices/MIMXRT1051/gcc/MIMXRT1051xxxxx_ram.ld | 225 |
1 files changed, 225 insertions, 0 deletions
diff --git a/lib/chibios-contrib/ext/mcux-sdk/devices/MIMXRT1051/gcc/MIMXRT1051xxxxx_ram.ld b/lib/chibios-contrib/ext/mcux-sdk/devices/MIMXRT1051/gcc/MIMXRT1051xxxxx_ram.ld new file mode 100644 index 000000000..3a3c83148 --- /dev/null +++ b/lib/chibios-contrib/ext/mcux-sdk/devices/MIMXRT1051/gcc/MIMXRT1051xxxxx_ram.ld | |||
@@ -0,0 +1,225 @@ | |||
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 */ | ||
29 | ENTRY(Reset_Handler) | ||
30 | |||
31 | HEAP_SIZE = DEFINED(__heap_size__) ? __heap_size__ : 0x0400; | ||
32 | STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x0400; | ||
33 | |||
34 | /* Specify the memory areas */ | ||
35 | MEMORY | ||
36 | { | ||
37 | m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000400 | ||
38 | m_text (RX) : ORIGIN = 0x00000400, LENGTH = 0x0001FC00 | ||
39 | m_data (RW) : ORIGIN = 0x20000000, LENGTH = 0x00020000 | ||
40 | m_data2 (RW) : ORIGIN = 0x20200000, LENGTH = 0x00040000 | ||
41 | } | ||
42 | |||
43 | /* Define output sections */ | ||
44 | SECTIONS | ||
45 | { | ||
46 | __NCACHE_REGION_START = ORIGIN(m_data2); | ||
47 | __NCACHE_REGION_SIZE = 0; | ||
48 | |||
49 | /* The startup code goes first into internal RAM */ | ||
50 | .interrupts : | ||
51 | { | ||
52 | __VECTOR_TABLE = .; | ||
53 | __Vectors = .; | ||
54 | . = ALIGN(4); | ||
55 | KEEP(*(.isr_vector)) /* Startup code */ | ||
56 | . = ALIGN(4); | ||
57 | } > m_interrupts | ||
58 | |||
59 | /* The program code and other data goes into internal RAM */ | ||
60 | .text : | ||
61 | { | ||
62 | . = ALIGN(4); | ||
63 | *(.text) /* .text sections (code) */ | ||
64 | *(.text*) /* .text* sections (code) */ | ||
65 | *(.rodata) /* .rodata sections (constants, strings, etc.) */ | ||
66 | *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ | ||
67 | *(.glue_7) /* glue arm to thumb code */ | ||
68 | *(.glue_7t) /* glue thumb to arm code */ | ||
69 | *(.eh_frame) | ||
70 | KEEP (*(.init)) | ||
71 | KEEP (*(.fini)) | ||
72 | . = ALIGN(4); | ||
73 | } > m_text | ||
74 | |||
75 | .ARM.extab : | ||
76 | { | ||
77 | *(.ARM.extab* .gnu.linkonce.armextab.*) | ||
78 | } > m_text | ||
79 | |||
80 | .ARM : | ||
81 | { | ||
82 | __exidx_start = .; | ||
83 | *(.ARM.exidx*) | ||
84 | __exidx_end = .; | ||
85 | } > m_text | ||
86 | |||
87 | .ctors : | ||
88 | { | ||
89 | __CTOR_LIST__ = .; | ||
90 | /* gcc uses crtbegin.o to find the start of | ||
91 | the constructors, so we make sure it is | ||
92 | first. Because this is a wildcard, it | ||
93 | doesn't matter if the user does not | ||
94 | actually link against crtbegin.o; the | ||
95 | linker won't look for a file to match a | ||
96 | wildcard. The wildcard also means that it | ||
97 | doesn't matter which directory crtbegin.o | ||
98 | is in. */ | ||
99 | KEEP (*crtbegin.o(.ctors)) | ||
100 | KEEP (*crtbegin?.o(.ctors)) | ||
101 | /* We don't want to include the .ctor section from | ||
102 | from the crtend.o file until after the sorted ctors. | ||
103 | The .ctor section from the crtend file contains the | ||
104 | end of ctors marker and it must be last */ | ||
105 | KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)) | ||
106 | KEEP (*(SORT(.ctors.*))) | ||
107 | KEEP (*(.ctors)) | ||
108 | __CTOR_END__ = .; | ||
109 | } > m_text | ||
110 | |||
111 | .dtors : | ||
112 | { | ||
113 | __DTOR_LIST__ = .; | ||
114 | KEEP (*crtbegin.o(.dtors)) | ||
115 | KEEP (*crtbegin?.o(.dtors)) | ||
116 | KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)) | ||
117 | KEEP (*(SORT(.dtors.*))) | ||
118 | KEEP (*(.dtors)) | ||
119 | __DTOR_END__ = .; | ||
120 | } > m_text | ||
121 | |||
122 | .preinit_array : | ||
123 | { | ||
124 | PROVIDE_HIDDEN (__preinit_array_start = .); | ||
125 | KEEP (*(.preinit_array*)) | ||
126 | PROVIDE_HIDDEN (__preinit_array_end = .); | ||
127 | } > m_text | ||
128 | |||
129 | .init_array : | ||
130 | { | ||
131 | PROVIDE_HIDDEN (__init_array_start = .); | ||
132 | KEEP (*(SORT(.init_array.*))) | ||
133 | KEEP (*(.init_array*)) | ||
134 | PROVIDE_HIDDEN (__init_array_end = .); | ||
135 | } > m_text | ||
136 | |||
137 | .fini_array : | ||
138 | { | ||
139 | PROVIDE_HIDDEN (__fini_array_start = .); | ||
140 | KEEP (*(SORT(.fini_array.*))) | ||
141 | KEEP (*(.fini_array*)) | ||
142 | PROVIDE_HIDDEN (__fini_array_end = .); | ||
143 | } > m_text | ||
144 | |||
145 | __etext = .; /* define a global symbol at end of code */ | ||
146 | __DATA_ROM = .; /* Symbol is used by startup for data initialization */ | ||
147 | |||
148 | __VECTOR_RAM = ORIGIN(m_interrupts); | ||
149 | __RAM_VECTOR_TABLE_SIZE_BYTES = 0x0; | ||
150 | |||
151 | .data : AT(__DATA_ROM) | ||
152 | { | ||
153 | . = ALIGN(4); | ||
154 | __DATA_RAM = .; | ||
155 | __data_start__ = .; /* create a global symbol at data start */ | ||
156 | *(m_usb_dma_init_data) | ||
157 | *(.data) /* .data sections */ | ||
158 | *(.data*) /* .data* sections */ | ||
159 | KEEP(*(.jcr*)) | ||
160 | . = ALIGN(4); | ||
161 | __data_end__ = .; /* define a global symbol at data end */ | ||
162 | } > m_data | ||
163 | __NDATA_ROM = __DATA_ROM + (__data_end__ - __data_start__); | ||
164 | .ncache.init : AT(__NDATA_ROM) | ||
165 | { | ||
166 | __noncachedata_start__ = .; /* create a global symbol at ncache data start */ | ||
167 | *(NonCacheable.init) | ||
168 | . = ALIGN(4); | ||
169 | __noncachedata_init_end__ = .; /* create a global symbol at initialized ncache data end */ | ||
170 | } > m_data | ||
171 | . = __noncachedata_init_end__; | ||
172 | .ncache : | ||
173 | { | ||
174 | *(NonCacheable) | ||
175 | . = ALIGN(4); | ||
176 | __noncachedata_end__ = .; /* define a global symbol at ncache data end */ | ||
177 | } > m_data | ||
178 | |||
179 | __DATA_END = __NDATA_ROM + (__noncachedata_init_end__ - __noncachedata_start__); | ||
180 | text_end = ORIGIN(m_text) + LENGTH(m_text); | ||
181 | ASSERT(__DATA_END <= text_end, "region m_text overflowed with text and data") | ||
182 | |||
183 | /* Uninitialized data section */ | ||
184 | .bss : | ||
185 | { | ||
186 | /* This is used by the startup in order to initialize the .bss section */ | ||
187 | . = ALIGN(4); | ||
188 | __START_BSS = .; | ||
189 | __bss_start__ = .; | ||
190 | *(m_usb_dma_noninit_data) | ||
191 | *(.bss) | ||
192 | *(.bss*) | ||
193 | *(COMMON) | ||
194 | . = ALIGN(4); | ||
195 | __bss_end__ = .; | ||
196 | __END_BSS = .; | ||
197 | } > m_data | ||
198 | |||
199 | .heap : | ||
200 | { | ||
201 | . = ALIGN(8); | ||
202 | __end__ = .; | ||
203 | PROVIDE(end = .); | ||
204 | __HeapBase = .; | ||
205 | . += HEAP_SIZE; | ||
206 | __HeapLimit = .; | ||
207 | __heap_limit = .; /* Add for _sbrk */ | ||
208 | } > m_data | ||
209 | |||
210 | .stack : | ||
211 | { | ||
212 | . = ALIGN(8); | ||
213 | . += STACK_SIZE; | ||
214 | } > m_data | ||
215 | |||
216 | /* Initializes stack on the end of block */ | ||
217 | __StackTop = ORIGIN(m_data) + LENGTH(m_data); | ||
218 | __StackLimit = __StackTop - STACK_SIZE; | ||
219 | PROVIDE(__stack = __StackTop); | ||
220 | |||
221 | .ARM.attributes 0 : { *(.ARM.attributes) } | ||
222 | |||
223 | ASSERT(__StackLimit >= __HeapLimit, "region m_data overflowed with stack and heap") | ||
224 | } | ||
225 | |||