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