diff options
Diffstat (limited to 'lib/chibios-contrib/ext/mcux-sdk/devices/MK24F12/gcc/MK24FN1M0xxx12_ram.ld')
-rw-r--r-- | lib/chibios-contrib/ext/mcux-sdk/devices/MK24F12/gcc/MK24FN1M0xxx12_ram.ld | 199 |
1 files changed, 199 insertions, 0 deletions
diff --git a/lib/chibios-contrib/ext/mcux-sdk/devices/MK24F12/gcc/MK24FN1M0xxx12_ram.ld b/lib/chibios-contrib/ext/mcux-sdk/devices/MK24F12/gcc/MK24FN1M0xxx12_ram.ld new file mode 100644 index 000000000..eac912a55 --- /dev/null +++ b/lib/chibios-contrib/ext/mcux-sdk/devices/MK24F12/gcc/MK24FN1M0xxx12_ram.ld | |||
@@ -0,0 +1,199 @@ | |||
1 | /* | ||
2 | ** ################################################################### | ||
3 | ** Processors: MK24FN1M0CAJ12 | ||
4 | ** MK24FN1M0VDC12 | ||
5 | ** MK24FN1M0VLL12 | ||
6 | ** MK24FN1M0VLQ12 | ||
7 | ** | ||
8 | ** Compiler: GNU C Compiler | ||
9 | ** Reference manual: K24P144M120SF5RM, Rev.2, January 2014 | ||
10 | ** Version: rev. 2.8, 2016-03-21 | ||
11 | ** Build: b190916 | ||
12 | ** | ||
13 | ** Abstract: | ||
14 | ** Linker file for the GNU C Compiler | ||
15 | ** | ||
16 | ** Copyright 2016 Freescale Semiconductor, Inc. | ||
17 | ** Copyright 2016-2019 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 = 0x1FFF0000, LENGTH = 0x00000400 | ||
38 | m_text (RX) : ORIGIN = 0x1FFF0400, LENGTH = 0x0000FC00 | ||
39 | m_data (RW) : ORIGIN = 0x20000000, LENGTH = 0x00030000 | ||
40 | } | ||
41 | |||
42 | /* Define output sections */ | ||
43 | SECTIONS | ||
44 | { | ||
45 | /* The startup code goes first into internal RAM */ | ||
46 | .interrupts : | ||
47 | { | ||
48 | . = ALIGN(4); | ||
49 | KEEP(*(.isr_vector)) /* Startup code */ | ||
50 | . = ALIGN(4); | ||
51 | } > m_interrupts | ||
52 | |||
53 | /* The program code and other data goes into internal RAM */ | ||
54 | .text : | ||
55 | { | ||
56 | . = ALIGN(4); | ||
57 | *(.text) /* .text sections (code) */ | ||
58 | *(.text*) /* .text* sections (code) */ | ||
59 | *(.rodata) /* .rodata sections (constants, strings, etc.) */ | ||
60 | *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ | ||
61 | *(.glue_7) /* glue arm to thumb code */ | ||
62 | *(.glue_7t) /* glue thumb to arm code */ | ||
63 | *(.eh_frame) | ||
64 | KEEP (*(.init)) | ||
65 | KEEP (*(.fini)) | ||
66 | . = ALIGN(4); | ||
67 | } > m_text | ||
68 | |||
69 | .ARM.extab : | ||
70 | { | ||
71 | *(.ARM.extab* .gnu.linkonce.armextab.*) | ||
72 | } > m_text | ||
73 | |||
74 | .ARM : | ||
75 | { | ||
76 | __exidx_start = .; | ||
77 | *(.ARM.exidx*) | ||
78 | __exidx_end = .; | ||
79 | } > m_text | ||
80 | |||
81 | .ctors : | ||
82 | { | ||
83 | __CTOR_LIST__ = .; | ||
84 | /* gcc uses crtbegin.o to find the start of | ||
85 | the constructors, so we make sure it is | ||
86 | first. Because this is a wildcard, it | ||
87 | doesn't matter if the user does not | ||
88 | actually link against crtbegin.o; the | ||
89 | linker won't look for a file to match a | ||
90 | wildcard. The wildcard also means that it | ||
91 | doesn't matter which directory crtbegin.o | ||
92 | is in. */ | ||
93 | KEEP (*crtbegin.o(.ctors)) | ||
94 | KEEP (*crtbegin?.o(.ctors)) | ||
95 | /* We don't want to include the .ctor section from | ||
96 | from the crtend.o file until after the sorted ctors. | ||
97 | The .ctor section from the crtend file contains the | ||
98 | end of ctors marker and it must be last */ | ||
99 | KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)) | ||
100 | KEEP (*(SORT(.ctors.*))) | ||
101 | KEEP (*(.ctors)) | ||
102 | __CTOR_END__ = .; | ||
103 | } > m_text | ||
104 | |||
105 | .dtors : | ||
106 | { | ||
107 | __DTOR_LIST__ = .; | ||
108 | KEEP (*crtbegin.o(.dtors)) | ||
109 | KEEP (*crtbegin?.o(.dtors)) | ||
110 | KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)) | ||
111 | KEEP (*(SORT(.dtors.*))) | ||
112 | KEEP (*(.dtors)) | ||
113 | __DTOR_END__ = .; | ||
114 | } > m_text | ||
115 | |||
116 | .preinit_array : | ||
117 | { | ||
118 | PROVIDE_HIDDEN (__preinit_array_start = .); | ||
119 | KEEP (*(.preinit_array*)) | ||
120 | PROVIDE_HIDDEN (__preinit_array_end = .); | ||
121 | } > m_text | ||
122 | |||
123 | .init_array : | ||
124 | { | ||
125 | PROVIDE_HIDDEN (__init_array_start = .); | ||
126 | KEEP (*(SORT(.init_array.*))) | ||
127 | KEEP (*(.init_array*)) | ||
128 | PROVIDE_HIDDEN (__init_array_end = .); | ||
129 | } > m_text | ||
130 | |||
131 | .fini_array : | ||
132 | { | ||
133 | PROVIDE_HIDDEN (__fini_array_start = .); | ||
134 | KEEP (*(SORT(.fini_array.*))) | ||
135 | KEEP (*(.fini_array*)) | ||
136 | PROVIDE_HIDDEN (__fini_array_end = .); | ||
137 | } > m_text | ||
138 | |||
139 | __etext = .; /* define a global symbol at end of code */ | ||
140 | __DATA_ROM = .; /* Symbol is used by startup for data initialization */ | ||
141 | |||
142 | .data : AT(__DATA_ROM) | ||
143 | { | ||
144 | . = ALIGN(4); | ||
145 | __DATA_RAM = .; | ||
146 | __data_start__ = .; /* create a global symbol at data start */ | ||
147 | *(.data) /* .data sections */ | ||
148 | *(.data*) /* .data* sections */ | ||
149 | KEEP(*(.jcr*)) | ||
150 | . = ALIGN(4); | ||
151 | __data_end__ = .; /* define a global symbol at data end */ | ||
152 | } > m_data | ||
153 | |||
154 | __DATA_END = __DATA_ROM + (__data_end__ - __data_start__); | ||
155 | text_end = ORIGIN(m_text) + LENGTH(m_text); | ||
156 | ASSERT(__DATA_END <= text_end, "region m_text overflowed with text and data") | ||
157 | |||
158 | /* Uninitialized data section */ | ||
159 | .bss : | ||
160 | { | ||
161 | /* This is used by the startup in order to initialize the .bss section */ | ||
162 | . = ALIGN(4); | ||
163 | __START_BSS = .; | ||
164 | __bss_start__ = .; | ||
165 | *(.bss) | ||
166 | *(.bss*) | ||
167 | *(COMMON) | ||
168 | . = ALIGN(4); | ||
169 | __bss_end__ = .; | ||
170 | __END_BSS = .; | ||
171 | } > m_data | ||
172 | |||
173 | .heap : | ||
174 | { | ||
175 | . = ALIGN(8); | ||
176 | __end__ = .; | ||
177 | PROVIDE(end = .); | ||
178 | __HeapBase = .; | ||
179 | . += HEAP_SIZE; | ||
180 | __HeapLimit = .; | ||
181 | __heap_limit = .; /* Add for _sbrk */ | ||
182 | } > m_data | ||
183 | |||
184 | .stack : | ||
185 | { | ||
186 | . = ALIGN(8); | ||
187 | . += STACK_SIZE; | ||
188 | } > m_data | ||
189 | |||
190 | /* Initializes stack on the end of block */ | ||
191 | __StackTop = ORIGIN(m_data) + LENGTH(m_data); | ||
192 | __StackLimit = __StackTop - STACK_SIZE; | ||
193 | PROVIDE(__stack = __StackTop); | ||
194 | |||
195 | .ARM.attributes 0 : { *(.ARM.attributes) } | ||
196 | |||
197 | ASSERT(__StackLimit >= __HeapLimit, "region m_data overflowed with stack and heap") | ||
198 | } | ||
199 | |||