aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios-contrib/ext/mcux-sdk/devices/MKE15Z7/gcc/MKE15Z256xxx7_flash.ld
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios-contrib/ext/mcux-sdk/devices/MKE15Z7/gcc/MKE15Z256xxx7_flash.ld')
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/devices/MKE15Z7/gcc/MKE15Z256xxx7_flash.ld215
1 files changed, 215 insertions, 0 deletions
diff --git a/lib/chibios-contrib/ext/mcux-sdk/devices/MKE15Z7/gcc/MKE15Z256xxx7_flash.ld b/lib/chibios-contrib/ext/mcux-sdk/devices/MKE15Z7/gcc/MKE15Z256xxx7_flash.ld
new file mode 100644
index 000000000..24530382d
--- /dev/null
+++ b/lib/chibios-contrib/ext/mcux-sdk/devices/MKE15Z7/gcc/MKE15Z256xxx7_flash.ld
@@ -0,0 +1,215 @@
1/*
2** ###################################################################
3** Processors: MKE15Z256VLH7
4** MKE15Z256VLL7
5**
6** Compiler: GNU C Compiler
7** Reference manual: KE1xZP100M72SF0RM, Rev. 2, Aug. 2016
8** Version: rev. 3.0, 2016-09-20
9** Build: b190916
10**
11** Abstract:
12** Linker file for the GNU C Compiler
13**
14** Copyright 2016 Freescale Semiconductor, Inc.
15** Copyright 2016-2019 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;
31
32/* Specify the memory areas */
33MEMORY
34{
35 m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000200
36 m_flash_config (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010
37 m_text (RX) : ORIGIN = 0x00000410, LENGTH = 0x0003FBF0
38 m_data (RW) : ORIGIN = 0x1FFFE000, LENGTH = 0x00008000
39}
40
41/* Define output sections */
42SECTIONS
43{
44 /* The startup code goes first into internal flash */
45 .interrupts :
46 {
47 . = ALIGN(4);
48 KEEP(*(.isr_vector)) /* Startup code */
49 . = ALIGN(4);
50 } > m_interrupts
51
52 .flash_config :
53 {
54 . = ALIGN(4);
55 KEEP(*(.FlashConfig)) /* Flash Configuration Field (FCF) */
56 . = ALIGN(4);
57 } > m_flash_config
58
59 /* The program code and other data goes into internal flash */
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 /* reserve MTB memory at the beginning of m_data */
149 .mtb : /* MTB buffer address as defined by the hardware */
150 {
151 . = ALIGN(8);
152 _mtb_start = .;
153 KEEP(*(.mtb_buf)) /* need to KEEP Micro Trace Buffer as not referenced by application */
154 . = ALIGN(8);
155 _mtb_end = .;
156 } > m_data
157
158 .data : AT(__DATA_ROM)
159 {
160 . = ALIGN(4);
161 __DATA_RAM = .;
162 __data_start__ = .; /* create a global symbol at data start */
163 *(.data) /* .data sections */
164 *(.data*) /* .data* sections */
165 KEEP(*(.jcr*))
166 . = ALIGN(4);
167 __data_end__ = .; /* define a global symbol at data end */
168 } > m_data
169
170 __DATA_END = __DATA_ROM + (__data_end__ - __data_start__);
171 text_end = ORIGIN(m_text) + LENGTH(m_text);
172 ASSERT(__DATA_END <= text_end, "region m_text overflowed with text and data")
173
174 /* Uninitialized data section */
175 .bss :
176 {
177 /* This is used by the startup in order to initialize the .bss section */
178 . = ALIGN(4);
179 __START_BSS = .;
180 __bss_start__ = .;
181 *(.bss)
182 *(.bss*)
183 *(COMMON)
184 . = ALIGN(4);
185 __bss_end__ = .;
186 __END_BSS = .;
187 } > m_data
188
189 .heap :
190 {
191 . = ALIGN(8);
192 __end__ = .;
193 PROVIDE(end = .);
194 __HeapBase = .;
195 . += HEAP_SIZE;
196 __HeapLimit = .;
197 __heap_limit = .; /* Add for _sbrk */
198 } > m_data
199
200 .stack :
201 {
202 . = ALIGN(8);
203 . += STACK_SIZE;
204 } > m_data
205
206 /* Initializes stack on the end of block */
207 __StackTop = ORIGIN(m_data) + LENGTH(m_data);
208 __StackLimit = __StackTop - STACK_SIZE;
209 PROVIDE(__stack = __StackTop);
210
211 .ARM.attributes 0 : { *(.ARM.attributes) }
212
213 ASSERT(__StackLimit >= __HeapLimit, "region m_data overflowed with stack and heap")
214}
215