aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios/os/common/startup/ARMCMx/compilers/GCC
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios/os/common/startup/ARMCMx/compilers/GCC')
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/crt0_v6m.S288
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/crt0_v7m.S350
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/crt1.c219
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/ADUCM360.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/ADUCM410.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F030x4.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F030x6.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F030x8.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F031x6.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F042x6.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F051x8.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F070x6.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F070xB.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F072xB.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F091xC.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F100xB.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F103x8.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F103xB.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F103xB_maplemini_bootloader.ld88
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F103xD.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F103xE.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F103xG.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F107xC.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F207xG.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F302x8.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F303x8.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F303xC.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F303xE.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F334x8.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F373xC.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F401xC.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F401xE.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F405xG.ld86
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F407xE.ld86
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F407xG.ld86
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F410x8.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F410xB.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F411xC.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F411xE.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F412xE.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F412xG.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F413xH.ld86
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F429xI.ld86
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F446xC.ld86
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F446xE.ld86
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F469xI.ld86
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F722xE.ld136
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F746xG.ld136
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F746xG_ETH.ld137
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F746xG_MAX.ld138
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F756xG.ld136
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F76xxG.ld136
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F76xxI.ld136
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32G071xB.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32G431xB.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32G474xE.ld85
-rwxr-xr-xlib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32H743xI.ld139
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32H755xI_M7.ld143
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L011x3.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L011x4.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L031x4.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L031x6.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L052x6.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L052x8.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L053x6.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L053x8.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L073x8.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L073xB.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L073xZ.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L151x6.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L152xB.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L152xE.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L432xB.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L432xC.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L452xE.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L476xG.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L496xG.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L4R5xI.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L4R9xI.ld85
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/rules.ld11
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/rules_code.ld80
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/rules_data.ld43
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/rules_memory.ld317
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/rules_stacks.ld40
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/arm-none-eabi.mk23
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/rules.mk291
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_aducm36x.mk18
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_aducm41x.mk18
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f0xx.mk18
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f1xx.mk18
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f2xx.mk18
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f3xx.mk18
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk18
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f7xx.mk18
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32g0xx.mk18
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32g4xx.mk18
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32h7xx.mk18
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32l0xx.mk18
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32l1xx.mk18
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32l4xx.mk18
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/vectors.S1031
101 files changed, 9888 insertions, 0 deletions
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/crt0_v6m.S b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/crt0_v6m.S
new file mode 100644
index 000000000..4b97d2e4e
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/crt0_v6m.S
@@ -0,0 +1,288 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/**
18 * @file crt0_v6m.S
19 * @brief Generic ARMv6-M (Cortex-M0/M1) startup file for ChibiOS.
20 *
21 * @addtogroup ARMCMx_GCC_STARTUP_V6M
22 * @{
23 */
24
25/*===========================================================================*/
26/* Module constants. */
27/*===========================================================================*/
28
29#if !defined(FALSE) || defined(__DOXYGEN__)
30#define FALSE 0
31#endif
32
33#if !defined(TRUE) || defined(__DOXYGEN__)
34#define TRUE 1
35#endif
36
37#define CONTROL_MODE_PRIVILEGED 0
38#define CONTROL_MODE_UNPRIVILEGED 1
39#define CONTROL_USE_MSP 0
40#define CONTROL_USE_PSP 2
41
42#define SCB_VTOR 0xE000ED08
43
44/*===========================================================================*/
45/* Module pre-compile time settings. */
46/*===========================================================================*/
47
48/**
49 * @brief Enforces initialization of MSP.
50 * @note This is required if the boot process is not reliable for whatever
51 * reason (bad ROMs, bad bootloaders, bad debuggers=.
52 */
53#if !defined(CRT0_FORCE_MSP_INIT) || defined(__DOXYGEN__)
54#define CRT0_FORCE_MSP_INIT TRUE
55#endif
56
57/**
58 * @brief VTOR special register initialization.
59 * @details VTOR is initialized to point to the vectors table.
60 * @note This option can only be enabled on Cortex-M0+ cores.
61 */
62#if !defined(CRT0_VTOR_INIT) || defined(__DOXYGEN__)
63#define CRT0_VTOR_INIT FALSE
64#endif
65
66/**
67 * @brief Control special register initialization value.
68 * @details The system is setup to run in privileged mode using the PSP
69 * stack (dual stack mode).
70 */
71#if !defined(CRT0_CONTROL_INIT) || defined(__DOXYGEN__)
72#define CRT0_CONTROL_INIT (CONTROL_USE_PSP | \
73 CONTROL_MODE_PRIVILEGED)
74#endif
75
76/**
77 * @brief Core initialization switch.
78 */
79#if !defined(CRT0_INIT_CORE) || defined(__DOXYGEN__)
80#define CRT0_INIT_CORE TRUE
81#endif
82
83/**
84 * @brief Stack segments initialization switch.
85 */
86#if !defined(CRT0_STACKS_FILL_PATTERN) || defined(__DOXYGEN__)
87#define CRT0_STACKS_FILL_PATTERN 0x55555555
88#endif
89
90/**
91 * @brief Stack segments initialization switch.
92 */
93#if !defined(CRT0_INIT_STACKS) || defined(__DOXYGEN__)
94#define CRT0_INIT_STACKS TRUE
95#endif
96
97/**
98 * @brief DATA segment initialization switch.
99 */
100#if !defined(CRT0_INIT_DATA) || defined(__DOXYGEN__)
101#define CRT0_INIT_DATA TRUE
102#endif
103
104/**
105 * @brief BSS segment initialization switch.
106 */
107#if !defined(CRT0_INIT_BSS) || defined(__DOXYGEN__)
108#define CRT0_INIT_BSS TRUE
109#endif
110
111/**
112 * @brief RAM areas initialization switch.
113 */
114#if !defined(CRT0_INIT_RAM_AREAS) || defined(__DOXYGEN__)
115#define CRT0_INIT_RAM_AREAS TRUE
116#endif
117
118/**
119 * @brief Constructors invocation switch.
120 */
121#if !defined(CRT0_CALL_CONSTRUCTORS) || defined(__DOXYGEN__)
122#define CRT0_CALL_CONSTRUCTORS TRUE
123#endif
124
125/**
126 * @brief Destructors invocation switch.
127 */
128#if !defined(CRT0_CALL_DESTRUCTORS) || defined(__DOXYGEN__)
129#define CRT0_CALL_DESTRUCTORS TRUE
130#endif
131
132/*===========================================================================*/
133/* Code section. */
134/*===========================================================================*/
135
136#if !defined(__DOXYGEN__)
137
138 .cpu cortex-m0
139 .fpu softvfp
140 .syntax unified
141 .thumb
142 .text
143
144/*
145 * CRT0 entry point.
146 */
147 .align 2
148 .thumb_func
149 .global _crt0_entry
150_crt0_entry:
151 /* Interrupts are globally masked initially.*/
152 cpsid i
153
154#if CRT0_FORCE_MSP_INIT == TRUE
155 /* MSP stack pointers initialization.*/
156 ldr r0, =__main_stack_end__
157 msr MSP, r0
158#endif
159
160 /* PSP stack pointers initialization.*/
161 ldr r0, =__process_stack_end__
162 msr PSP, r0
163
164 /* CPU mode initialization as configured.*/
165 movs r0, #CRT0_CONTROL_INIT
166 msr CONTROL, r0
167 isb
168
169#if CRT0_VTOR_INIT == TRUE
170 ldr r0, =_vectors
171 ldr r1, =SCB_VTOR
172 str r0, [r1]
173#endif
174
175#if CRT0_INIT_CORE == TRUE
176 /* Core initialization.*/
177 bl __core_init
178#endif
179
180 /* Early initialization..*/
181 bl __early_init
182
183#if CRT0_INIT_STACKS == TRUE
184 ldr r0, =CRT0_STACKS_FILL_PATTERN
185 /* Main Stack initialization. Note, it assumes that the
186 stack size is a multiple of 4 so the linker file must
187 ensure this.*/
188 ldr r1, =__main_stack_base__
189 ldr r2, =__main_stack_end__
190msloop:
191 cmp r1, r2
192 bge endmsloop
193 str r0, [r1]
194 adds r1, #4
195 b msloop
196endmsloop:
197 /* Process Stack initialization. Note, it assumes that the
198 stack size is a multiple of 4 so the linker file must
199 ensure this.*/
200 ldr r1, =__process_stack_base__
201 ldr r2, =__process_stack_end__
202psloop:
203 cmp r1, r2
204 bge endpsloop
205 str r0, [r1]
206 adds r1, #4
207 b psloop
208endpsloop:
209#endif
210
211#if CRT0_INIT_DATA == TRUE
212 /* Data initialization. Note, it assumes that the DATA size
213 is a multiple of 4 so the linker file must ensure this.*/
214 ldr r1, =__textdata_base__
215 ldr r2, =__data_base__
216 ldr r3, =__data_end__
217dloop:
218 cmp r2, r3
219 bge enddloop
220 ldr r0, [r1]
221 str r0, [r2]
222 adds r1, #4
223 adds r2, #4
224 b dloop
225enddloop:
226#endif
227
228#if CRT0_INIT_BSS == TRUE
229 /* BSS initialization. Note, it assumes that the DATA size
230 is a multiple of 4 so the linker file must ensure this.*/
231 movs r0, #0
232 ldr r1, =__bss_base__
233 ldr r2, =__bss_end__
234bloop:
235 cmp r1, r2
236 bge endbloop
237 str r0, [r1]
238 adds r1, #4
239 b bloop
240endbloop:
241#endif
242
243#if CRT0_INIT_RAM_AREAS == TRUE
244 /* RAM areas initialization.*/
245 bl __init_ram_areas
246#endif
247
248 /* Late initialization..*/
249 bl __late_init
250
251#if CRT0_CALL_CONSTRUCTORS == TRUE
252 /* Constructors invocation.*/
253 ldr r4, =__init_array_base__
254 ldr r5, =__init_array_end__
255initloop:
256 cmp r4, r5
257 bge endinitloop
258 ldr r1, [r4]
259 blx r1
260 adds r4, #4
261 b initloop
262endinitloop:
263#endif
264
265 /* Main program invocation, r0 contains the returned value.*/
266 bl main
267
268#if CRT0_CALL_DESTRUCTORS == TRUE
269 /* Destructors invocation.*/
270 ldr r4, =__fini_array_base__
271 ldr r5, =__fini_array_end__
272finiloop:
273 cmp r4, r5
274 bge endfiniloop
275 ldr r1, [r4]
276 blx r1
277 adds r4, #4
278 b finiloop
279endfiniloop:
280#endif
281
282 /* Branching to the defined exit handler.*/
283 ldr r1, =__default_exit
284 bx r1
285
286#endif
287
288/** @} */
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/crt0_v7m.S b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/crt0_v7m.S
new file mode 100644
index 000000000..c4dad6024
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/crt0_v7m.S
@@ -0,0 +1,350 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/**
18 * @file crt0_v7m.S
19 * @brief Generic ARMv7-M (Cortex-M3/M4/M7) startup file for ChibiOS.
20 *
21 * @addtogroup ARMCMx_GCC_STARTUP_V7M
22 * @{
23 */
24
25/*===========================================================================*/
26/* Module constants. */
27/*===========================================================================*/
28
29#if !defined(FALSE) || defined(__DOXYGEN__)
30#define FALSE 0
31#endif
32
33#if !defined(TRUE) || defined(__DOXYGEN__)
34#define TRUE 1
35#endif
36
37#define CONTROL_MODE_PRIVILEGED 0
38#define CONTROL_MODE_UNPRIVILEGED 1
39#define CONTROL_USE_MSP 0
40#define CONTROL_USE_PSP 2
41#define CONTROL_FPCA 4
42
43#define FPCCR_ASPEN (1 << 31)
44#define FPCCR_LSPEN (1 << 30)
45
46#define SCB_VTOR 0xE000ED08
47#define SCB_CPACR 0xE000ED88
48#define SCB_FPCCR 0xE000EF34
49#define SCB_FPDSCR 0xE000EF3C
50
51/*===========================================================================*/
52/* Module pre-compile time settings. */
53/*===========================================================================*/
54
55/**
56 * @brief Enforces initialization of MSP.
57 * @note This is required if the boot process is not reliable for whatever
58 * reason (bad ROMs, bad bootloaders, bad debuggers=.
59 */
60#if !defined(CRT0_FORCE_MSP_INIT) || defined(__DOXYGEN__)
61#define CRT0_FORCE_MSP_INIT TRUE
62#endif
63
64/**
65 * @brief VTOR special register initialization.
66 * @details VTOR is initialized to point to the vectors table.
67 */
68#if !defined(CRT0_VTOR_INIT) || defined(__DOXYGEN__)
69#define CRT0_VTOR_INIT TRUE
70#endif
71
72/**
73 * @brief FPU initialization switch.
74 */
75#if !defined(CRT0_INIT_FPU) || defined(__DOXYGEN__)
76#if defined(CORTEX_USE_FPU) || defined(__DOXYGEN__)
77#define CRT0_INIT_FPU CORTEX_USE_FPU
78#else
79#define CRT0_INIT_FPU FALSE
80#endif
81#endif
82
83/**
84 * @brief Control special register initialization value.
85 * @details The system is setup to run in privileged mode using the PSP
86 * stack (dual stack mode).
87 */
88#if !defined(CRT0_CONTROL_INIT) || defined(__DOXYGEN__)
89#define CRT0_CONTROL_INIT (CONTROL_USE_PSP | \
90 CONTROL_MODE_PRIVILEGED)
91#endif
92
93/**
94 * @brief Core initialization switch.
95 */
96#if !defined(CRT0_INIT_CORE) || defined(__DOXYGEN__)
97#define CRT0_INIT_CORE TRUE
98#endif
99
100/**
101 * @brief Stack segments initialization switch.
102 */
103#if !defined(CRT0_STACKS_FILL_PATTERN) || defined(__DOXYGEN__)
104#define CRT0_STACKS_FILL_PATTERN 0x55555555
105#endif
106
107/**
108 * @brief Stack segments initialization switch.
109 */
110#if !defined(CRT0_INIT_STACKS) || defined(__DOXYGEN__)
111#define CRT0_INIT_STACKS TRUE
112#endif
113
114/**
115 * @brief DATA segment initialization switch.
116 */
117#if !defined(CRT0_INIT_DATA) || defined(__DOXYGEN__)
118#define CRT0_INIT_DATA TRUE
119#endif
120
121/**
122 * @brief BSS segment initialization switch.
123 */
124#if !defined(CRT0_INIT_BSS) || defined(__DOXYGEN__)
125#define CRT0_INIT_BSS TRUE
126#endif
127
128/**
129 * @brief RAM areas initialization switch.
130 */
131#if !defined(CRT0_INIT_RAM_AREAS) || defined(__DOXYGEN__)
132#define CRT0_INIT_RAM_AREAS TRUE
133#endif
134
135/**
136 * @brief Constructors invocation switch.
137 */
138#if !defined(CRT0_CALL_CONSTRUCTORS) || defined(__DOXYGEN__)
139#define CRT0_CALL_CONSTRUCTORS TRUE
140#endif
141
142/**
143 * @brief Destructors invocation switch.
144 */
145#if !defined(CRT0_CALL_DESTRUCTORS) || defined(__DOXYGEN__)
146#define CRT0_CALL_DESTRUCTORS TRUE
147#endif
148
149/**
150 * @brief FPU FPCCR register initialization value.
151 * @note Only used if @p CRT0_INIT_FPU is equal to @p TRUE.
152 */
153#if !defined(CRT0_FPCCR_INIT) || defined(__DOXYGEN__)
154#define CRT0_FPCCR_INIT (FPCCR_ASPEN | FPCCR_LSPEN)
155#endif
156
157/**
158 * @brief CPACR register initialization value.
159 * @note Only used if @p CRT0_INIT_FPU is equal to @p TRUE.
160 */
161#if !defined(CRT0_CPACR_INIT) || defined(__DOXYGEN__)
162#define CRT0_CPACR_INIT 0x00F00000
163#endif
164
165/*===========================================================================*/
166/* Code section. */
167/*===========================================================================*/
168
169#if !defined(__DOXYGEN__)
170
171 .syntax unified
172 .cpu cortex-m3
173#if CRT0_INIT_FPU == TRUE
174 .fpu fpv4-sp-d16
175#else
176 .fpu softvfp
177#endif
178
179 .thumb
180 .text
181
182/*
183 * CRT0 entry point.
184 */
185 .align 2
186 .thumb_func
187 .global _crt0_entry
188_crt0_entry:
189 /* Interrupts are globally masked initially.*/
190 cpsid i
191
192#if CRT0_FORCE_MSP_INIT == TRUE
193 /* MSP stack pointers initialization.*/
194 ldr r0, =__main_stack_end__
195 msr MSP, r0
196#endif
197
198 /* PSP stack pointers initialization.*/
199 ldr r0, =__process_stack_end__
200 msr PSP, r0
201
202#if CRT0_VTOR_INIT == TRUE
203 ldr r0, =_vectors
204 movw r1, #SCB_VTOR & 0xFFFF
205 movt r1, #SCB_VTOR >> 16
206 str r0, [r1]
207#endif
208
209#if CRT0_INIT_FPU == TRUE
210 /* FPU FPCCR initialization.*/
211 movw r0, #CRT0_FPCCR_INIT & 0xFFFF
212 movt r0, #CRT0_FPCCR_INIT >> 16
213 movw r1, #SCB_FPCCR & 0xFFFF
214 movt r1, #SCB_FPCCR >> 16
215 str r0, [r1]
216 dsb
217 isb
218
219 /* CPACR initialization.*/
220 movw r0, #CRT0_CPACR_INIT & 0xFFFF
221 movt r0, #CRT0_CPACR_INIT >> 16
222 movw r1, #SCB_CPACR & 0xFFFF
223 movt r1, #SCB_CPACR >> 16
224 str r0, [r1]
225 dsb
226 isb
227
228 /* FPU FPSCR initially cleared.*/
229 mov r0, #0
230 vmsr FPSCR, r0
231
232 /* FPU FPDSCR initially cleared.*/
233 movw r1, #SCB_FPDSCR & 0xFFFF
234 movt r1, #SCB_FPDSCR >> 16
235 str r0, [r1]
236
237 /* Enforcing FPCA bit in the CONTROL register.*/
238 movs r0, #CRT0_CONTROL_INIT | CONTROL_FPCA
239
240#else
241 movs r0, #CRT0_CONTROL_INIT
242#endif
243
244 /* CONTROL register initialization as configured.*/
245 msr CONTROL, r0
246 isb
247
248#if CRT0_INIT_CORE == TRUE
249 /* Core initialization.*/
250 bl __core_init
251#endif
252
253 /* Early initialization.*/
254 bl __early_init
255
256#if CRT0_INIT_STACKS == TRUE
257 ldr r0, =CRT0_STACKS_FILL_PATTERN
258 /* Main Stack initialization. Note, it assumes that the
259 stack size is a multiple of 4 so the linker file must
260 ensure this.*/
261 ldr r1, =__main_stack_base__
262 ldr r2, =__main_stack_end__
263msloop:
264 cmp r1, r2
265 itt lo
266 strlo r0, [r1], #4
267 blo msloop
268
269 /* Process Stack initialization. Note, it assumes that the
270 stack size is a multiple of 4 so the linker file must
271 ensure this.*/
272 ldr r1, =__process_stack_base__
273 ldr r2, =__process_stack_end__
274psloop:
275 cmp r1, r2
276 itt lo
277 strlo r0, [r1], #4
278 blo psloop
279#endif
280
281#if CRT0_INIT_DATA == TRUE
282 /* Data initialization. Note, it assumes that the DATA size
283 is a multiple of 4 so the linker file must ensure this.*/
284 ldr r1, =__textdata_base__
285 ldr r2, =__data_base__
286 ldr r3, =__data_end__
287dloop:
288 cmp r2, r3
289 ittt lo
290 ldrlo r0, [r1], #4
291 strlo r0, [r2], #4
292 blo dloop
293#endif
294
295#if CRT0_INIT_BSS == TRUE
296 /* BSS initialization. Note, it assumes that the DATA size
297 is a multiple of 4 so the linker file must ensure this.*/
298 movs r0, #0
299 ldr r1, =__bss_base__
300 ldr r2, =__bss_end__
301bloop:
302 cmp r1, r2
303 itt lo
304 strlo r0, [r1], #4
305 blo bloop
306#endif
307
308#if CRT0_INIT_RAM_AREAS == TRUE
309 /* RAM areas initialization.*/
310 bl __init_ram_areas
311#endif
312
313 /* Late initialization..*/
314 bl __late_init
315
316#if CRT0_CALL_CONSTRUCTORS == TRUE
317 /* Constructors invocation.*/
318 ldr r4, =__init_array_base__
319 ldr r5, =__init_array_end__
320initloop:
321 cmp r4, r5
322 bge endinitloop
323 ldr r1, [r4], #4
324 blx r1
325 b initloop
326endinitloop:
327#endif
328
329 /* Main program invocation, r0 contains the returned value.*/
330 bl main
331
332#if CRT0_CALL_DESTRUCTORS == TRUE
333 /* Destructors invocation.*/
334 ldr r4, =__fini_array_base__
335 ldr r5, =__fini_array_end__
336finiloop:
337 cmp r4, r5
338 bge endfiniloop
339 ldr r1, [r4], #4
340 blx r1
341 b finiloop
342endfiniloop:
343#endif
344
345 /* Branching to the defined exit handler.*/
346 b __default_exit
347
348#endif /* !defined(__DOXYGEN__) */
349
350/** @} */
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/crt1.c b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/crt1.c
new file mode 100644
index 000000000..db1a831d7
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/crt1.c
@@ -0,0 +1,219 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/**
18 * @file ARMCMx/compilers/GCC/crt1.c
19 * @brief Startup stub functions.
20 *
21 * @addtogroup ARMCMx_GCC_STARTUP
22 * @{
23 */
24
25#include <stdint.h>
26#include <stdbool.h>
27
28#include "cmparams.h"
29
30/*===========================================================================*/
31/* Module local definitions. */
32/*===========================================================================*/
33
34#if !defined(CRT1_AREAS_NUMBER) || defined(__DOXYGEN__)
35#define CRT1_AREAS_NUMBER 8
36#endif
37
38#if (CRT1_AREAS_NUMBER < 0) || (CRT1_AREAS_NUMBER > 8)
39#error "CRT1_AREAS_NUMBER must be within 0 and 8"
40#endif
41
42/*===========================================================================*/
43/* Module exported variables. */
44/*===========================================================================*/
45
46/*===========================================================================*/
47/* Module local types. */
48/*===========================================================================*/
49
50/**
51 * @brief Type of an area to be initialized.
52 */
53typedef struct {
54 uint32_t *init_text_area;
55 uint32_t *init_area;
56 uint32_t *clear_area;
57 uint32_t *no_init_area;
58} ram_init_area_t;
59
60/*===========================================================================*/
61/* Module local variables. */
62/*===========================================================================*/
63
64#if (CRT1_AREAS_NUMBER > 0) || defined(__DOXYGEN__)
65extern uint32_t __ram0_init_text__, __ram0_init__, __ram0_clear__, __ram0_noinit__;
66#endif
67#if (CRT1_AREAS_NUMBER > 1) || defined(__DOXYGEN__)
68extern uint32_t __ram1_init_text__, __ram1_init__, __ram1_clear__, __ram1_noinit__;
69#endif
70#if (CRT1_AREAS_NUMBER > 2) || defined(__DOXYGEN__)
71extern uint32_t __ram2_init_text__, __ram2_init__, __ram2_clear__, __ram2_noinit__;
72#endif
73#if (CRT1_AREAS_NUMBER > 3) || defined(__DOXYGEN__)
74extern uint32_t __ram3_init_text__, __ram3_init__, __ram3_clear__, __ram3_noinit__;
75#endif
76#if (CRT1_AREAS_NUMBER > 4) || defined(__DOXYGEN__)
77extern uint32_t __ram4_init_text__, __ram4_init__, __ram4_clear__, __ram4_noinit__;
78#endif
79#if (CRT1_AREAS_NUMBER > 5) || defined(__DOXYGEN__)
80extern uint32_t __ram5_init_text__, __ram5_init__, __ram5_clear__, __ram5_noinit__;
81#endif
82#if (CRT1_AREAS_NUMBER > 6) || defined(__DOXYGEN__)
83extern uint32_t __ram6_init_text__, __ram6_init__, __ram6_clear__, __ram6_noinit__;
84#endif
85#if (CRT1_AREAS_NUMBER > 7) || defined(__DOXYGEN__)
86extern uint32_t __ram7_init_text__, __ram7_init__, __ram7_clear__, __ram7_noinit__;
87#endif
88
89/**
90 * @brief Static table of areas to be initialized.
91 */
92#if (CRT1_AREAS_NUMBER > 0) || defined(__DOXYGEN__)
93static const ram_init_area_t ram_areas[CRT1_AREAS_NUMBER] = {
94 {&__ram0_init_text__, &__ram0_init__, &__ram0_clear__, &__ram0_noinit__},
95#if (CRT1_AREAS_NUMBER > 1) || defined(__DOXYGEN__)
96 {&__ram1_init_text__, &__ram1_init__, &__ram1_clear__, &__ram1_noinit__},
97#endif
98#if (CRT1_AREAS_NUMBER > 2) || defined(__DOXYGEN__)
99 {&__ram2_init_text__, &__ram2_init__, &__ram2_clear__, &__ram2_noinit__},
100#endif
101#if (CRT1_AREAS_NUMBER > 3) || defined(__DOXYGEN__)
102 {&__ram3_init_text__, &__ram3_init__, &__ram3_clear__, &__ram3_noinit__},
103#endif
104#if (CRT1_AREAS_NUMBER > 4) || defined(__DOXYGEN__)
105 {&__ram4_init_text__, &__ram4_init__, &__ram4_clear__, &__ram4_noinit__},
106#endif
107#if (CRT1_AREAS_NUMBER > 5) || defined(__DOXYGEN__)
108 {&__ram5_init_text__, &__ram5_init__, &__ram5_clear__, &__ram5_noinit__},
109#endif
110#if (CRT1_AREAS_NUMBER > 6) || defined(__DOXYGEN__)
111 {&__ram6_init_text__, &__ram6_init__, &__ram6_clear__, &__ram6_noinit__},
112#endif
113#if (CRT1_AREAS_NUMBER > 7) || defined(__DOXYGEN__)
114 {&__ram7_init_text__, &__ram7_init__, &__ram7_clear__, &__ram7_noinit__},
115#endif
116};
117#endif
118
119/*===========================================================================*/
120/* Module local functions. */
121/*===========================================================================*/
122
123/*===========================================================================*/
124/* Module exported functions. */
125/*===========================================================================*/
126
127/**
128 * @brief Architecture-dependent core initialization.
129 * @details This hook is invoked immediately after the stack initialization
130 * and before the DATA and BSS segments initialization.
131 * @note This function is a weak symbol.
132 */
133#if !defined(__DOXYGEN__)
134__attribute__((weak))
135#endif
136/*lint -save -e9075 [8.4] All symbols are invoked from asm context.*/
137void __core_init(void) {
138
139#if CORTEX_MODEL == 7
140 SCB_EnableICache();
141 SCB_EnableDCache();
142#endif
143}
144
145/**
146 * @brief Early initialization.
147 * @details This hook is invoked immediately after the stack and core
148 * initialization and before the DATA and BSS segments
149 * initialization.
150 * @note This function is a weak symbol.
151 */
152#if !defined(__DOXYGEN__)
153__attribute__((weak))
154#endif
155/*lint -save -e9075 [8.4] All symbols are invoked from asm context.*/
156void __early_init(void) {}
157/*lint -restore*/
158
159/**
160 * @brief Late initialization.
161 * @details This hook is invoked after the DATA and BSS segments
162 * initialization and before any static constructor. The
163 * default behavior is to do nothing.
164 * @note This function is a weak symbol.
165 */
166#if !defined(__DOXYGEN__)
167__attribute__((weak))
168#endif
169/*lint -save -e9075 [8.4] All symbols are invoked from asm context.*/
170void __late_init(void) {}
171/*lint -restore*/
172
173/**
174 * @brief Default @p main() function exit handler.
175 * @details This handler is invoked or the @p main() function exit. The
176 * default behavior is to enter an infinite loop.
177 * @note This function is a weak symbol.
178 */
179#if !defined(__DOXYGEN__)
180__attribute__((noreturn, weak))
181#endif
182/*lint -save -e9075 [8.4] All symbols are invoked from asm context.*/
183void __default_exit(void) {
184/*lint -restore*/
185
186 while (true) {
187 }
188}
189
190/**
191 * @brief Performs the initialization of the various RAM areas.
192 */
193void __init_ram_areas(void) {
194#if CRT1_AREAS_NUMBER > 0
195 const ram_init_area_t *rap = ram_areas;
196
197 do {
198 uint32_t *tp = rap->init_text_area;
199 uint32_t *p = rap->init_area;
200
201 /* Copying initialization data.*/
202 while (p < rap->clear_area) {
203 *p = *tp;
204 p++;
205 tp++;
206 }
207
208 /* Zeroing clear area.*/
209 while (p < rap->no_init_area) {
210 *p = 0;
211 p++;
212 }
213 rap++;
214 }
215 while (rap < &ram_areas[CRT1_AREAS_NUMBER]);
216#endif
217}
218
219/** @} */
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/ADUCM360.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/ADUCM360.ld
new file mode 100644
index 000000000..89a1b8aa0
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/ADUCM360.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * ADUCM360 memory setup.
19 * Note: Use of ram1 and ram2 is mutually exclusive with use of ram0.
20 */
21MEMORY
22{
23 flash0 (rx) : org = 0x00000000, len = 128k /* On-chip Flash/EE */
24 flash1 (rx) : org = 0x00000000, len = 0
25 flash2 (rx) : org = 0x00000000, len = 0
26 flash3 (rx) : org = 0x00000000, len = 0
27 flash4 (rx) : org = 0x00000000, len = 0
28 flash5 (rx) : org = 0x00000000, len = 0
29 flash6 (rx) : org = 0x00000000, len = 0
30 flash7 (rx) : org = 0x00000000, len = 0
31 ram0 (wx) : org = 0x20000000, len = 8k /* SRAM */
32 ram1 (wx) : org = 0x00000000, len = 0
33 ram2 (wx) : org = 0x00000000, len = 0
34 ram3 (wx) : org = 0x00000000, len = 0
35 ram4 (wx) : org = 0x00000000, len = 0
36 ram5 (wx) : org = 0x00000000, len = 0
37 ram6 (wx) : org = 0x00000000, len = 0
38 ram7 (wx) : org = 0x00000000, len = 0}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/ADUCM410.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/ADUCM410.ld
new file mode 100644
index 000000000..ce46ad8e3
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/ADUCM410.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * ADUCM410 memory setup.
19 * Note: Use of ram1 and ram2 is mutually exclusive with use of ram0.
20 */
21MEMORY
22{
23 flash0 (rx) : org = 0x00000000, len = 512k /* Flash Block 0 */
24 flash1 (rx) : org = 0x00080000, len = 512k /* Flash Block 1 */
25 flash2 (rx) : org = 0x00000000, len = 0
26 flash3 (rx) : org = 0x00000000, len = 0
27 flash4 (rx) : org = 0x00000000, len = 0
28 flash5 (rx) : org = 0x00000000, len = 0
29 flash6 (rx) : org = 0x00000000, len = 0
30 flash7 (rx) : org = 0x00000000, len = 0
31 ram0 (wx) : org = 0x20000000, len = 128k /* SRAM with ECC */
32 ram1 (wx) : org = 0x00000000, len = 0
33 ram2 (wx) : org = 0x00000000, len = 0
34 ram3 (wx) : org = 0x00000000, len = 0
35 ram4 (wx) : org = 0x00000000, len = 0
36 ram5 (wx) : org = 0x00000000, len = 0
37 ram6 (wx) : org = 0x00000000, len = 0
38 ram7 (wx) : org = 0x00000000, len = 0}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F030x4.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F030x4.ld
new file mode 100644
index 000000000..fa86926c8
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F030x4.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F030x4 memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 16k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 4k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F030x6.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F030x6.ld
new file mode 100644
index 000000000..15970a8f4
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F030x6.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F030x6 memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 32k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 4k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F030x8.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F030x8.ld
new file mode 100644
index 000000000..9f848a7dc
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F030x8.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F030x8 memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 64k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 8k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F031x6.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F031x6.ld
new file mode 100644
index 000000000..7b4882163
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F031x6.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F031x6 memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 32k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 4k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F042x6.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F042x6.ld
new file mode 100644
index 000000000..c6ce20d70
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F042x6.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F042x6 memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 32k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 6k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F051x8.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F051x8.ld
new file mode 100644
index 000000000..5deda7a36
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F051x8.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F051x8 memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 64k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 8k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F070x6.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F070x6.ld
new file mode 100644
index 000000000..50ba06d7b
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F070x6.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F070x6 memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 32k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 6k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F070xB.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F070xB.ld
new file mode 100644
index 000000000..e8d6d9487
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F070xB.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F070xB memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 128k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 16k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F072xB.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F072xB.ld
new file mode 100644
index 000000000..e5ac40370
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F072xB.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F072xB memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 128k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 16k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F091xC.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F091xC.ld
new file mode 100644
index 000000000..b40a68b57
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F091xC.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F091xC memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 256k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 32k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F100xB.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F100xB.ld
new file mode 100644
index 000000000..e35d78a82
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F100xB.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * ST32F100xB memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 128k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 8k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F103x8.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F103x8.ld
new file mode 100644
index 000000000..5744a442f
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F103x8.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * ST32F103x8 memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 64k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 20k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F103xB.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F103xB.ld
new file mode 100644
index 000000000..02f98166c
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F103xB.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * ST32F103xB memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 128k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 20k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F103xB_maplemini_bootloader.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F103xB_maplemini_bootloader.ld
new file mode 100644
index 000000000..2a601aa14
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F103xB_maplemini_bootloader.ld
@@ -0,0 +1,88 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * ST32F103xB memory setup for use with the maplemini bootloader.
19 * You will have to
20 * #define CORTEX_VTOR_INIT 0x5000
21 * in your projects chconf.h
22 */
23MEMORY
24{
25 flash0 (rx) : org = 0x08005000, len = 128k - 0x5000
26 flash1 (rx) : org = 0x00000000, len = 0
27 flash2 (rx) : org = 0x00000000, len = 0
28 flash3 (rx) : org = 0x00000000, len = 0
29 flash4 (rx) : org = 0x00000000, len = 0
30 flash5 (rx) : org = 0x00000000, len = 0
31 flash6 (rx) : org = 0x00000000, len = 0
32 flash7 (rx) : org = 0x00000000, len = 0
33 ram0 (wx) : org = 0x20000C00, len = 20k - 0xC00
34 ram1 (wx) : org = 0x00000000, len = 0
35 ram2 (wx) : org = 0x00000000, len = 0
36 ram3 (wx) : org = 0x00000000, len = 0
37 ram4 (wx) : org = 0x00000000, len = 0
38 ram5 (wx) : org = 0x00000000, len = 0
39 ram6 (wx) : org = 0x00000000, len = 0
40 ram7 (wx) : org = 0x00000000, len = 0
41}
42
43/* For each data/text section two region are defined, a virtual region
44 and a load region (_LMA suffix).*/
45
46/* Flash region to be used for exception vectors.*/
47REGION_ALIAS("VECTORS_FLASH", flash0);
48REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
49
50/* Flash region to be used for constructors and destructors.*/
51REGION_ALIAS("XTORS_FLASH", flash0);
52REGION_ALIAS("XTORS_FLASH_LMA", flash0);
53
54/* Flash region to be used for code text.*/
55REGION_ALIAS("TEXT_FLASH", flash0);
56REGION_ALIAS("TEXT_FLASH_LMA", flash0);
57
58/* Flash region to be used for read only data.*/
59REGION_ALIAS("RODATA_FLASH", flash0);
60REGION_ALIAS("RODATA_FLASH_LMA", flash0);
61
62/* Flash region to be used for various.*/
63REGION_ALIAS("VARIOUS_FLASH", flash0);
64REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
65
66/* Flash region to be used for RAM(n) initialization data.*/
67REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
68
69/* RAM region to be used for Main stack. This stack accommodates the processing
70 of all exceptions and interrupts.*/
71REGION_ALIAS("MAIN_STACK_RAM", ram0);
72
73/* RAM region to be used for the process stack. This is the stack used by
74 the main() function.*/
75REGION_ALIAS("PROCESS_STACK_RAM", ram0);
76
77/* RAM region to be used for data segment.*/
78REGION_ALIAS("DATA_RAM", ram0);
79REGION_ALIAS("DATA_RAM_LMA", flash0);
80
81/* RAM region to be used for BSS segment.*/
82REGION_ALIAS("BSS_RAM", ram0);
83
84/* RAM region to be used for the default heap.*/
85REGION_ALIAS("HEAP_RAM", ram0);
86
87/* Generic rules inclusion.*/
88INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F103xD.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F103xD.ld
new file mode 100644
index 000000000..6a89a69e3
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F103xD.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * ST32F103xE memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 384k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 64k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F103xE.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F103xE.ld
new file mode 100644
index 000000000..529c9911e
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F103xE.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * ST32F103xE memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 512k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 64k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F103xG.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F103xG.ld
new file mode 100644
index 000000000..ba7b7f52d
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F103xG.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * ST32F103xG memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 1M
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 96k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F107xC.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F107xC.ld
new file mode 100644
index 000000000..850ddccd8
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F107xC.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * ST32F107xC memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 256k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 64k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F207xG.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F207xG.ld
new file mode 100644
index 000000000..304459083
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F207xG.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F207xG memory setup.
19 * Note: Use of ram1 and ram2 is mutually exclusive with use of ram0.
20 */
21MEMORY
22{
23 flash0 (rx) : org = 0x08000000, len = 1M
24 flash1 (rx) : org = 0x00000000, len = 0
25 flash2 (rx) : org = 0x00000000, len = 0
26 flash3 (rx) : org = 0x00000000, len = 0
27 flash4 (rx) : org = 0x00000000, len = 0
28 flash5 (rx) : org = 0x00000000, len = 0
29 flash6 (rx) : org = 0x00000000, len = 0
30 flash7 (rx) : org = 0x00000000, len = 0
31 ram0 (wx) : org = 0x20000000, len = 128k /* SRAM1 + SRAM2 */
32 ram1 (wx) : org = 0x20000000, len = 112k /* SRAM1 */
33 ram2 (wx) : org = 0x2001C000, len = 16k /* SRAM2 */
34 ram3 (wx) : org = 0x00000000, len = 0
35 ram4 (wx) : org = 0x10000000, len = 64k /* CCM SRAM */
36 ram5 (wx) : org = 0x40024000, len = 4k /* BCKP SRAM */
37 ram6 (wx) : org = 0x00000000, len = 0
38 ram7 (wx) : org = 0x00000000, len = 0}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F302x8.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F302x8.ld
new file mode 100644
index 000000000..18f0a8e50
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F302x8.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F302x8 memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 64k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 16k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F303x8.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F303x8.ld
new file mode 100644
index 000000000..e696f4451
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F303x8.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F303x8 memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 64k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 12k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x10000000, len = 4k
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F303xC.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F303xC.ld
new file mode 100644
index 000000000..9b3ec6520
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F303xC.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F303xC memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 256k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 40k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x10000000, len = 8k
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F303xE.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F303xE.ld
new file mode 100644
index 000000000..2e45c50b2
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F303xE.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F303xE memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 512k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 64k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x10000000, len = 16k
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F334x8.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F334x8.ld
new file mode 100644
index 000000000..d0dc22390
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F334x8.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F3334x8 memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 64k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 12k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x10000000, len = 4k
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F373xC.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F373xC.ld
new file mode 100644
index 000000000..a6b4ef540
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F373xC.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F303xC memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 256k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 32k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F401xC.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F401xC.ld
new file mode 100644
index 000000000..6a38adbb9
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F401xC.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F401xC memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 256k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 64k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F401xE.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F401xE.ld
new file mode 100644
index 000000000..dbab7248d
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F401xE.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F401xE memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 512k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 96k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F405xG.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F405xG.ld
new file mode 100644
index 000000000..7562badcd
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F405xG.ld
@@ -0,0 +1,86 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F405xG memory setup.
19 * Note: Use of ram1 and ram2 is mutually exclusive with use of ram0.
20 */
21MEMORY
22{
23 flash0 (rx) : org = 0x08000000, len = 1M
24 flash1 (rx) : org = 0x00000000, len = 0
25 flash2 (rx) : org = 0x00000000, len = 0
26 flash3 (rx) : org = 0x00000000, len = 0
27 flash4 (rx) : org = 0x00000000, len = 0
28 flash5 (rx) : org = 0x00000000, len = 0
29 flash6 (rx) : org = 0x00000000, len = 0
30 flash7 (rx) : org = 0x00000000, len = 0
31 ram0 (wx) : org = 0x20000000, len = 128k /* SRAM1 + SRAM2 */
32 ram1 (wx) : org = 0x20000000, len = 112k /* SRAM1 */
33 ram2 (wx) : org = 0x2001C000, len = 16k /* SRAM2 */
34 ram3 (wx) : org = 0x00000000, len = 0
35 ram4 (wx) : org = 0x10000000, len = 64k /* CCM SRAM */
36 ram5 (wx) : org = 0x40024000, len = 4k /* BCKP SRAM */
37 ram6 (wx) : org = 0x00000000, len = 0
38 ram7 (wx) : org = 0x00000000, len = 0
39}
40
41/* For each data/text section two region are defined, a virtual region
42 and a load region (_LMA suffix).*/
43
44/* Flash region to be used for exception vectors.*/
45REGION_ALIAS("VECTORS_FLASH", flash0);
46REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
47
48/* Flash region to be used for constructors and destructors.*/
49REGION_ALIAS("XTORS_FLASH", flash0);
50REGION_ALIAS("XTORS_FLASH_LMA", flash0);
51
52/* Flash region to be used for code text.*/
53REGION_ALIAS("TEXT_FLASH", flash0);
54REGION_ALIAS("TEXT_FLASH_LMA", flash0);
55
56/* Flash region to be used for read only data.*/
57REGION_ALIAS("RODATA_FLASH", flash0);
58REGION_ALIAS("RODATA_FLASH_LMA", flash0);
59
60/* Flash region to be used for various.*/
61REGION_ALIAS("VARIOUS_FLASH", flash0);
62REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
63
64/* Flash region to be used for RAM(n) initialization data.*/
65REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
66
67/* RAM region to be used for Main stack. This stack accommodates the processing
68 of all exceptions and interrupts.*/
69REGION_ALIAS("MAIN_STACK_RAM", ram0);
70
71/* RAM region to be used for the process stack. This is the stack used by
72 the main() function.*/
73REGION_ALIAS("PROCESS_STACK_RAM", ram0);
74
75/* RAM region to be used for data segment.*/
76REGION_ALIAS("DATA_RAM", ram0);
77REGION_ALIAS("DATA_RAM_LMA", flash0);
78
79/* RAM region to be used for BSS segment.*/
80REGION_ALIAS("BSS_RAM", ram0);
81
82/* RAM region to be used for the default heap.*/
83REGION_ALIAS("HEAP_RAM", ram0);
84
85/* Generic rules inclusion.*/
86INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F407xE.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F407xE.ld
new file mode 100644
index 000000000..ae5f7e78d
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F407xE.ld
@@ -0,0 +1,86 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F407xE memory setup.
19 * Note: Use of ram1 and ram2 is mutually exclusive with use of ram0.
20 */
21MEMORY
22{
23 flash0 (rx) : org = 0x08000000, len = 512k
24 flash1 (rx) : org = 0x00000000, len = 0
25 flash2 (rx) : org = 0x00000000, len = 0
26 flash3 (rx) : org = 0x00000000, len = 0
27 flash4 (rx) : org = 0x00000000, len = 0
28 flash5 (rx) : org = 0x00000000, len = 0
29 flash6 (rx) : org = 0x00000000, len = 0
30 flash7 (rx) : org = 0x00000000, len = 0
31 ram0 (wx) : org = 0x20000000, len = 128k /* SRAM1 + SRAM2 */
32 ram1 (wx) : org = 0x20000000, len = 112k /* SRAM1 */
33 ram2 (wx) : org = 0x2001C000, len = 16k /* SRAM2 */
34 ram3 (wx) : org = 0x00000000, len = 0
35 ram4 (wx) : org = 0x10000000, len = 64k /* CCM SRAM */
36 ram5 (wx) : org = 0x40024000, len = 4k /* BCKP SRAM */
37 ram6 (wx) : org = 0x00000000, len = 0
38 ram7 (wx) : org = 0x00000000, len = 0
39}
40
41/* For each data/text section two region are defined, a virtual region
42 and a load region (_LMA suffix).*/
43
44/* Flash region to be used for exception vectors.*/
45REGION_ALIAS("VECTORS_FLASH", flash0);
46REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
47
48/* Flash region to be used for constructors and destructors.*/
49REGION_ALIAS("XTORS_FLASH", flash0);
50REGION_ALIAS("XTORS_FLASH_LMA", flash0);
51
52/* Flash region to be used for code text.*/
53REGION_ALIAS("TEXT_FLASH", flash0);
54REGION_ALIAS("TEXT_FLASH_LMA", flash0);
55
56/* Flash region to be used for read only data.*/
57REGION_ALIAS("RODATA_FLASH", flash0);
58REGION_ALIAS("RODATA_FLASH_LMA", flash0);
59
60/* Flash region to be used for various.*/
61REGION_ALIAS("VARIOUS_FLASH", flash0);
62REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
63
64/* Flash region to be used for RAM(n) initialization data.*/
65REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
66
67/* RAM region to be used for Main stack. This stack accommodates the processing
68 of all exceptions and interrupts.*/
69REGION_ALIAS("MAIN_STACK_RAM", ram0);
70
71/* RAM region to be used for the process stack. This is the stack used by
72 the main() function.*/
73REGION_ALIAS("PROCESS_STACK_RAM", ram0);
74
75/* RAM region to be used for data segment.*/
76REGION_ALIAS("DATA_RAM", ram0);
77REGION_ALIAS("DATA_RAM_LMA", flash0);
78
79/* RAM region to be used for BSS segment.*/
80REGION_ALIAS("BSS_RAM", ram0);
81
82/* RAM region to be used for the default heap.*/
83REGION_ALIAS("HEAP_RAM", ram0);
84
85/* Generic rules inclusion.*/
86INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F407xG.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F407xG.ld
new file mode 100644
index 000000000..5fe3e106a
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F407xG.ld
@@ -0,0 +1,86 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F407xG memory setup.
19 * Note: Use of ram1 and ram2 is mutually exclusive with use of ram0.
20 */
21MEMORY
22{
23 flash0 (rx) : org = 0x08000000, len = 1M
24 flash1 (rx) : org = 0x00000000, len = 0
25 flash2 (rx) : org = 0x00000000, len = 0
26 flash3 (rx) : org = 0x00000000, len = 0
27 flash4 (rx) : org = 0x00000000, len = 0
28 flash5 (rx) : org = 0x00000000, len = 0
29 flash6 (rx) : org = 0x00000000, len = 0
30 flash7 (rx) : org = 0x00000000, len = 0
31 ram0 (wx) : org = 0x20000000, len = 128k /* SRAM1 + SRAM2 */
32 ram1 (wx) : org = 0x20000000, len = 112k /* SRAM1 */
33 ram2 (wx) : org = 0x2001C000, len = 16k /* SRAM2 */
34 ram3 (wx) : org = 0x00000000, len = 0
35 ram4 (wx) : org = 0x10000000, len = 64k /* CCM SRAM */
36 ram5 (wx) : org = 0x40024000, len = 4k /* BCKP SRAM */
37 ram6 (wx) : org = 0x00000000, len = 0
38 ram7 (wx) : org = 0x00000000, len = 0
39}
40
41/* For each data/text section two region are defined, a virtual region
42 and a load region (_LMA suffix).*/
43
44/* Flash region to be used for exception vectors.*/
45REGION_ALIAS("VECTORS_FLASH", flash0);
46REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
47
48/* Flash region to be used for constructors and destructors.*/
49REGION_ALIAS("XTORS_FLASH", flash0);
50REGION_ALIAS("XTORS_FLASH_LMA", flash0);
51
52/* Flash region to be used for code text.*/
53REGION_ALIAS("TEXT_FLASH", flash0);
54REGION_ALIAS("TEXT_FLASH_LMA", flash0);
55
56/* Flash region to be used for read only data.*/
57REGION_ALIAS("RODATA_FLASH", flash0);
58REGION_ALIAS("RODATA_FLASH_LMA", flash0);
59
60/* Flash region to be used for various.*/
61REGION_ALIAS("VARIOUS_FLASH", flash0);
62REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
63
64/* Flash region to be used for RAM(n) initialization data.*/
65REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
66
67/* RAM region to be used for Main stack. This stack accommodates the processing
68 of all exceptions and interrupts.*/
69REGION_ALIAS("MAIN_STACK_RAM", ram0);
70
71/* RAM region to be used for the process stack. This is the stack used by
72 the main() function.*/
73REGION_ALIAS("PROCESS_STACK_RAM", ram0);
74
75/* RAM region to be used for data segment.*/
76REGION_ALIAS("DATA_RAM", ram0);
77REGION_ALIAS("DATA_RAM_LMA", flash0);
78
79/* RAM region to be used for BSS segment.*/
80REGION_ALIAS("BSS_RAM", ram0);
81
82/* RAM region to be used for the default heap.*/
83REGION_ALIAS("HEAP_RAM", ram0);
84
85/* Generic rules inclusion.*/
86INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F410x8.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F410x8.ld
new file mode 100644
index 000000000..91fb81793
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F410x8.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F410x8 memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 64k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 32k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F410xB.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F410xB.ld
new file mode 100644
index 000000000..3c19d8dcb
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F410xB.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F410xB memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 128k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 32k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F411xC.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F411xC.ld
new file mode 100644
index 000000000..713b16879
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F411xC.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F411xC memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 256k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 128k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F411xE.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F411xE.ld
new file mode 100644
index 000000000..b015faa10
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F411xE.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F411xE memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 512k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 128k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F412xE.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F412xE.ld
new file mode 100644
index 000000000..5c99c070c
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F412xE.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F412xE memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 512k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 256k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F412xG.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F412xG.ld
new file mode 100644
index 000000000..54ce454fb
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F412xG.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F412xG memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 1M
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 256k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F413xH.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F413xH.ld
new file mode 100644
index 000000000..0060ba2fe
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F413xH.ld
@@ -0,0 +1,86 @@
1/*
2 ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F413xH memory setup.
19 * Note: Use of ram1 and ram2 is mutually exclusive with use of ram0.
20 */
21MEMORY
22{
23 flash0 (rx) : org = 0x08000000, len = 1536k /* Program memory */
24 flash1 (rx) : org = 0x1FFF7800, len = 528 /* OTP memory */
25 flash2 (rx) : org = 0x00000000, len = 0
26 flash3 (rx) : org = 0x00000000, len = 0
27 flash4 (rx) : org = 0x00000000, len = 0
28 flash5 (rx) : org = 0x00000000, len = 0
29 flash6 (rx) : org = 0x00000000, len = 0
30 flash7 (rx) : org = 0x00000000, len = 0
31 ram0 (wx) : org = 0x20000000, len = 320k /* SRAM1 + SRAM2 */
32 ram1 (wx) : org = 0x20000000, len = 256k /* SRAM1 */
33 ram2 (wx) : org = 0x20040000, len = 64k /* SRAM2 */
34 ram3 (wx) : org = 0x00000000, len = 0
35 ram4 (wx) : org = 0x10000000, len = 64k /* CCM SRAM2 */
36 ram5 (wx) : org = 0x00000000, len = 0
37 ram6 (wx) : org = 0x00000000, len = 0
38 ram7 (wx) : org = 0x00000000, len = 0
39}
40
41/* For each data/text section two region are defined, a virtual region
42 and a load region (_LMA suffix).*/
43
44/* Flash region to be used for exception vectors.*/
45REGION_ALIAS("VECTORS_FLASH", flash0);
46REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
47
48/* Flash region to be used for constructors and destructors.*/
49REGION_ALIAS("XTORS_FLASH", flash0);
50REGION_ALIAS("XTORS_FLASH_LMA", flash0);
51
52/* Flash region to be used for code text.*/
53REGION_ALIAS("TEXT_FLASH", flash0);
54REGION_ALIAS("TEXT_FLASH_LMA", flash0);
55
56/* Flash region to be used for read only data.*/
57REGION_ALIAS("RODATA_FLASH", flash0);
58REGION_ALIAS("RODATA_FLASH_LMA", flash0);
59
60/* Flash region to be used for various.*/
61REGION_ALIAS("VARIOUS_FLASH", flash0);
62REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
63
64/* Flash region to be used for RAM(n) initialization data.*/
65REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
66
67/* RAM region to be used for Main stack. This stack accommodates the processing
68 of all exceptions and interrupts.*/
69REGION_ALIAS("MAIN_STACK_RAM", ram0);
70
71/* RAM region to be used for the process stack. This is the stack used by
72 the main() function.*/
73REGION_ALIAS("PROCESS_STACK_RAM", ram0);
74
75/* RAM region to be used for data segment.*/
76REGION_ALIAS("DATA_RAM", ram0);
77REGION_ALIAS("DATA_RAM_LMA", flash0);
78
79/* RAM region to be used for BSS segment.*/
80REGION_ALIAS("BSS_RAM", ram0);
81
82/* RAM region to be used for the default heap.*/
83REGION_ALIAS("HEAP_RAM", ram0);
84
85/* Generic rules inclusion.*/
86INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F429xI.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F429xI.ld
new file mode 100644
index 000000000..f881c3cbc
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F429xI.ld
@@ -0,0 +1,86 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * ST32F429xI memory setup.
19 * Note: Use of ram1, ram2 and ram3 is mutually exclusive with use of ram0.
20 */
21MEMORY
22{
23 flash0 (rx) : org = 0x08000000, len = 1M
24 flash1 (rx) : org = 0x00000000, len = 0
25 flash2 (rx) : org = 0x00000000, len = 0
26 flash3 (rx) : org = 0x00000000, len = 0
27 flash4 (rx) : org = 0x00000000, len = 0
28 flash5 (rx) : org = 0x00000000, len = 0
29 flash6 (rx) : org = 0x00000000, len = 0
30 flash7 (rx) : org = 0x00000000, len = 0
31 ram0 (wx) : org = 0x20000000, len = 192k /* SRAM1 + SRAM2 + SRAM3 */
32 ram1 (wx) : org = 0x20000000, len = 112k /* SRAM1 */
33 ram2 (wx) : org = 0x2001C000, len = 16k /* SRAM2 */
34 ram3 (wx) : org = 0x20020000, len = 64k /* SRAM3 */
35 ram4 (wx) : org = 0x10000000, len = 64k /* CCM SRAM */
36 ram5 (wx) : org = 0x40024000, len = 4k /* BCKP SRAM */
37 ram6 (wx) : org = 0x00000000, len = 0
38 ram7 (wx) : org = 0x00000000, len = 0
39}
40
41/* For each data/text section two region are defined, a virtual region
42 and a load region (_LMA suffix).*/
43
44/* Flash region to be used for exception vectors.*/
45REGION_ALIAS("VECTORS_FLASH", flash0);
46REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
47
48/* Flash region to be used for constructors and destructors.*/
49REGION_ALIAS("XTORS_FLASH", flash0);
50REGION_ALIAS("XTORS_FLASH_LMA", flash0);
51
52/* Flash region to be used for code text.*/
53REGION_ALIAS("TEXT_FLASH", flash0);
54REGION_ALIAS("TEXT_FLASH_LMA", flash0);
55
56/* Flash region to be used for read only data.*/
57REGION_ALIAS("RODATA_FLASH", flash0);
58REGION_ALIAS("RODATA_FLASH_LMA", flash0);
59
60/* Flash region to be used for various.*/
61REGION_ALIAS("VARIOUS_FLASH", flash0);
62REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
63
64/* Flash region to be used for RAM(n) initialization data.*/
65REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
66
67/* RAM region to be used for Main stack. This stack accommodates the processing
68 of all exceptions and interrupts.*/
69REGION_ALIAS("MAIN_STACK_RAM", ram0);
70
71/* RAM region to be used for the process stack. This is the stack used by
72 the main() function.*/
73REGION_ALIAS("PROCESS_STACK_RAM", ram0);
74
75/* RAM region to be used for data segment.*/
76REGION_ALIAS("DATA_RAM", ram0);
77REGION_ALIAS("DATA_RAM_LMA", flash0);
78
79/* RAM region to be used for BSS segment.*/
80REGION_ALIAS("BSS_RAM", ram0);
81
82/* RAM region to be used for the default heap.*/
83REGION_ALIAS("HEAP_RAM", ram0);
84
85/* Generic rules inclusion.*/
86INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F446xC.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F446xC.ld
new file mode 100644
index 000000000..3ce050180
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F446xC.ld
@@ -0,0 +1,86 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * ST32F446xC memory setup.
19 * Note: Use of ram1 and ram2 is mutually exclusive with use of ram0.
20 */
21MEMORY
22{
23 flash0 (rx) : org = 0x08000000, len = 256k
24 flash1 (rx) : org = 0x00000000, len = 0
25 flash2 (rx) : org = 0x00000000, len = 0
26 flash3 (rx) : org = 0x00000000, len = 0
27 flash4 (rx) : org = 0x00000000, len = 0
28 flash5 (rx) : org = 0x00000000, len = 0
29 flash6 (rx) : org = 0x00000000, len = 0
30 flash7 (rx) : org = 0x00000000, len = 0
31 ram0 (wx) : org = 0x20000000, len = 128k /* SRAM1 + SRAM2 */
32 ram1 (wx) : org = 0x20000000, len = 112k /* SRAM1 */
33 ram2 (wx) : org = 0x00000000, len = 16k /* SRAM2 */
34 ram3 (wx) : org = 0x00000000, len = 0
35 ram4 (wx) : org = 0x00000000, len = 0
36 ram5 (wx) : org = 0x00000000, len = 0
37 ram6 (wx) : org = 0x00000000, len = 0
38 ram7 (wx) : org = 0x00000000, len = 0
39}
40
41/* For each data/text section two region are defined, a virtual region
42 and a load region (_LMA suffix).*/
43
44/* Flash region to be used for exception vectors.*/
45REGION_ALIAS("VECTORS_FLASH", flash0);
46REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
47
48/* Flash region to be used for constructors and destructors.*/
49REGION_ALIAS("XTORS_FLASH", flash0);
50REGION_ALIAS("XTORS_FLASH_LMA", flash0);
51
52/* Flash region to be used for code text.*/
53REGION_ALIAS("TEXT_FLASH", flash0);
54REGION_ALIAS("TEXT_FLASH_LMA", flash0);
55
56/* Flash region to be used for read only data.*/
57REGION_ALIAS("RODATA_FLASH", flash0);
58REGION_ALIAS("RODATA_FLASH_LMA", flash0);
59
60/* Flash region to be used for various.*/
61REGION_ALIAS("VARIOUS_FLASH", flash0);
62REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
63
64/* Flash region to be used for RAM(n) initialization data.*/
65REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
66
67/* RAM region to be used for Main stack. This stack accommodates the processing
68 of all exceptions and interrupts.*/
69REGION_ALIAS("MAIN_STACK_RAM", ram0);
70
71/* RAM region to be used for the process stack. This is the stack used by
72 the main() function.*/
73REGION_ALIAS("PROCESS_STACK_RAM", ram0);
74
75/* RAM region to be used for data segment.*/
76REGION_ALIAS("DATA_RAM", ram0);
77REGION_ALIAS("DATA_RAM_LMA", flash0);
78
79/* RAM region to be used for BSS segment.*/
80REGION_ALIAS("BSS_RAM", ram0);
81
82/* RAM region to be used for the default heap.*/
83REGION_ALIAS("HEAP_RAM", ram0);
84
85/* Generic rules inclusion.*/
86INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F446xE.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F446xE.ld
new file mode 100644
index 000000000..f6d42da61
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F446xE.ld
@@ -0,0 +1,86 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * ST32F446xE memory setup.
19 * Note: Use of ram1 and ram2 is mutually exclusive with use of ram0.
20 */
21MEMORY
22{
23 flash0 (rx) : org = 0x08000000, len = 512k
24 flash1 (rx) : org = 0x00000000, len = 0
25 flash2 (rx) : org = 0x00000000, len = 0
26 flash3 (rx) : org = 0x00000000, len = 0
27 flash4 (rx) : org = 0x00000000, len = 0
28 flash5 (rx) : org = 0x00000000, len = 0
29 flash6 (rx) : org = 0x00000000, len = 0
30 flash7 (rx) : org = 0x00000000, len = 0
31 ram0 (wx) : org = 0x20000000, len = 128k /* SRAM1 + SRAM2 */
32 ram1 (wx) : org = 0x20000000, len = 112k /* SRAM1 */
33 ram2 (wx) : org = 0x00000000, len = 16k /* SRAM2 */
34 ram3 (wx) : org = 0x00000000, len = 0
35 ram4 (wx) : org = 0x00000000, len = 0
36 ram5 (wx) : org = 0x00000000, len = 0
37 ram6 (wx) : org = 0x00000000, len = 0
38 ram7 (wx) : org = 0x00000000, len = 0
39}
40
41/* For each data/text section two region are defined, a virtual region
42 and a load region (_LMA suffix).*/
43
44/* Flash region to be used for exception vectors.*/
45REGION_ALIAS("VECTORS_FLASH", flash0);
46REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
47
48/* Flash region to be used for constructors and destructors.*/
49REGION_ALIAS("XTORS_FLASH", flash0);
50REGION_ALIAS("XTORS_FLASH_LMA", flash0);
51
52/* Flash region to be used for code text.*/
53REGION_ALIAS("TEXT_FLASH", flash0);
54REGION_ALIAS("TEXT_FLASH_LMA", flash0);
55
56/* Flash region to be used for read only data.*/
57REGION_ALIAS("RODATA_FLASH", flash0);
58REGION_ALIAS("RODATA_FLASH_LMA", flash0);
59
60/* Flash region to be used for various.*/
61REGION_ALIAS("VARIOUS_FLASH", flash0);
62REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
63
64/* Flash region to be used for RAM(n) initialization data.*/
65REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
66
67/* RAM region to be used for Main stack. This stack accommodates the processing
68 of all exceptions and interrupts.*/
69REGION_ALIAS("MAIN_STACK_RAM", ram0);
70
71/* RAM region to be used for the process stack. This is the stack used by
72 the main() function.*/
73REGION_ALIAS("PROCESS_STACK_RAM", ram0);
74
75/* RAM region to be used for data segment.*/
76REGION_ALIAS("DATA_RAM", ram0);
77REGION_ALIAS("DATA_RAM_LMA", flash0);
78
79/* RAM region to be used for BSS segment.*/
80REGION_ALIAS("BSS_RAM", ram0);
81
82/* RAM region to be used for the default heap.*/
83REGION_ALIAS("HEAP_RAM", ram0);
84
85/* Generic rules inclusion.*/
86INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F469xI.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F469xI.ld
new file mode 100644
index 000000000..25b9fa274
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F469xI.ld
@@ -0,0 +1,86 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * ST32F469xI memory setup.
19 * Note: Use of ram1, ram2 and ram3 is mutually exclusive with use of ram0.
20 */
21MEMORY
22{
23 flash0 (rx) : org = 0x08000000, len = 1M
24 flash1 (rx) : org = 0x00000000, len = 0
25 flash2 (rx) : org = 0x00000000, len = 0
26 flash3 (rx) : org = 0x00000000, len = 0
27 flash4 (rx) : org = 0x00000000, len = 0
28 flash5 (rx) : org = 0x00000000, len = 0
29 flash6 (rx) : org = 0x00000000, len = 0
30 flash7 (rx) : org = 0x00000000, len = 0
31 ram0 (wx) : org = 0x20000000, len = 160k /* SRAM1 */
32 ram1 (wx) : org = 0x20028000, len = 16k /* SRAM2 */
33 ram2 (wx) : org = 0x20030000, len = 64k /* SRAM3 */
34 ram3 (wx) : org = 0x10000000, len = 64k /* CCM SRAM */
35 ram4 (wx) : org = 0x40024000, len = 4k /* BCKP SRAM */
36 ram5 (wx) : org = 0x00000000, len = 0
37 ram6 (wx) : org = 0x00000000, len = 0
38 ram7 (wx) : org = 0x00000000, len = 0
39}
40
41/* For each data/text section two region are defined, a virtual region
42 and a load region (_LMA suffix).*/
43
44/* Flash region to be used for exception vectors.*/
45REGION_ALIAS("VECTORS_FLASH", flash0);
46REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
47
48/* Flash region to be used for constructors and destructors.*/
49REGION_ALIAS("XTORS_FLASH", flash0);
50REGION_ALIAS("XTORS_FLASH_LMA", flash0);
51
52/* Flash region to be used for code text.*/
53REGION_ALIAS("TEXT_FLASH", flash0);
54REGION_ALIAS("TEXT_FLASH_LMA", flash0);
55
56/* Flash region to be used for read only data.*/
57REGION_ALIAS("RODATA_FLASH", flash0);
58REGION_ALIAS("RODATA_FLASH_LMA", flash0);
59
60/* Flash region to be used for various.*/
61REGION_ALIAS("VARIOUS_FLASH", flash0);
62REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
63
64/* Flash region to be used for RAM(n) initialization data.*/
65REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
66
67/* RAM region to be used for Main stack. This stack accommodates the processing
68 of all exceptions and interrupts.*/
69REGION_ALIAS("MAIN_STACK_RAM", ram0);
70
71/* RAM region to be used for the process stack. This is the stack used by
72 the main() function.*/
73REGION_ALIAS("PROCESS_STACK_RAM", ram0);
74
75/* RAM region to be used for data segment.*/
76REGION_ALIAS("DATA_RAM", ram0);
77REGION_ALIAS("DATA_RAM_LMA", flash0);
78
79/* RAM region to be used for BSS segment.*/
80REGION_ALIAS("BSS_RAM", ram0);
81
82/* RAM region to be used for the default heap.*/
83REGION_ALIAS("HEAP_RAM", ram0);
84
85/* Generic rules inclusion.*/
86INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F722xE.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F722xE.ld
new file mode 100644
index 000000000..053b5da81
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F722xE.ld
@@ -0,0 +1,136 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * ST32F722xE generic setup.
19 *
20 * RAM0 - Data, Heap.
21 * RAM3 - Main Stack, Process Stack, BSS, NOCACHE, ETH.
22 *
23 * Notes:
24 * BSS is placed in DTCM RAM in order to simplify DMA buffers management.
25 */
26MEMORY
27{
28 flash0 (rx) : org = 0x08000000, len = 1M /* Flash as AXIM (writable) */
29 flash1 (rx) : org = 0x00200000, len = 1M /* Flash as ITCM */
30 flash2 (rx) : org = 0x00000000, len = 0
31 flash3 (rx) : org = 0x00000000, len = 0
32 flash4 (rx) : org = 0x00000000, len = 0
33 flash5 (rx) : org = 0x00000000, len = 0
34 flash6 (rx) : org = 0x00000000, len = 0
35 flash7 (rx) : org = 0x00000000, len = 0
36 ram0 (wx) : org = 0x20010000, len = 192k /* SRAM1 + SRAM2 */
37 ram1 (wx) : org = 0x20010000, len = 176k /* SRAM1 */
38 ram2 (wx) : org = 0x2003C000, len = 16k /* SRAM2 */
39 ram3 (wx) : org = 0x20000000, len = 64k /* DTCM-RAM */
40 ram4 (wx) : org = 0x00000000, len = 16k /* ITCM-RAM */
41 ram5 (wx) : org = 0x40024000, len = 4k /* BCKP SRAM */
42 ram6 (wx) : org = 0x00000000, len = 0
43 ram7 (wx) : org = 0x00000000, len = 0
44}
45
46/* For each data/text section two region are defined, a virtual region
47 and a load region (_LMA suffix).*/
48
49/* Flash region to be used for exception vectors.*/
50REGION_ALIAS("VECTORS_FLASH", flash1);
51REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
52
53/* Flash region to be used for constructors and destructors.*/
54REGION_ALIAS("XTORS_FLASH", flash1);
55REGION_ALIAS("XTORS_FLASH_LMA", flash0);
56
57/* Flash region to be used for code text.*/
58REGION_ALIAS("TEXT_FLASH", flash1);
59REGION_ALIAS("TEXT_FLASH_LMA", flash0);
60
61/* Flash region to be used for read only data.*/
62REGION_ALIAS("RODATA_FLASH", flash0);
63REGION_ALIAS("RODATA_FLASH_LMA", flash0);
64
65/* Flash region to be used for various.*/
66REGION_ALIAS("VARIOUS_FLASH", flash1);
67REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
68
69/* Flash region to be used for RAM(n) initialization data.*/
70REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
71
72/* RAM region to be used for Main stack. This stack accommodates the processing
73 of all exceptions and interrupts.*/
74REGION_ALIAS("MAIN_STACK_RAM", ram3);
75
76/* RAM region to be used for the process stack. This is the stack used by
77 the main() function.*/
78REGION_ALIAS("PROCESS_STACK_RAM", ram3);
79
80/* RAM region to be used for data segment.*/
81REGION_ALIAS("DATA_RAM", ram0);
82REGION_ALIAS("DATA_RAM_LMA", flash0);
83
84/* RAM region to be used for BSS segment.*/
85REGION_ALIAS("BSS_RAM", ram3);
86
87/* RAM region to be used for the default heap.*/
88REGION_ALIAS("HEAP_RAM", ram0);
89
90/* Stack rules inclusion.*/
91INCLUDE rules_stacks.ld
92
93/*===========================================================================*/
94/* Custom sections for STM32F7xx. */
95/*===========================================================================*/
96
97/* RAM region to be used for nocache segment.*/
98REGION_ALIAS("NOCACHE_RAM", ram3);
99
100/* RAM region to be used for eth segment.*/
101REGION_ALIAS("ETH_RAM", ram3);
102
103SECTIONS
104{
105 /* Special section for non cache-able areas.*/
106 .nocache (NOLOAD) : ALIGN(4)
107 {
108 __nocache_base__ = .;
109 *(.nocache)
110 *(.nocache.*)
111 *(.bss.__nocache_*)
112 . = ALIGN(4);
113 __nocache_end__ = .;
114 } > NOCACHE_RAM
115
116 /* Special section for Ethernet DMA non cache-able areas.*/
117 .eth (NOLOAD) : ALIGN(4)
118 {
119 __eth_base__ = .;
120 *(.eth)
121 *(.eth.*)
122 *(.bss.__eth_*)
123 . = ALIGN(4);
124 __eth_end__ = .;
125 } > ETH_RAM
126}
127
128/* Code rules inclusion.*/
129INCLUDE rules_code.ld
130
131/* Data rules inclusion.*/
132INCLUDE rules_data.ld
133
134/* Memory rules inclusion.*/
135INCLUDE rules_memory.ld
136
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F746xG.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F746xG.ld
new file mode 100644
index 000000000..8417eee4c
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F746xG.ld
@@ -0,0 +1,136 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F746xG generic setup.
19 *
20 * RAM0 - Data, Heap.
21 * RAM3 - Main Stack, Process Stack, BSS, NOCACHE, ETH.
22 *
23 * Notes:
24 * BSS is placed in DTCM RAM in order to simplify DMA buffers management.
25 */
26MEMORY
27{
28 flash0 (RX) : org = 0x08000000, len = 1M /* Flash as AXIM (writable) */
29 flash1 (RX) : org = 0x00200000, len = 1M /* Flash as ITCM */
30 flash2 (RX) : org = 0x00000000, len = 0
31 flash3 (RX) : org = 0x00000000, len = 0
32 flash4 (RX) : org = 0x00000000, len = 0
33 flash5 (RX) : org = 0x00000000, len = 0
34 flash6 (RX) : org = 0x00000000, len = 0
35 flash7 (RX) : org = 0x00000000, len = 0
36 ram0 (wx) : org = 0x20010000, len = 256k /* SRAM1 + SRAM2 */
37 ram1 (wx) : org = 0x20010000, len = 240k /* SRAM1 */
38 ram2 (wx) : org = 0x2004C000, len = 16k /* SRAM2 */
39 ram3 (wx) : org = 0x20000000, len = 64k /* DTCM-RAM */
40 ram4 (wx) : org = 0x00000000, len = 16k /* ITCM-RAM */
41 ram5 (wx) : org = 0x40024000, len = 4k /* BCKP SRAM */
42 ram6 (wx) : org = 0x00000000, len = 0
43 ram7 (wx) : org = 0x00000000, len = 0
44}
45
46/* For each data/text section two region are defined, a virtual region
47 and a load region (_LMA suffix).*/
48
49/* Flash region to be used for exception vectors.*/
50REGION_ALIAS("VECTORS_FLASH", flash1);
51REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
52
53/* Flash region to be used for constructors and destructors.*/
54REGION_ALIAS("XTORS_FLASH", flash1);
55REGION_ALIAS("XTORS_FLASH_LMA", flash0);
56
57/* Flash region to be used for code text.*/
58REGION_ALIAS("TEXT_FLASH", flash1);
59REGION_ALIAS("TEXT_FLASH_LMA", flash0);
60
61/* Flash region to be used for read only data.*/
62REGION_ALIAS("RODATA_FLASH", flash0);
63REGION_ALIAS("RODATA_FLASH_LMA", flash0);
64
65/* Flash region to be used for various.*/
66REGION_ALIAS("VARIOUS_FLASH", flash1);
67REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
68
69/* Flash region to be used for RAM(n) initialization data.*/
70REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
71
72/* RAM region to be used for Main stack. This stack accommodates the processing
73 of all exceptions and interrupts.*/
74REGION_ALIAS("MAIN_STACK_RAM", ram3);
75
76/* RAM region to be used for the process stack. This is the stack used by
77 the main() function.*/
78REGION_ALIAS("PROCESS_STACK_RAM", ram3);
79
80/* RAM region to be used for data segment.*/
81REGION_ALIAS("DATA_RAM", ram0);
82REGION_ALIAS("DATA_RAM_LMA", flash0);
83
84/* RAM region to be used for BSS segment.*/
85REGION_ALIAS("BSS_RAM", ram3);
86
87/* RAM region to be used for the default heap.*/
88REGION_ALIAS("HEAP_RAM", ram0);
89
90/* Stack rules inclusion.*/
91INCLUDE rules_stacks.ld
92
93/*===========================================================================*/
94/* Custom sections for STM32F7xx. */
95/*===========================================================================*/
96
97/* RAM region to be used for nocache segment.*/
98REGION_ALIAS("NOCACHE_RAM", ram3);
99
100/* RAM region to be used for eth segment.*/
101REGION_ALIAS("ETH_RAM", ram3);
102
103SECTIONS
104{
105 /* Special section for non cache-able areas.*/
106 .nocache (NOLOAD) : ALIGN(4)
107 {
108 __nocache_base__ = .;
109 *(.nocache)
110 *(.nocache.*)
111 *(.bss.__nocache_*)
112 . = ALIGN(4);
113 __nocache_end__ = .;
114 } > NOCACHE_RAM
115
116 /* Special section for Ethernet DMA non cache-able areas.*/
117 .eth (NOLOAD) : ALIGN(4)
118 {
119 __eth_base__ = .;
120 *(.eth)
121 *(.eth.*)
122 *(.bss.__eth_*)
123 . = ALIGN(4);
124 __eth_end__ = .;
125 } > ETH_RAM
126}
127
128/* Code rules inclusion.*/
129INCLUDE rules_code.ld
130
131/* Data rules inclusion.*/
132INCLUDE rules_data.ld
133
134/* Memory rules inclusion.*/
135INCLUDE rules_memory.ld
136
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F746xG_ETH.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F746xG_ETH.ld
new file mode 100644
index 000000000..c86d70847
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F746xG_ETH.ld
@@ -0,0 +1,137 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F746xG Ethernet setup.
19 *
20 * RAM1 - Data, Heap.
21 * RAM2 - ETH.
22 * RAM3 - Main Stack, Process Stack, BSS, NOCACHE.
23 *
24 * Notes:
25 * BSS is placed in DTCM RAM in order to simplify DMA buffers management.
26 */
27MEMORY
28{
29 flash0 (rx) : org = 0x08000000, len = 1M /* Flash as AXIM (writable) */
30 flash1 (rx) : org = 0x00200000, len = 1M /* Flash as ITCM */
31 flash2 (rx) : org = 0x00000000, len = 0
32 flash3 (rx) : org = 0x00000000, len = 0
33 flash4 (rx) : org = 0x00000000, len = 0
34 flash5 (rx) : org = 0x00000000, len = 0
35 flash6 (rx) : org = 0x00000000, len = 0
36 flash7 (rx) : org = 0x00000000, len = 0
37 ram0 (wx) : org = 0x20010000, len = 256k /* SRAM1 + SRAM2 */
38 ram1 (wx) : org = 0x20010000, len = 240k /* SRAM1 */
39 ram2 (wx) : org = 0x2004C000, len = 16k /* SRAM2 */
40 ram3 (wx) : org = 0x20000000, len = 64k /* DTCM-RAM */
41 ram4 (wx) : org = 0x00000000, len = 16k /* ITCM-RAM */
42 ram5 (wx) : org = 0x40024000, len = 4k /* BCKP SRAM */
43 ram6 (wx) : org = 0x00000000, len = 0
44 ram7 (wx) : org = 0x00000000, len = 0
45}
46
47/* For each data/text section two region are defined, a virtual region
48 and a load region (_LMA suffix).*/
49
50/* Flash region to be used for exception vectors.*/
51REGION_ALIAS("VECTORS_FLASH", flash1);
52REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
53
54/* Flash region to be used for constructors and destructors.*/
55REGION_ALIAS("XTORS_FLASH", flash1);
56REGION_ALIAS("XTORS_FLASH_LMA", flash0);
57
58/* Flash region to be used for code text.*/
59REGION_ALIAS("TEXT_FLASH", flash1);
60REGION_ALIAS("TEXT_FLASH_LMA", flash0);
61
62/* Flash region to be used for read only data.*/
63REGION_ALIAS("RODATA_FLASH", flash0);
64REGION_ALIAS("RODATA_FLASH_LMA", flash0);
65
66/* Flash region to be used for various.*/
67REGION_ALIAS("VARIOUS_FLASH", flash1);
68REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
69
70/* Flash region to be used for RAM(n) initialization data.*/
71REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
72
73/* RAM region to be used for Main stack. This stack accommodates the processing
74 of all exceptions and interrupts.*/
75REGION_ALIAS("MAIN_STACK_RAM", ram3);
76
77/* RAM region to be used for the process stack. This is the stack used by
78 the main() function.*/
79REGION_ALIAS("PROCESS_STACK_RAM", ram3);
80
81/* RAM region to be used for data segment.*/
82REGION_ALIAS("DATA_RAM", ram1);
83REGION_ALIAS("DATA_RAM_LMA", flash0);
84
85/* RAM region to be used for BSS segment.*/
86REGION_ALIAS("BSS_RAM", ram3);
87
88/* RAM region to be used for the default heap.*/
89REGION_ALIAS("HEAP_RAM", ram1);
90
91/* Stack rules inclusion.*/
92INCLUDE rules_stacks.ld
93
94/*===========================================================================*/
95/* Custom sections for STM32F7xx. */
96/*===========================================================================*/
97
98/* RAM region to be used for nocache segment.*/
99REGION_ALIAS("NOCACHE_RAM", ram3);
100
101/* RAM region to be used for eth segment.*/
102REGION_ALIAS("ETH_RAM", ram2);
103
104SECTIONS
105{
106 /* Special section for non cache-able areas.*/
107 .nocache (NOLOAD) : ALIGN(4)
108 {
109 __nocache_base__ = .;
110 *(.nocache)
111 *(.nocache.*)
112 *(.bss.__nocache_*)
113 . = ALIGN(4);
114 __nocache_end__ = .;
115 } > NOCACHE_RAM
116
117 /* Special section for Ethernet DMA non cache-able areas.*/
118 .eth (NOLOAD) : ALIGN(4)
119 {
120 __eth_base__ = .;
121 *(.eth)
122 *(.eth.*)
123 *(.bss.__eth_*)
124 . = ALIGN(4);
125 __eth_end__ = .;
126 } > ETH_RAM
127}
128
129/* Code rules inclusion.*/
130INCLUDE rules_code.ld
131
132/* Data rules inclusion.*/
133INCLUDE rules_data.ld
134
135/* Memory rules inclusion.*/
136INCLUDE rules_memory.ld
137
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F746xG_MAX.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F746xG_MAX.ld
new file mode 100644
index 000000000..0ebddda65
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F746xG_MAX.ld
@@ -0,0 +1,138 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F746xG maximum RAM setup.
19 *
20 * RAM0 - Data, BSS, Heap.
21 * RAM3 - Main Stack, Process Stack, NOCACHE, ETH.
22 *
23 * Notes:
24 * BSS is placed in cached RAM, DMA buffers management is delegated to the
25 * application code. This setup maximizes the linear RAM available to BSS and
26 * Heap.
27 */
28MEMORY
29{
30 flash0 (rx) : org = 0x08000000, len = 1M /* Flash as AXIM (writable) */
31 flash1 (rx) : org = 0x00200000, len = 1M /* Flash as ITCM */
32 flash2 (rx) : org = 0x00000000, len = 0
33 flash3 (rx) : org = 0x00000000, len = 0
34 flash4 (rx) : org = 0x00000000, len = 0
35 flash5 (rx) : org = 0x00000000, len = 0
36 flash6 (rx) : org = 0x00000000, len = 0
37 flash7 (rx) : org = 0x00000000, len = 0
38 ram0 (wx) : org = 0x20010000, len = 256k /* SRAM1 + SRAM2 */
39 ram1 (wx) : org = 0x20010000, len = 240k /* SRAM1 */
40 ram2 (wx) : org = 0x2004C000, len = 16k /* SRAM2 */
41 ram3 (wx) : org = 0x20000000, len = 64k /* DTCM-RAM */
42 ram4 (wx) : org = 0x00000000, len = 16k /* ITCM-RAM */
43 ram5 (wx) : org = 0x40024000, len = 4k /* BCKP SRAM */
44 ram6 (wx) : org = 0x00000000, len = 0
45 ram7 (wx) : org = 0x00000000, len = 0
46}
47
48/* For each data/text section two region are defined, a virtual region
49 and a load region (_LMA suffix).*/
50
51/* Flash region to be used for exception vectors.*/
52REGION_ALIAS("VECTORS_FLASH", flash1);
53REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
54
55/* Flash region to be used for constructors and destructors.*/
56REGION_ALIAS("XTORS_FLASH", flash1);
57REGION_ALIAS("XTORS_FLASH_LMA", flash0);
58
59/* Flash region to be used for code text.*/
60REGION_ALIAS("TEXT_FLASH", flash1);
61REGION_ALIAS("TEXT_FLASH_LMA", flash0);
62
63/* Flash region to be used for read only data.*/
64REGION_ALIAS("RODATA_FLASH", flash0);
65REGION_ALIAS("RODATA_FLASH_LMA", flash0);
66
67/* Flash region to be used for various.*/
68REGION_ALIAS("VARIOUS_FLASH", flash1);
69REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
70
71/* Flash region to be used for RAM(n) initialization data.*/
72REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
73
74/* RAM region to be used for Main stack. This stack accommodates the processing
75 of all exceptions and interrupts.*/
76REGION_ALIAS("MAIN_STACK_RAM", ram3);
77
78/* RAM region to be used for the process stack. This is the stack used by
79 the main() function.*/
80REGION_ALIAS("PROCESS_STACK_RAM", ram3);
81
82/* RAM region to be used for data segment.*/
83REGION_ALIAS("DATA_RAM", ram0);
84REGION_ALIAS("DATA_RAM_LMA", flash0);
85
86/* RAM region to be used for BSS segment.*/
87REGION_ALIAS("BSS_RAM", ram0);
88
89/* RAM region to be used for the default heap.*/
90REGION_ALIAS("HEAP_RAM", ram0);
91
92/* Stack rules inclusion.*/
93INCLUDE rules_stacks.ld
94
95/*===========================================================================*/
96/* Custom sections for STM32F7xx. */
97/*===========================================================================*/
98
99/* RAM region to be used for nocache segment.*/
100REGION_ALIAS("NOCACHE_RAM", ram3);
101
102/* RAM region to be used for eth segment.*/
103REGION_ALIAS("ETH_RAM", ram3);
104
105SECTIONS
106{
107 /* Special section for non cache-able areas.*/
108 .nocache (NOLOAD) : ALIGN(4)
109 {
110 __nocache_base__ = .;
111 *(.nocache)
112 *(.nocache.*)
113 *(.bss.__nocache_*)
114 . = ALIGN(4);
115 __nocache_end__ = .;
116 } > NOCACHE_RAM
117
118 /* Special section for Ethernet DMA non cache-able areas.*/
119 .eth (NOLOAD) : ALIGN(4)
120 {
121 __eth_base__ = .;
122 *(.eth)
123 *(.eth.*)
124 *(.bss.__eth_*)
125 . = ALIGN(4);
126 __eth_end__ = .;
127 } > ETH_RAM
128}
129
130/* Code rules inclusion.*/
131INCLUDE rules_code.ld
132
133/* Data rules inclusion.*/
134INCLUDE rules_data.ld
135
136/* Memory rules inclusion.*/
137INCLUDE rules_memory.ld
138
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F756xG.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F756xG.ld
new file mode 100644
index 000000000..5d7b248a8
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F756xG.ld
@@ -0,0 +1,136 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F756xG generic setup.
19 *
20 * RAM0 - Data, Heap.
21 * RAM3 - Main Stack, Process Stack, BSS, NOCACHE, ETH.
22 *
23 * Notes:
24 * BSS is placed in DTCM RAM in order to simplify DMA buffers management.
25 */
26MEMORY
27{
28 flash0 (rx) : org = 0x08000000, len = 1M /* Flash as AXIM (writable) */
29 flash1 (rx) : org = 0x00200000, len = 1M /* Flash as ITCM */
30 flash2 (rx) : org = 0x00000000, len = 0
31 flash3 (rx) : org = 0x00000000, len = 0
32 flash4 (rx) : org = 0x00000000, len = 0
33 flash5 (rx) : org = 0x00000000, len = 0
34 flash6 (rx) : org = 0x00000000, len = 0
35 flash7 (rx) : org = 0x00000000, len = 0
36 ram0 (wx) : org = 0x20010000, len = 256k /* SRAM1 + SRAM2 */
37 ram1 (wx) : org = 0x20010000, len = 240k /* SRAM1 */
38 ram2 (wx) : org = 0x2004C000, len = 16k /* SRAM2 */
39 ram3 (wx) : org = 0x20000000, len = 64k /* DTCM-RAM */
40 ram4 (wx) : org = 0x00000000, len = 16k /* ITCM-RAM */
41 ram5 (wx) : org = 0x40024000, len = 4k /* BCKP SRAM */
42 ram6 (wx) : org = 0x00000000, len = 0
43 ram7 (wx) : org = 0x00000000, len = 0
44}
45
46/* For each data/text section two region are defined, a virtual region
47 and a load region (_LMA suffix).*/
48
49/* Flash region to be used for exception vectors.*/
50REGION_ALIAS("VECTORS_FLASH", flash1);
51REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
52
53/* Flash region to be used for constructors and destructors.*/
54REGION_ALIAS("XTORS_FLASH", flash1);
55REGION_ALIAS("XTORS_FLASH_LMA", flash0);
56
57/* Flash region to be used for code text.*/
58REGION_ALIAS("TEXT_FLASH", flash1);
59REGION_ALIAS("TEXT_FLASH_LMA", flash0);
60
61/* Flash region to be used for read only data.*/
62REGION_ALIAS("RODATA_FLASH", flash0);
63REGION_ALIAS("RODATA_FLASH_LMA", flash0);
64
65/* Flash region to be used for various.*/
66REGION_ALIAS("VARIOUS_FLASH", flash1);
67REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
68
69/* Flash region to be used for RAM(n) initialization data.*/
70REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
71
72/* RAM region to be used for Main stack. This stack accommodates the processing
73 of all exceptions and interrupts.*/
74REGION_ALIAS("MAIN_STACK_RAM", ram3);
75
76/* RAM region to be used for the process stack. This is the stack used by
77 the main() function.*/
78REGION_ALIAS("PROCESS_STACK_RAM", ram3);
79
80/* RAM region to be used for data segment.*/
81REGION_ALIAS("DATA_RAM", ram0);
82REGION_ALIAS("DATA_RAM_LMA", flash0);
83
84/* RAM region to be used for BSS segment.*/
85REGION_ALIAS("BSS_RAM", ram3);
86
87/* RAM region to be used for the default heap.*/
88REGION_ALIAS("HEAP_RAM", ram0);
89
90/* Stack rules inclusion.*/
91INCLUDE rules_stacks.ld
92
93/*===========================================================================*/
94/* Custom sections for STM32F7xx. */
95/*===========================================================================*/
96
97/* RAM region to be used for nocache segment.*/
98REGION_ALIAS("NOCACHE_RAM", ram3);
99
100/* RAM region to be used for eth segment.*/
101REGION_ALIAS("ETH_RAM", ram3);
102
103SECTIONS
104{
105 /* Special section for non cache-able areas.*/
106 .nocache (NOLOAD) : ALIGN(4)
107 {
108 __nocache_base__ = .;
109 *(.nocache)
110 *(.nocache.*)
111 *(.bss.__nocache_*)
112 . = ALIGN(4);
113 __nocache_end__ = .;
114 } > NOCACHE_RAM
115
116 /* Special section for Ethernet DMA non cache-able areas.*/
117 .eth (NOLOAD) : ALIGN(4)
118 {
119 __eth_base__ = .;
120 *(.eth)
121 *(.eth.*)
122 *(.bss.__eth_*)
123 . = ALIGN(4);
124 __eth_end__ = .;
125 } > ETH_RAM
126}
127
128/* Code rules inclusion.*/
129INCLUDE rules_code.ld
130
131/* Data rules inclusion.*/
132INCLUDE rules_data.ld
133
134/* Memory rules inclusion.*/
135INCLUDE rules_memory.ld
136
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F76xxG.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F76xxG.ld
new file mode 100644
index 000000000..bc20eb35b
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F76xxG.ld
@@ -0,0 +1,136 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F76xxG generic setup.
19 *
20 * RAM0 - Data, Heap.
21 * RAM3 - Main Stack, Process Stack, BSS, NOCACHE, ETH.
22 *
23 * Notes:
24 * BSS is placed in DTCM RAM in order to simplify DMA buffers management.
25 */
26MEMORY
27{
28 flash0 (rx) : org = 0x08000000, len = 1M /* Flash as AXIM (writable) */
29 flash1 (rx) : org = 0x00200000, len = 1M /* Flash as ITCM */
30 flash2 (rx) : org = 0x00000000, len = 0
31 flash3 (rx) : org = 0x00000000, len = 0
32 flash4 (rx) : org = 0x00000000, len = 0
33 flash5 (rx) : org = 0x00000000, len = 0
34 flash6 (rx) : org = 0x00000000, len = 0
35 flash7 (rx) : org = 0x00000000, len = 0
36 ram0 (wx) : org = 0x20020000, len = 384k /* SRAM1 + SRAM2 */
37 ram1 (wx) : org = 0x20020000, len = 368k /* SRAM1 */
38 ram2 (wx) : org = 0x2007C000, len = 16k /* SRAM2 */
39 ram3 (wx) : org = 0x20000000, len = 128k /* DTCM-RAM */
40 ram4 (wx) : org = 0x00000000, len = 16k /* ITCM-RAM */
41 ram5 (wx) : org = 0x40024000, len = 4k /* BCKP SRAM */
42 ram6 (wx) : org = 0x00000000, len = 0
43 ram7 (wx) : org = 0x00000000, len = 0
44}
45
46/* For each data/text section two region are defined, a virtual region
47 and a load region (_LMA suffix).*/
48
49/* Flash region to be used for exception vectors.*/
50REGION_ALIAS("VECTORS_FLASH", flash1);
51REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
52
53/* Flash region to be used for constructors and destructors.*/
54REGION_ALIAS("XTORS_FLASH", flash1);
55REGION_ALIAS("XTORS_FLASH_LMA", flash0);
56
57/* Flash region to be used for code text.*/
58REGION_ALIAS("TEXT_FLASH", flash1);
59REGION_ALIAS("TEXT_FLASH_LMA", flash0);
60
61/* Flash region to be used for read only data.*/
62REGION_ALIAS("RODATA_FLASH", flash0);
63REGION_ALIAS("RODATA_FLASH_LMA", flash0);
64
65/* Flash region to be used for various.*/
66REGION_ALIAS("VARIOUS_FLASH", flash1);
67REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
68
69/* Flash region to be used for RAM(n) initialization data.*/
70REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
71
72/* RAM region to be used for Main stack. This stack accommodates the processing
73 of all exceptions and interrupts.*/
74REGION_ALIAS("MAIN_STACK_RAM", ram3);
75
76/* RAM region to be used for the process stack. This is the stack used by
77 the main() function.*/
78REGION_ALIAS("PROCESS_STACK_RAM", ram3);
79
80/* RAM region to be used for data segment.*/
81REGION_ALIAS("DATA_RAM", ram0);
82REGION_ALIAS("DATA_RAM_LMA", flash0);
83
84/* RAM region to be used for BSS segment.*/
85REGION_ALIAS("BSS_RAM", ram3);
86
87/* RAM region to be used for the default heap.*/
88REGION_ALIAS("HEAP_RAM", ram0);
89
90/* Stack rules inclusion.*/
91INCLUDE rules_stacks.ld
92
93/*===========================================================================*/
94/* Custom sections for STM32F7xx. */
95/*===========================================================================*/
96
97/* RAM region to be used for nocache segment.*/
98REGION_ALIAS("NOCACHE_RAM", ram3);
99
100/* RAM region to be used for eth segment.*/
101REGION_ALIAS("ETH_RAM", ram3);
102
103SECTIONS
104{
105 /* Special section for non cache-able areas.*/
106 .nocache (NOLOAD) : ALIGN(4)
107 {
108 __nocache_base__ = .;
109 *(.nocache)
110 *(.nocache.*)
111 *(.bss.__nocache_*)
112 . = ALIGN(4);
113 __nocache_end__ = .;
114 } > NOCACHE_RAM
115
116 /* Special section for Ethernet DMA non cache-able areas.*/
117 .eth (NOLOAD) : ALIGN(4)
118 {
119 __eth_base__ = .;
120 *(.eth)
121 *(.eth.*)
122 *(.bss.__eth_*)
123 . = ALIGN(4);
124 __eth_end__ = .;
125 } > ETH_RAM
126}
127
128/* Code rules inclusion.*/
129INCLUDE rules_code.ld
130
131/* Data rules inclusion.*/
132INCLUDE rules_data.ld
133
134/* Memory rules inclusion.*/
135INCLUDE rules_memory.ld
136
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F76xxI.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F76xxI.ld
new file mode 100644
index 000000000..4ab0ede57
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32F76xxI.ld
@@ -0,0 +1,136 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32F76xxI generic setup.
19 *
20 * RAM0 - Data, Heap.
21 * RAM3 - Main Stack, Process Stack, BSS, NOCACHE, ETH.
22 *
23 * Notes:
24 * BSS is placed in DTCM RAM in order to simplify DMA buffers management.
25 */
26MEMORY
27{
28 flash0 (rx) : org = 0x08000000, len = 2M /* Flash as AXIM (writable) */
29 flash1 (rx) : org = 0x00200000, len = 2M /* Flash as ITCM */
30 flash2 (rx) : org = 0x00000000, len = 0
31 flash3 (rx) : org = 0x00000000, len = 0
32 flash4 (rx) : org = 0x00000000, len = 0
33 flash5 (rx) : org = 0x00000000, len = 0
34 flash6 (rx) : org = 0x00000000, len = 0
35 flash7 (rx) : org = 0x00000000, len = 0
36 ram0 (wx) : org = 0x20020000, len = 384k /* SRAM1 + SRAM2 */
37 ram1 (wx) : org = 0x20020000, len = 368k /* SRAM1 */
38 ram2 (wx) : org = 0x2007C000, len = 16k /* SRAM2 */
39 ram3 (wx) : org = 0x20000000, len = 128k /* DTCM-RAM */
40 ram4 (wx) : org = 0x00000000, len = 16k /* ITCM-RAM */
41 ram5 (wx) : org = 0x40024000, len = 4k /* BCKP SRAM */
42 ram6 (wx) : org = 0x00000000, len = 0
43 ram7 (wx) : org = 0x00000000, len = 0
44}
45
46/* For each data/text section two region are defined, a virtual region
47 and a load region (_LMA suffix).*/
48
49/* Flash region to be used for exception vectors.*/
50REGION_ALIAS("VECTORS_FLASH", flash1);
51REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
52
53/* Flash region to be used for constructors and destructors.*/
54REGION_ALIAS("XTORS_FLASH", flash1);
55REGION_ALIAS("XTORS_FLASH_LMA", flash0);
56
57/* Flash region to be used for code text.*/
58REGION_ALIAS("TEXT_FLASH", flash1);
59REGION_ALIAS("TEXT_FLASH_LMA", flash0);
60
61/* Flash region to be used for read only data.*/
62REGION_ALIAS("RODATA_FLASH", flash0);
63REGION_ALIAS("RODATA_FLASH_LMA", flash0);
64
65/* Flash region to be used for various.*/
66REGION_ALIAS("VARIOUS_FLASH", flash1);
67REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
68
69/* Flash region to be used for RAM(n) initialization data.*/
70REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
71
72/* RAM region to be used for Main stack. This stack accommodates the processing
73 of all exceptions and interrupts.*/
74REGION_ALIAS("MAIN_STACK_RAM", ram3);
75
76/* RAM region to be used for the process stack. This is the stack used by
77 the main() function.*/
78REGION_ALIAS("PROCESS_STACK_RAM", ram3);
79
80/* RAM region to be used for data segment.*/
81REGION_ALIAS("DATA_RAM", ram0);
82REGION_ALIAS("DATA_RAM_LMA", flash0);
83
84/* RAM region to be used for BSS segment.*/
85REGION_ALIAS("BSS_RAM", ram3);
86
87/* RAM region to be used for the default heap.*/
88REGION_ALIAS("HEAP_RAM", ram0);
89
90/* Stack rules inclusion.*/
91INCLUDE rules_stacks.ld
92
93/*===========================================================================*/
94/* Custom sections for STM32F7xx. */
95/*===========================================================================*/
96
97/* RAM region to be used for nocache segment.*/
98REGION_ALIAS("NOCACHE_RAM", ram3);
99
100/* RAM region to be used for eth segment.*/
101REGION_ALIAS("ETH_RAM", ram3);
102
103SECTIONS
104{
105 /* Special section for non cache-able areas.*/
106 .nocache (NOLOAD) : ALIGN(4)
107 {
108 __nocache_base__ = .;
109 *(.nocache)
110 *(.nocache.*)
111 *(.bss.__nocache_*)
112 . = ALIGN(4);
113 __nocache_end__ = .;
114 } > NOCACHE_RAM
115
116 /* Special section for Ethernet DMA non cache-able areas.*/
117 .eth (NOLOAD) : ALIGN(4)
118 {
119 __eth_base__ = .;
120 *(.eth)
121 *(.eth.*)
122 *(.bss.__eth_*)
123 . = ALIGN(4);
124 __eth_end__ = .;
125 } > ETH_RAM
126}
127
128/* Code rules inclusion.*/
129INCLUDE rules_code.ld
130
131/* Data rules inclusion.*/
132INCLUDE rules_data.ld
133
134/* Memory rules inclusion.*/
135INCLUDE rules_memory.ld
136
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32G071xB.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32G071xB.ld
new file mode 100644
index 000000000..b75213d98
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32G071xB.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32G071xB memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 128k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 36k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32G431xB.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32G431xB.ld
new file mode 100644
index 000000000..2bf6f3949
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32G431xB.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32G431xB memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 128k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 32k /* SRAM1+SRAM2+CCM */
31 ram1 (wx) : org = 0x20000000, len = 22k /* SRAM1+SRAM2 */
32 ram2 (wx) : org = 0x20000000, len = 16k /* SRAM1 */
33 ram3 (wx) : org = 0x20004000, len = 6k /* SRAM2 */
34 ram4 (wx) : org = 0x20005800, len = 10k /* CCM */
35 ram5 (wx) : org = 0x10000000, len = 10k /* CCM alias */
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32G474xE.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32G474xE.ld
new file mode 100644
index 000000000..075da121c
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32G474xE.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32G474xE memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 512k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 128k /* SRAM1+SRAM2+CCM */
31 ram1 (wx) : org = 0x20000000, len = 96k /* SRAM1+SRAM2 */
32 ram2 (wx) : org = 0x20000000, len = 80k /* SRAM1 */
33 ram3 (wx) : org = 0x20014000, len = 16k /* SRAM2 */
34 ram4 (wx) : org = 0x20018000, len = 32k /* CCM */
35 ram5 (wx) : org = 0x10000000, len = 32k /* CCM alias */
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32H743xI.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32H743xI.ld
new file mode 100755
index 000000000..adb2bbaf8
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32H743xI.ld
@@ -0,0 +1,139 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32H743xI generic setup.
19 *
20 * AXI SRAM - BSS, Data, Heap.
21 * SRAM1+SRAM2 - None.
22 * SRAM3 - NOCACHE, ETH.
23 * SRAM4 - None.
24 * DTCM-RAM - Main Stack, Process Stack.
25 * ITCM-RAM - None.
26 * BCKP SRAM - None.
27 */
28MEMORY
29{
30 flash0 (rx) : org = 0x08000000, len = 2M /* Flash bank1+bank2 */
31 flash1 (rx) : org = 0x08000000, len = 1M /* Flash bank 1 */
32 flash2 (rx) : org = 0x08100000, len = 1M /* Flash bank 2 */
33 flash3 (rx) : org = 0x00000000, len = 0
34 flash4 (rx) : org = 0x00000000, len = 0
35 flash5 (rx) : org = 0x00000000, len = 0
36 flash6 (rx) : org = 0x00000000, len = 0
37 flash7 (rx) : org = 0x00000000, len = 0
38 ram0 (wx) : org = 0x24000000, len = 512k /* AXI SRAM */
39 ram1 (wx) : org = 0x30000000, len = 256k /* AHB SRAM1+SRAM2 */
40 ram2 (wx) : org = 0x30000000, len = 288k /* AHB SRAM1+SRAM2+SRAM3 */
41 ram3 (wx) : org = 0x30040000, len = 32k /* AHB SRAM3 */
42 ram4 (wx) : org = 0x38000000, len = 64k /* AHB SRAM4 */
43 ram5 (wx) : org = 0x20000000, len = 128k /* DTCM-RAM */
44 ram6 (wx) : org = 0x00000000, len = 64k /* ITCM-RAM */
45 ram7 (wx) : org = 0x38800000, len = 4k /* BCKP SRAM */
46}
47
48/* For each data/text section two region are defined, a virtual region
49 and a load region (_LMA suffix).*/
50
51/* Flash region to be used for exception vectors.*/
52REGION_ALIAS("VECTORS_FLASH", flash0);
53REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
54
55/* Flash region to be used for constructors and destructors.*/
56REGION_ALIAS("XTORS_FLASH", flash0);
57REGION_ALIAS("XTORS_FLASH_LMA", flash0);
58
59/* Flash region to be used for code text.*/
60REGION_ALIAS("TEXT_FLASH", flash0);
61REGION_ALIAS("TEXT_FLASH_LMA", flash0);
62
63/* Flash region to be used for read only data.*/
64REGION_ALIAS("RODATA_FLASH", flash0);
65REGION_ALIAS("RODATA_FLASH_LMA", flash0);
66
67/* Flash region to be used for various.*/
68REGION_ALIAS("VARIOUS_FLASH", flash0);
69REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
70
71/* Flash region to be used for RAM(n) initialization data.*/
72REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
73
74/* RAM region to be used for Main stack. This stack accommodates the processing
75 of all exceptions and interrupts.*/
76REGION_ALIAS("MAIN_STACK_RAM", ram5);
77
78/* RAM region to be used for the process stack. This is the stack used by
79 the main() function.*/
80REGION_ALIAS("PROCESS_STACK_RAM", ram5);
81
82/* RAM region to be used for data segment.*/
83REGION_ALIAS("DATA_RAM", ram0);
84REGION_ALIAS("DATA_RAM_LMA", flash0);
85
86/* RAM region to be used for BSS segment.*/
87REGION_ALIAS("BSS_RAM", ram0);
88
89/* RAM region to be used for the default heap.*/
90REGION_ALIAS("HEAP_RAM", ram0);
91
92/* Stack rules inclusion.*/
93INCLUDE rules_stacks.ld
94
95/*===========================================================================*/
96/* Custom sections for STM32H7xx. */
97/* SRAM3 is assumed to be marked non-cacheable using MPU. */
98/*===========================================================================*/
99
100/* RAM region to be used for nocache segment.*/
101REGION_ALIAS("NOCACHE_RAM", ram3);
102
103/* RAM region to be used for eth segment.*/
104REGION_ALIAS("ETH_RAM", ram3);
105
106SECTIONS
107{
108 /* Special section for non cache-able areas.*/
109 .nocache (NOLOAD) : ALIGN(4)
110 {
111 __nocache_base__ = .;
112 *(.nocache)
113 *(.nocache.*)
114 *(.bss.__nocache_*)
115 . = ALIGN(4);
116 __nocache_end__ = .;
117 } > NOCACHE_RAM
118
119 /* Special section for Ethernet DMA non cache-able areas.*/
120 .eth (NOLOAD) : ALIGN(4)
121 {
122 __eth_base__ = .;
123 *(.eth)
124 *(.eth.*)
125 *(.bss.__eth_*)
126 . = ALIGN(4);
127 __eth_end__ = .;
128 } > ETH_RAM
129}
130
131/* Code rules inclusion.*/
132INCLUDE rules_code.ld
133
134/* Data rules inclusion.*/
135INCLUDE rules_data.ld
136
137/* Memory rules inclusion.*/
138INCLUDE rules_memory.ld
139
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32H755xI_M7.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32H755xI_M7.ld
new file mode 100644
index 000000000..7d4c1c9e8
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32H755xI_M7.ld
@@ -0,0 +1,143 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32H755xI (M7 side) generic setup.
19 * Flash1 is assumed to be in use for the M7 core.
20 * Flash2 is not touched and can be used by the M4 core.
21 * RAM1 and RAM2 are assumed to be in use for the M7 core.
22 * RAM3 and RAM4 are not touched and can be used by the M4 core.
23 *
24 * AXI SRAM - BSS, Data, Heap.
25 * SRAM1+SRAM2 - None.
26 * SRAM3 - NOCACHE, ETH.
27 * SRAM4 - None.
28 * DTCM-RAM - Main Stack, Process Stack.
29 * ITCM-RAM - None.
30 * BCKP SRAM - None.
31 */
32MEMORY
33{
34 flash0 (rx) : org = 0x08000000, len = 2M /* Flash bank1+bank2 */
35 flash1 (rx) : org = 0x08000000, len = 1M /* Flash bank 1 */
36 flash2 (rx) : org = 0x08100000, len = 1M /* Flash bank 2 */
37 flash3 (rx) : org = 0x00000000, len = 0
38 flash4 (rx) : org = 0x00000000, len = 0
39 flash5 (rx) : org = 0x00000000, len = 0
40 flash6 (rx) : org = 0x00000000, len = 0
41 flash7 (rx) : org = 0x00000000, len = 0
42 ram0 (wx) : org = 0x24000000, len = 512k /* AXI SRAM */
43 ram1 (wx) : org = 0x30000000, len = 256k /* AHB SRAM1+SRAM2 */
44 ram2 (wx) : org = 0x30000000, len = 288k /* AHB SRAM1+SRAM2+SRAM3 */
45 ram3 (wx) : org = 0x30040000, len = 32k /* AHB SRAM3 */
46 ram4 (wx) : org = 0x38000000, len = 64k /* AHB SRAM4 */
47 ram5 (wx) : org = 0x20000000, len = 128k /* DTCM-RAM */
48 ram6 (wx) : org = 0x00000000, len = 64k /* ITCM-RAM */
49 ram7 (wx) : org = 0x38800000, len = 4k /* BCKP SRAM */
50}
51
52/* For each data/text section two region are defined, a virtual region
53 and a load region (_LMA suffix).*/
54
55/* Flash region to be used for exception vectors.*/
56REGION_ALIAS("VECTORS_FLASH", flash1);
57REGION_ALIAS("VECTORS_FLASH_LMA", flash1);
58
59/* Flash region to be used for constructors and destructors.*/
60REGION_ALIAS("XTORS_FLASH", flash1);
61REGION_ALIAS("XTORS_FLASH_LMA", flash1);
62
63/* Flash region to be used for code text.*/
64REGION_ALIAS("TEXT_FLASH", flash1);
65REGION_ALIAS("TEXT_FLASH_LMA", flash1);
66
67/* Flash region to be used for read only data.*/
68REGION_ALIAS("RODATA_FLASH", flash1);
69REGION_ALIAS("RODATA_FLASH_LMA", flash1);
70
71/* Flash region to be used for various.*/
72REGION_ALIAS("VARIOUS_FLASH", flash1);
73REGION_ALIAS("VARIOUS_FLASH_LMA", flash1);
74
75/* Flash region to be used for RAM(n) initialization data.*/
76REGION_ALIAS("RAM_INIT_FLASH_LMA", flash1);
77
78/* RAM region to be used for Main stack. This stack accommodates the processing
79 of all exceptions and interrupts.*/
80REGION_ALIAS("MAIN_STACK_RAM", ram5);
81
82/* RAM region to be used for the process stack. This is the stack used by
83 the main() function.*/
84REGION_ALIAS("PROCESS_STACK_RAM", ram5);
85
86/* RAM region to be used for data segment.*/
87REGION_ALIAS("DATA_RAM", ram0);
88REGION_ALIAS("DATA_RAM_LMA", flash1);
89
90/* RAM region to be used for BSS segment.*/
91REGION_ALIAS("BSS_RAM", ram0);
92
93/* RAM region to be used for the default heap.*/
94REGION_ALIAS("HEAP_RAM", ram0);
95
96/* Stack rules inclusion.*/
97INCLUDE rules_stacks.ld
98
99/*===========================================================================*/
100/* Custom sections for STM32H7xx. */
101/* SRAM3 is assumed to be marked non-cacheable using MPU. */
102/*===========================================================================*/
103
104/* RAM region to be used for nocache segment.*/
105REGION_ALIAS("NOCACHE_RAM", ram3);
106
107/* RAM region to be used for eth segment.*/
108REGION_ALIAS("ETH_RAM", ram3);
109
110SECTIONS
111{
112 /* Special section for non cache-able areas.*/
113 .nocache (NOLOAD) : ALIGN(4)
114 {
115 __nocache_base__ = .;
116 *(.nocache)
117 *(.nocache.*)
118 *(.bss.__nocache_*)
119 . = ALIGN(4);
120 __nocache_end__ = .;
121 } > NOCACHE_RAM
122
123 /* Special section for Ethernet DMA non cache-able areas.*/
124 .eth (NOLOAD) : ALIGN(4)
125 {
126 __eth_base__ = .;
127 *(.eth)
128 *(.eth.*)
129 *(.bss.__eth_*)
130 . = ALIGN(4);
131 __eth_end__ = .;
132 } > ETH_RAM
133}
134
135/* Code rules inclusion.*/
136INCLUDE rules_code.ld
137
138/* Data rules inclusion.*/
139INCLUDE rules_data.ld
140
141/* Memory rules inclusion.*/
142INCLUDE rules_memory.ld
143
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L011x3.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L011x3.ld
new file mode 100644
index 000000000..4fb21a30f
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L011x3.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32L011x3 memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 8k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 2k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L011x4.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L011x4.ld
new file mode 100644
index 000000000..99ee73687
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L011x4.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32L011x4 memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 16k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 2k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L031x4.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L031x4.ld
new file mode 100644
index 000000000..2876fef86
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L031x4.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32L031x4 memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 16k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 8k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L031x6.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L031x6.ld
new file mode 100644
index 000000000..4a370f10c
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L031x6.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32L031x6 memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 32k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 8k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L052x6.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L052x6.ld
new file mode 100644
index 000000000..5f8c1179d
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L052x6.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32L052x8 memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 16k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 8k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L052x8.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L052x8.ld
new file mode 100644
index 000000000..9bdb2c240
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L052x8.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32L052x8 memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 64k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 8k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L053x6.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L053x6.ld
new file mode 100644
index 000000000..7fada9576
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L053x6.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32L053x6 memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 32k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 8k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L053x8.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L053x8.ld
new file mode 100644
index 000000000..dea10bf4a
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L053x8.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32L053x8 memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 64k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 8k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L073x8.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L073x8.ld
new file mode 100644
index 000000000..629ef578a
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L073x8.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32L073x8 memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 64k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 20k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L073xB.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L073xB.ld
new file mode 100644
index 000000000..97ae9e109
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L073xB.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32L073xB memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 128k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 20k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L073xZ.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L073xZ.ld
new file mode 100644
index 000000000..9c094e34f
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L073xZ.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32L073xZ memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 192k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 20k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L151x6.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L151x6.ld
new file mode 100644
index 000000000..93569b19e
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L151x6.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32L151x6 memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 32k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 10k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L152xB.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L152xB.ld
new file mode 100644
index 000000000..47686bdfc
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L152xB.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32L152xB memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 128k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 16k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L152xE.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L152xE.ld
new file mode 100644
index 000000000..8629513da
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L152xE.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32L152xB memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 512k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 80k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L432xB.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L432xB.ld
new file mode 100644
index 000000000..a10b45ee6
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L432xB.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32L432xB memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 128k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 64k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L432xC.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L432xC.ld
new file mode 100644
index 000000000..68e3b0d81
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L432xC.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32L432xC memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 256k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 64k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x00000000, len = 0
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L452xE.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L452xE.ld
new file mode 100644
index 000000000..5e05cec7a
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L452xE.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32L452xE memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 512k
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 128k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x10000000, len = 32k /* This memory also mapped at address 0x20020000 */
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L476xG.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L476xG.ld
new file mode 100644
index 000000000..73bc91d23
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L476xG.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32L476xG memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 1M
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 96k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x10000000, len = 32k
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L496xG.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L496xG.ld
new file mode 100644
index 000000000..f2c074ea9
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L496xG.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32L496xG memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 1M
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 256k
31 ram1 (wx) : org = 0x00000000, len = 0
32 ram2 (wx) : org = 0x00000000, len = 0
33 ram3 (wx) : org = 0x00000000, len = 0
34 ram4 (wx) : org = 0x10000000, len = 64k /* This memory also mapped at address 0x20040000 */
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L4R5xI.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L4R5xI.ld
new file mode 100644
index 000000000..8540e9f03
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L4R5xI.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32L4R5xI memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 2M
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 640k /* SRAM1+SRAM2+SRAM3 */
31 ram1 (wx) : org = 0x20000000, len = 192k /* SRAM1 */
32 ram2 (wx) : org = 0x00000000, len = 64k /* SRAM2 */
33 ram3 (wx) : org = 0x00000000, len = 384k /* SRAM3 */
34 ram4 (wx) : org = 0x10000000, len = 64k /* SRAM2 alias */
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L4R9xI.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L4R9xI.ld
new file mode 100644
index 000000000..a004da2fa
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32L4R9xI.ld
@@ -0,0 +1,85 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32L4R9xI memory setup.
19 */
20MEMORY
21{
22 flash0 (rx) : org = 0x08000000, len = 2M
23 flash1 (rx) : org = 0x00000000, len = 0
24 flash2 (rx) : org = 0x00000000, len = 0
25 flash3 (rx) : org = 0x00000000, len = 0
26 flash4 (rx) : org = 0x00000000, len = 0
27 flash5 (rx) : org = 0x00000000, len = 0
28 flash6 (rx) : org = 0x00000000, len = 0
29 flash7 (rx) : org = 0x00000000, len = 0
30 ram0 (wx) : org = 0x20000000, len = 640k /* SRAM1+SRAM2+SRAM3 */
31 ram1 (wx) : org = 0x20000000, len = 192k /* SRAM1 */
32 ram2 (wx) : org = 0x00000000, len = 64k /* SRAM2 */
33 ram3 (wx) : org = 0x00000000, len = 384k /* SRAM3 */
34 ram4 (wx) : org = 0x10000000, len = 64k /* SRAM2 alias */
35 ram5 (wx) : org = 0x00000000, len = 0
36 ram6 (wx) : org = 0x00000000, len = 0
37 ram7 (wx) : org = 0x00000000, len = 0
38}
39
40/* For each data/text section two region are defined, a virtual region
41 and a load region (_LMA suffix).*/
42
43/* Flash region to be used for exception vectors.*/
44REGION_ALIAS("VECTORS_FLASH", flash0);
45REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
46
47/* Flash region to be used for constructors and destructors.*/
48REGION_ALIAS("XTORS_FLASH", flash0);
49REGION_ALIAS("XTORS_FLASH_LMA", flash0);
50
51/* Flash region to be used for code text.*/
52REGION_ALIAS("TEXT_FLASH", flash0);
53REGION_ALIAS("TEXT_FLASH_LMA", flash0);
54
55/* Flash region to be used for read only data.*/
56REGION_ALIAS("RODATA_FLASH", flash0);
57REGION_ALIAS("RODATA_FLASH_LMA", flash0);
58
59/* Flash region to be used for various.*/
60REGION_ALIAS("VARIOUS_FLASH", flash0);
61REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
62
63/* Flash region to be used for RAM(n) initialization data.*/
64REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
65
66/* RAM region to be used for Main stack. This stack accommodates the processing
67 of all exceptions and interrupts.*/
68REGION_ALIAS("MAIN_STACK_RAM", ram0);
69
70/* RAM region to be used for the process stack. This is the stack used by
71 the main() function.*/
72REGION_ALIAS("PROCESS_STACK_RAM", ram0);
73
74/* RAM region to be used for data segment.*/
75REGION_ALIAS("DATA_RAM", ram0);
76REGION_ALIAS("DATA_RAM_LMA", flash0);
77
78/* RAM region to be used for BSS segment.*/
79REGION_ALIAS("BSS_RAM", ram0);
80
81/* RAM region to be used for the default heap.*/
82REGION_ALIAS("HEAP_RAM", ram0);
83
84/* Generic rules inclusion.*/
85INCLUDE rules.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/rules.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/rules.ld
new file mode 100644
index 000000000..048c5b39e
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/rules.ld
@@ -0,0 +1,11 @@
1/* Stack rules inclusion.*/
2INCLUDE rules_stacks.ld
3
4/* Code rules inclusion.*/
5INCLUDE rules_code.ld
6
7/* Data rules inclusion.*/
8INCLUDE rules_data.ld
9
10/* Memory rules inclusion.*/
11INCLUDE rules_memory.ld
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/rules_code.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/rules_code.ld
new file mode 100644
index 000000000..317169a34
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/rules_code.ld
@@ -0,0 +1,80 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17ENTRY(Reset_Handler)
18
19SECTIONS
20{
21 .vectors : ALIGN(1024)
22 {
23 KEEP(*(.vectors))
24 } > VECTORS_FLASH AT > VECTORS_FLASH_LMA
25
26 .xtors : ALIGN(4)
27 {
28 __init_array_base__ = .;
29 KEEP(*(SORT(.init_array.*)))
30 KEEP(*(.init_array))
31 __init_array_end__ = .;
32 __fini_array_base__ = .;
33 KEEP(*(.fini_array))
34 KEEP(*(SORT(.fini_array.*)))
35 __fini_array_end__ = .;
36 } > XTORS_FLASH AT > XTORS_FLASH_LMA
37
38 .text : ALIGN_WITH_INPUT
39 {
40 __text_base__ = .;
41 *(.text)
42 *(.text.*)
43 *(.glue_7t)
44 *(.glue_7)
45 *(.gcc*)
46 __text_end__ = .;
47 } > TEXT_FLASH AT > TEXT_FLASH_LMA
48
49 .rodata : ALIGN(4)
50 {
51 __rodata_base__ = .;
52 *(.rodata)
53 *(.rodata.*)
54 . = ALIGN(4);
55 __rodata_end__ = .;
56 } > RODATA_FLASH AT > RODATA_FLASH_LMA
57
58 .ARM.extab :
59 {
60 *(.ARM.extab* .gnu.linkonce.armextab.*)
61 } > VARIOUS_FLASH AT > VARIOUS_FLASH_LMA
62
63 .ARM.exidx : {
64 __exidx_base__ = .;
65 __exidx_start = .;
66 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
67 __exidx_end__ = .;
68 __exidx_end = .;
69 } > VARIOUS_FLASH AT > VARIOUS_FLASH_LMA
70
71 .eh_frame_hdr :
72 {
73 *(.eh_frame_hdr)
74 } > VARIOUS_FLASH AT > VARIOUS_FLASH_LMA
75
76 .eh_frame : ONLY_IF_RO
77 {
78 *(.eh_frame)
79 } > VARIOUS_FLASH AT > VARIOUS_FLASH_LMA
80}
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/rules_data.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/rules_data.ld
new file mode 100644
index 000000000..b0629e780
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/rules_data.ld
@@ -0,0 +1,43 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17SECTIONS
18{
19 .data : ALIGN(4)
20 {
21 PROVIDE(_textdata = LOADADDR(.data));
22 PROVIDE(_data = .);
23 __textdata_base__ = LOADADDR(.data);
24 __data_base__ = .;
25 *(.data)
26 *(.data.*)
27 *(.ramtext)
28 . = ALIGN(4);
29 PROVIDE(_edata = .);
30 __data_end__ = .;
31 } > DATA_RAM AT > DATA_RAM_LMA
32
33 .bss (NOLOAD) : ALIGN(4)
34 {
35 __bss_base__ = .;
36 *(.bss)
37 *(.bss.*)
38 *(COMMON)
39 . = ALIGN(4);
40 __bss_end__ = .;
41 PROVIDE(end = .);
42 } > BSS_RAM
43}
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/rules_memory.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/rules_memory.ld
new file mode 100644
index 000000000..ab914b65d
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/rules_memory.ld
@@ -0,0 +1,317 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17__ram0_base__ = ORIGIN(ram0);
18__ram0_size__ = LENGTH(ram0);
19__ram0_end__ = __ram0_base__ + __ram0_size__;
20__ram1_base__ = ORIGIN(ram1);
21__ram1_size__ = LENGTH(ram1);
22__ram1_end__ = __ram1_base__ + __ram1_size__;
23__ram2_base__ = ORIGIN(ram2);
24__ram2_size__ = LENGTH(ram2);
25__ram2_end__ = __ram2_base__ + __ram2_size__;
26__ram3_base__ = ORIGIN(ram3);
27__ram3_size__ = LENGTH(ram3);
28__ram3_end__ = __ram3_base__ + __ram3_size__;
29__ram4_base__ = ORIGIN(ram4);
30__ram4_size__ = LENGTH(ram4);
31__ram4_end__ = __ram4_base__ + __ram4_size__;
32__ram5_base__ = ORIGIN(ram5);
33__ram5_size__ = LENGTH(ram5);
34__ram5_end__ = __ram5_base__ + __ram5_size__;
35__ram6_base__ = ORIGIN(ram6);
36__ram6_size__ = LENGTH(ram6);
37__ram6_end__ = __ram6_base__ + __ram6_size__;
38__ram7_base__ = ORIGIN(ram7);
39__ram7_size__ = LENGTH(ram7);
40__ram7_end__ = __ram7_base__ + __ram7_size__;
41
42__flash0_base__ = ORIGIN(flash0);
43__flash0_size__ = LENGTH(flash0);
44__flash0_end__ = __flash0_base__ + __flash0_size__;
45__flash1_base__ = ORIGIN(flash1);
46__flash1_size__ = LENGTH(flash1);
47__flash1_end__ = __flash1_base__ + __flash1_size__;
48__flash2_base__ = ORIGIN(flash2);
49__flash2_size__ = LENGTH(flash2);
50__flash2_end__ = __flash2_base__ + __flash2_size__;
51__flash3_base__ = ORIGIN(flash3);
52__flash3_size__ = LENGTH(flash3);
53__flash3_end__ = __flash3_base__ + __flash3_size__;
54__flash4_base__ = ORIGIN(flash4);
55__flash4_size__ = LENGTH(flash4);
56__flash4_end__ = __flash4_base__ + __flash4_size__;
57__flash5_base__ = ORIGIN(flash5);
58__flash5_size__ = LENGTH(flash5);
59__flash5_end__ = __flash5_base__ + __flash5_size__;
60__flash6_base__ = ORIGIN(flash6);
61__flash6_size__ = LENGTH(flash6);
62__flash6_end__ = __flash6_base__ + __flash6_size__;
63__flash7_base__ = ORIGIN(flash7);
64__flash7_size__ = LENGTH(flash7);
65__flash7_end__ = __flash7_base__ + __flash7_size__;
66
67SECTIONS
68{
69 .ram0_init : ALIGN(4)
70 {
71 __ram0_init_text__ = LOADADDR(.ram0_init);
72 __ram0_init__ = .;
73 KEEP(*(.ram0_init))
74 KEEP(*(.ram0_init.*))
75 . = ALIGN(4);
76 } > ram0 AT > RAM_INIT_FLASH_LMA
77
78 .ram0 (NOLOAD) : ALIGN(4)
79 {
80 __ram0_clear__ = .;
81 *(.ram0_clear)
82 *(.ram0_clear.*)
83 . = ALIGN(4);
84 __ram0_noinit__ = .;
85 *(.ram0)
86 *(.ram0.*)
87 . = ALIGN(4);
88 __ram0_free__ = .;
89 } > ram0
90
91 .ram1_init : ALIGN(4)
92 {
93 __ram1_init_text__ = LOADADDR(.ram1_init);
94 __ram1_init__ = .;
95 KEEP(*(.ram1_init))
96 KEEP(*(.ram1_init.*))
97 . = ALIGN(4);
98 } > ram1 AT > RAM_INIT_FLASH_LMA
99
100 .ram1 (NOLOAD) : ALIGN(4)
101 {
102 __ram1_clear__ = .;
103 *(.ram1_clear)
104 *(.ram1_clear.*)
105 . = ALIGN(4);
106 __ram1_noinit__ = .;
107 *(.ram1)
108 *(.ram1.*)
109 . = ALIGN(4);
110 __ram1_free__ = .;
111 } > ram1
112
113 .ram2_init : ALIGN(4)
114 {
115 __ram2_init_text__ = LOADADDR(.ram2_init);
116 __ram2_init__ = .;
117 KEEP(*(.ram2_init))
118 KEEP(*(.ram2_init.*))
119 . = ALIGN(4);
120 } > ram2 AT > RAM_INIT_FLASH_LMA
121
122 .ram2 (NOLOAD) : ALIGN(4)
123 {
124 __ram2_clear__ = .;
125 *(.ram2_clear)
126 *(.ram2_clear.*)
127 . = ALIGN(4);
128 __ram2_noinit__ = .;
129 *(.ram2)
130 *(.ram2.*)
131 . = ALIGN(4);
132 __ram2_free__ = .;
133 } > ram2
134
135 .ram3_init : ALIGN(4)
136 {
137 __ram3_init_text__ = LOADADDR(.ram3_init);
138 __ram3_init__ = .;
139 KEEP(*(.ram3_init))
140 KEEP(*(.ram3_init.*))
141 . = ALIGN(4);
142 } > ram3 AT > RAM_INIT_FLASH_LMA
143
144 .ram3 (NOLOAD) : ALIGN(4)
145 {
146 __ram3_clear__ = .;
147 *(.ram3_clear)
148 *(.ram3_clear.*)
149 . = ALIGN(4);
150 __ram3_noinit__ = .;
151 *(.ram3)
152 *(.ram3.*)
153 . = ALIGN(4);
154 __ram3_free__ = .;
155 } > ram3
156
157 .ram4_init : ALIGN(4)
158 {
159 __ram4_init_text__ = LOADADDR(.ram4_init);
160 __ram4_init__ = .;
161 KEEP(*(.ram4_init))
162 KEEP(*(.ram4_init.*))
163 . = ALIGN(4);
164 } > ram4 AT > RAM_INIT_FLASH_LMA
165
166 .ram4 (NOLOAD) : ALIGN(4)
167 {
168 __ram4_clear__ = .;
169 *(.ram4_clear)
170 *(.ram4_clear.*)
171 . = ALIGN(4);
172 __ram4_noinit__ = .;
173 *(.ram4)
174 *(.ram4.*)
175 . = ALIGN(4);
176 __ram4_free__ = .;
177 } > ram4
178
179 .ram5_init : ALIGN(4)
180 {
181 __ram5_init_text__ = LOADADDR(.ram5_init);
182 __ram5_init__ = .;
183 KEEP(*(.ram5_init))
184 KEEP(*(.ram5_init.*))
185 . = ALIGN(4);
186 } > ram5 AT > RAM_INIT_FLASH_LMA
187
188 .ram5 (NOLOAD) : ALIGN(4)
189 {
190 __ram5_clear__ = .;
191 *(.ram5_clear)
192 *(.ram5_clear.*)
193 . = ALIGN(4);
194 __ram5_noinit__ = .;
195 *(.ram5)
196 *(.ram5.*)
197 . = ALIGN(4);
198 __ram5_free__ = .;
199 } > ram5
200
201 .ram6_init : ALIGN(4)
202 {
203 __ram6_init_text__ = LOADADDR(.ram6_init);
204 __ram6_init__ = .;
205 KEEP(*(.ram6_init))
206 KEEP(*(.ram6_init.*))
207 . = ALIGN(4);
208 } > ram6 AT > RAM_INIT_FLASH_LMA
209
210 .ram6 (NOLOAD) : ALIGN(4)
211 {
212 __ram6_clear__ = .;
213 *(.ram6_clear)
214 *(.ram6_clear.*)
215 . = ALIGN(4);
216 __ram6_noinit__ = .;
217 *(.ram6)
218 *(.ram6.*)
219 . = ALIGN(4);
220 __ram6_free__ = .;
221 } > ram6
222
223 .ram7_init : ALIGN(4)
224 {
225 __ram7_init_text__ = LOADADDR(.ram7_init);
226 __ram7_init__ = .;
227 KEEP(*(.ram7_init))
228 KEEP(*(.ram7_init.*))
229 . = ALIGN(4);
230 } > ram7 AT > RAM_INIT_FLASH_LMA
231
232 .ram7 (NOLOAD) : ALIGN(4)
233 {
234 __ram7_clear__ = .;
235 *(.ram7_clear)
236 *(.ram7_clear.*)
237 . = ALIGN(4);
238 __ram7_noinit__ = .;
239 *(.ram7)
240 *(.ram7.*)
241 . = ALIGN(4);
242 __ram7_free__ = .;
243 } > ram7
244
245 .flash0 : ALIGN(4)
246 {
247 __flash0_init__ = .;
248 KEEP(*(.flash0_init))
249 KEEP(*(.flash0_init.*))
250 __flash0_free__ = .;
251 } > flash0
252
253 .flash1 : ALIGN(4)
254 {
255 __flash1_init__ = .;
256 KEEP(*(.flash1_init))
257 KEEP(*(.flash1_init.*))
258 __flash1_free__ = .;
259 } > flash1
260
261 .flash2 : ALIGN(4)
262 {
263 __flash2_init__ = .;
264 KEEP(*(.flash2_init))
265 KEEP(*(.flash2_init.*))
266 __flash2_free__ = .;
267 } > flash2
268
269 .flash3 : ALIGN(4)
270 {
271 __flash3_init__ = .;
272 KEEP(*(.flash3_init))
273 KEEP(*(.flash3_init.*))
274 __flash3_free__ = .;
275 } > flash3
276
277 .flash4 : ALIGN(4)
278 {
279 __flash4_init__ = .;
280 KEEP(*(.flash4_init))
281 KEEP(*(.flash4_init.*))
282 __flash4_free__ = .;
283 } > flash4
284
285 .flash5 : ALIGN(4)
286 {
287 __flash5_init__ = .;
288 KEEP(*(.flash5_init))
289 KEEP(*(.flash5_init.*))
290 __flash5_free__ = .;
291 } > flash5
292
293 .flash6 : ALIGN(4)
294 {
295 __flash6_init__ = .;
296 KEEP(*(.flash6_init))
297 KEEP(*(.flash6_init.*))
298 __flash6_free__ = .;
299 } > flash6
300
301 .flash7 : ALIGN(4)
302 {
303 __flash7_init__ = .;
304 KEEP(*(.flash7_init))
305 KEEP(*(.flash7_init.*))
306 __flash7_free__ = .;
307 } > flash7
308
309 /* The default heap uses the (statically) unused part of a RAM section.*/
310 .heap (NOLOAD) :
311 {
312 . = ALIGN(8);
313 __heap_base__ = .;
314 . = ORIGIN(HEAP_RAM) + LENGTH(HEAP_RAM);
315 __heap_end__ = .;
316 } > HEAP_RAM
317}
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/rules_stacks.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/rules_stacks.ld
new file mode 100644
index 000000000..837478e1e
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/rules_stacks.ld
@@ -0,0 +1,40 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17SECTIONS
18{
19 /* Special section for exceptions stack.*/
20 .mstack (NOLOAD) :
21 {
22 . = ALIGN(8);
23 __main_stack_base__ = .;
24 . += __main_stack_size__;
25 . = ALIGN(8);
26 __main_stack_end__ = .;
27 } > MAIN_STACK_RAM
28
29 /* Special section for process stack.*/
30 .pstack (NOLOAD) :
31 {
32 . = ALIGN(8);
33 __process_stack_base__ = .;
34 __main_thread_stack_base__ = .;
35 . += __process_stack_size__;
36 . = ALIGN(8);
37 __process_stack_end__ = .;
38 __main_thread_stack_end__ = .;
39 } > PROCESS_STACK_RAM
40}
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/arm-none-eabi.mk b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/arm-none-eabi.mk
new file mode 100644
index 000000000..986f08b2e
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/arm-none-eabi.mk
@@ -0,0 +1,23 @@
1##############################################################################
2# Compiler settings
3#
4
5TRGT = arm-none-eabi-
6CC = $(TRGT)gcc
7CPPC = $(TRGT)g++
8# Enable loading with g++ only if you need C++ runtime support.
9# NOTE: You can use C++ even without C++ support if you are careful. C++
10# runtime support makes code size explode.
11LD = $(TRGT)gcc
12#LD = $(TRGT)g++
13CP = $(TRGT)objcopy
14AS = $(TRGT)gcc -x assembler-with-cpp
15AR = $(TRGT)ar
16OD = $(TRGT)objdump
17SZ = $(TRGT)size
18HEX = $(CP) -O ihex
19BIN = $(CP) -O binary
20
21#
22# Compiler settings
23##############################################################################
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/rules.mk b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/rules.mk
new file mode 100644
index 000000000..a7de8cf1d
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/rules.mk
@@ -0,0 +1,291 @@
1# ARM Cortex-Mx common makefile scripts and rules.
2
3##############################################################################
4# Processing options coming from the upper Makefile.
5#
6
7# Compiler options
8OPT := $(USE_OPT)
9COPT := $(USE_COPT)
10CPPOPT := $(USE_CPPOPT)
11
12# Garbage collection
13ifeq ($(USE_LINK_GC),yes)
14 OPT += -ffunction-sections -fdata-sections -fno-common
15 LDOPT := ,--gc-sections
16else
17 LDOPT :=
18endif
19
20# Linker extra options
21ifneq ($(USE_LDOPT),)
22 LDOPT := $(LDOPT),$(USE_LDOPT)
23endif
24
25# Link time optimizations
26ifeq ($(USE_LTO),yes)
27 OPT += -flto
28endif
29
30# FPU options default (Cortex-M4 and Cortex-M7 single precision).
31ifeq ($(USE_FPU_OPT),)
32 USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv4-sp-d16
33endif
34
35# FPU-related options
36ifeq ($(USE_FPU),)
37 USE_FPU = no
38endif
39ifneq ($(USE_FPU),no)
40 OPT += $(USE_FPU_OPT)
41 DDEFS += -DCORTEX_USE_FPU=TRUE
42 DADEFS += -DCORTEX_USE_FPU=TRUE
43else
44 DDEFS += -DCORTEX_USE_FPU=FALSE
45 DADEFS += -DCORTEX_USE_FPU=FALSE
46endif
47
48# Process stack size
49ifeq ($(USE_PROCESS_STACKSIZE),)
50 LDOPT := $(LDOPT),--defsym=__process_stack_size__=0x400
51else
52 LDOPT := $(LDOPT),--defsym=__process_stack_size__=$(USE_PROCESS_STACKSIZE)
53endif
54
55# Exceptions stack size
56ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
57 LDOPT := $(LDOPT),--defsym=__main_stack_size__=0x400
58else
59 LDOPT := $(LDOPT),--defsym=__main_stack_size__=$(USE_EXCEPTIONS_STACKSIZE)
60endif
61
62# Output directory and files
63ifeq ($(BUILDDIR),)
64 BUILDDIR = build
65endif
66ifeq ($(BUILDDIR),.)
67 BUILDDIR = build
68endif
69
70# Dependencies directory
71ifeq ($(DEPDIR),)
72 DEPDIR = .dep
73endif
74ifeq ($(DEPDIR),.)
75 DEPDIR = .dep
76endif
77
78OUTFILES := $(BUILDDIR)/$(PROJECT).elf \
79 $(BUILDDIR)/$(PROJECT).hex \
80 $(BUILDDIR)/$(PROJECT).bin \
81 $(BUILDDIR)/$(PROJECT).dmp \
82 $(BUILDDIR)/$(PROJECT).list
83
84ifdef SREC
85 OUTFILES += $(BUILDDIR)/$(PROJECT).srec
86endif
87
88# Source files groups and paths
89TCSRC += $(CSRC)
90TCPPSRC += $(CPPSRC)
91TSRC := $(TCSRC) $(TCPPSRC)
92SRCPATHS := $(sort $(dir $(ASMXSRC)) $(dir $(ASMSRC)) $(dir $(TSRC)))
93
94# Various directories
95OBJDIR := $(BUILDDIR)/obj
96LSTDIR := $(BUILDDIR)/lst
97
98# Object files groups
99TCOBJS := $(addprefix $(OBJDIR)/, $(notdir $(TCSRC:.c=.o)))
100#TCPPOBJS := $(addprefix $(OBJDIR)/, $(notdir $(TCPPSRC:.cpp=.o)))
101TCPPOBJS := $(addprefix $(OBJDIR)/, $(notdir $(patsubst %.cpp, %.o, $(filter %.cpp, $(TCPPSRC)))))
102TCCOBJS := $(addprefix $(OBJDIR)/, $(notdir $(patsubst %.cc, %.o, $(filter %.cc, $(TCPPSRC)))))
103ASMOBJS := $(addprefix $(OBJDIR)/, $(notdir $(ASMSRC:.s=.o)))
104ASMXOBJS := $(addprefix $(OBJDIR)/, $(notdir $(ASMXSRC:.S=.o)))
105#OBJS := $(ASMXOBJS) $(ASMOBJS) $(ACOBJS) $(TCOBJS) $(ACPPOBJS) $(TCPPOBJS)
106OBJS := $(ASMXOBJS) $(ASMOBJS) $(ACOBJS) $(TCOBJS) $(ACPPOBJS) $(TCPPOBJS) $(TCCOBJS)
107
108# Paths
109IINCDIR := $(patsubst %,-I%,$(INCDIR) $(DINCDIR) $(UINCDIR))
110LLIBDIR := $(patsubst %,-L%,$(DLIBDIR) $(ULIBDIR))
111
112# Macros
113DEFS := $(DDEFS) $(UDEFS)
114ADEFS := $(DADEFS) $(UADEFS)
115
116# Libs
117LIBS := $(DLIBS) $(ULIBS)
118
119# Various settings
120MCFLAGS := -mcpu=$(MCU) -mthumb
121ODFLAGS = -x --syms
122ASFLAGS = $(MCFLAGS) $(OPT) -Wa,-amhls=$(LSTDIR)/$(notdir $(<:.s=.lst)) $(ADEFS)
123ASXFLAGS = $(MCFLAGS) $(OPT) -Wa,-amhls=$(LSTDIR)/$(notdir $(<:.S=.lst)) $(ADEFS)
124CFLAGS = $(MCFLAGS) $(OPT) $(COPT) $(CWARN) -Wa,-alms=$(LSTDIR)/$(notdir $(<:.c=.lst)) $(DEFS)
125CPPFLAGS = $(MCFLAGS) $(OPT) $(CPPOPT) $(CPPWARN) -Wa,-alms=$(LSTDIR)/$(notdir $(<:.cpp=.lst)) $(DEFS)
126LDFLAGS = $(MCFLAGS) $(OPT) -nostartfiles $(LLIBDIR) -Wl,-Map=$(BUILDDIR)/$(PROJECT).map,--cref,--no-warn-mismatch,--library-path=$(STARTUPLD),--script=$(LDSCRIPT)$(LDOPT)
127
128# Generate dependency information
129ASFLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
130ASXFLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
131CFLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
132CPPFLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
133
134# Paths where to search for sources
135VPATH = $(SRCPATHS)
136
137#
138# Makefile rules
139#
140
141all: PRE_MAKE_ALL_RULE_HOOK $(OBJS) $(OUTFILES) POST_MAKE_ALL_RULE_HOOK
142
143PRE_MAKE_ALL_RULE_HOOK:
144
145POST_MAKE_ALL_RULE_HOOK:
146
147$(OBJS): | PRE_MAKE_ALL_RULE_HOOK $(BUILDDIR) $(OBJDIR) $(LSTDIR) $(DEPDIR)
148
149$(BUILDDIR):
150ifneq ($(USE_VERBOSE_COMPILE),yes)
151 @echo Compiler Options
152 @echo $(CC) -c $(CFLAGS) -I. $(IINCDIR) main.c -o main.o
153 @echo
154endif
155 @mkdir -p $(BUILDDIR)
156
157$(OBJDIR):
158 @mkdir -p $(OBJDIR)
159
160$(LSTDIR):
161 @mkdir -p $(LSTDIR)
162
163$(DEPDIR):
164 @mkdir -p $(DEPDIR)
165
166$(TCPPOBJS) : $(OBJDIR)/%.o : %.cpp $(MAKEFILE_LIST)
167ifeq ($(USE_VERBOSE_COMPILE),yes)
168 @echo
169 $(CPPC) -c $(CPPFLAGS) -I. $(IINCDIR) $< -o $@
170else
171 @echo Compiling $(<F)
172 @$(CPPC) -c $(CPPFLAGS) -I. $(IINCDIR) $< -o $@
173endif
174
175$(TCCOBJS) : $(OBJDIR)/%.o : %.cc $(MAKEFILE_LIST)
176ifeq ($(USE_VERBOSE_COMPILE),yes)
177 @echo
178 $(CPPC) -c $(CPPFLAGS) -I. $(IINCDIR) $< -o $@
179else
180 @echo Compiling $(<F)
181 @$(CPPC) -c $(CPPFLAGS) -I. $(IINCDIR) $< -o $@
182endif
183
184$(TCOBJS) : $(OBJDIR)/%.o : %.c $(MAKEFILE_LIST)
185ifeq ($(USE_VERBOSE_COMPILE),yes)
186 @echo
187 $(CC) -c $(CFLAGS) -I. $(IINCDIR) $< -o $@
188else
189 @echo Compiling $(<F)
190 @$(CC) -c $(CFLAGS) -I. $(IINCDIR) $< -o $@
191endif
192
193$(ASMOBJS) : $(OBJDIR)/%.o : %.s $(MAKEFILE_LIST)
194ifeq ($(USE_VERBOSE_COMPILE),yes)
195 @echo
196 $(AS) -c $(ASFLAGS) -I. $(IINCDIR) $< -o $@
197else
198 @echo Compiling $(<F)
199 @$(AS) -c $(ASFLAGS) -I. $(IINCDIR) $< -o $@
200endif
201
202$(ASMXOBJS) : $(OBJDIR)/%.o : %.S $(MAKEFILE_LIST)
203ifeq ($(USE_VERBOSE_COMPILE),yes)
204 @echo
205 $(CC) -c $(ASXFLAGS) $(TOPT) -I. $(IINCDIR) $< -o $@
206else
207 @echo Compiling $(<F)
208 @$(CC) -c $(ASXFLAGS) $(TOPT) -I. $(IINCDIR) $< -o $@
209endif
210
211$(BUILDDIR)/$(PROJECT).elf: $(OBJS) $(LDSCRIPT)
212ifeq ($(USE_VERBOSE_COMPILE),yes)
213 @echo
214 $(LD) $(OBJS) $(LDFLAGS) $(LIBS) -o $@
215else
216 @echo Linking $@
217 @$(LD) $(OBJS) $(LDFLAGS) $(LIBS) -o $@
218endif
219
220%.hex: %.elf
221ifeq ($(USE_VERBOSE_COMPILE),yes)
222 $(HEX) $< $@
223else
224 @echo Creating $@
225 @$(HEX) $< $@
226endif
227
228%.bin: %.elf
229ifeq ($(USE_VERBOSE_COMPILE),yes)
230 $(BIN) $< $@
231else
232 @echo Creating $@
233 @$(BIN) $< $@
234endif
235
236%.srec: %.elf
237ifdef SREC
238 ifeq ($(USE_VERBOSE_COMPILE),yes)
239 $(SREC) $< $@
240 else
241 @echo Creating $@
242 @$(SREC) $< $@
243 endif
244endif
245
246%.dmp: %.elf
247ifeq ($(USE_VERBOSE_COMPILE),yes)
248 $(OD) $(ODFLAGS) $< > $@
249 $(SZ) $<
250else
251 @echo Creating $@
252 @$(OD) $(ODFLAGS) $< > $@
253 @echo
254 @$(SZ) $<
255endif
256
257%.list: %.elf
258ifeq ($(USE_VERBOSE_COMPILE),yes)
259 $(OD) -S $< > $@
260else
261 @echo Creating $@
262 @$(OD) -S $< > $@
263 @echo
264 @echo Done
265endif
266
267lib: $(OBJS) $(BUILDDIR)/lib$(PROJECT).a
268
269$(BUILDDIR)/lib$(PROJECT).a: $(OBJS)
270 @$(AR) -r $@ $^
271 @echo
272 @echo Done
273
274clean: CLEAN_RULE_HOOK
275 @echo Cleaning
276 @echo - $(DEPDIR)
277 @-rm -fR $(DEPDIR)/* $(BUILDDIR)/* 2>/dev/null
278 @-if [ -d "$(DEPDIR)" ]; then rmdir -p --ignore-fail-on-non-empty $(subst ./,,$(DEPDIR)) 2>/dev/null; fi
279 @echo - $(BUILDDIR)
280 @-if [ -d "$(BUILDDIR)" ]; then rmdir -p --ignore-fail-on-non-empty $(subst ./,,$(BUILDDIR)) 2>/dev/null; fi
281 @echo
282 @echo Done
283
284CLEAN_RULE_HOOK:
285
286#
287# Include the dependency files, should be the last of the makefile
288#
289-include $(wildcard $(DEPDIR)/*)
290
291# *** EOF ***
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_aducm36x.mk b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_aducm36x.mk
new file mode 100644
index 000000000..5d56ba636
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_aducm36x.mk
@@ -0,0 +1,18 @@
1# List of the ChibiOS generic ADUCM36x startup and CMSIS files.
2STARTUPSRC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt1.c
3
4STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v7m.S \
5 $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/vectors.S
6
7STARTUPINC = $(CHIBIOS)/os/common/portability/GCC \
8 $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC \
9 $(CHIBIOS)/os/common/startup/ARMCMx/devices/ADUCM36x \
10 $(CHIBIOS)/os/common/ext/ARM/CMSIS/Core/Include \
11 $(CHIBIOS)/os/common/ext/ADI/ADUCM36x
12
13STARTUPLD = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/ld
14
15# Shared variables
16ALLXASMSRC += $(STARTUPASM)
17ALLCSRC += $(STARTUPSRC)
18ALLINC += $(STARTUPINC)
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_aducm41x.mk b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_aducm41x.mk
new file mode 100644
index 000000000..7969c9445
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_aducm41x.mk
@@ -0,0 +1,18 @@
1# List of the ChibiOS generic ADUCM41x startup and CMSIS files.
2STARTUPSRC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt1.c
3
4STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v7m.S \
5 $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/vectors.S
6
7STARTUPINC = $(CHIBIOS)/os/common/portability/GCC \
8 $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC \
9 $(CHIBIOS)/os/common/startup/ARMCMx/devices/ADUCM41x \
10 $(CHIBIOS)/os/common/ext/ARM/CMSIS/Core/Include \
11 $(CHIBIOS)/os/common/ext/ADI/ADUCM41x
12
13STARTUPLD = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/ld
14
15# Shared variables
16ALLXASMSRC += $(STARTUPASM)
17ALLCSRC += $(STARTUPSRC)
18ALLINC += $(STARTUPINC)
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f0xx.mk b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f0xx.mk
new file mode 100644
index 000000000..845a89454
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f0xx.mk
@@ -0,0 +1,18 @@
1# List of the ChibiOS generic STM32F0xx startup and CMSIS files.
2STARTUPSRC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt1.c
3
4STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v6m.S \
5 $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/vectors.S
6
7STARTUPINC = $(CHIBIOS)/os/common/portability/GCC \
8 $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC \
9 $(CHIBIOS)/os/common/startup/ARMCMx/devices/STM32F0xx \
10 $(CHIBIOS)/os/common/ext/ARM/CMSIS/Core/Include \
11 $(CHIBIOS)/os/common/ext/ST/STM32F0xx
12
13STARTUPLD = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/ld
14
15# Shared variables
16ALLXASMSRC += $(STARTUPASM)
17ALLCSRC += $(STARTUPSRC)
18ALLINC += $(STARTUPINC)
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f1xx.mk b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f1xx.mk
new file mode 100644
index 000000000..c0e11cb60
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f1xx.mk
@@ -0,0 +1,18 @@
1# List of the ChibiOS generic STM32F1xx startup and CMSIS files.
2STARTUPSRC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt1.c
3
4STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v7m.S \
5 $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/vectors.S
6
7STARTUPINC = $(CHIBIOS)/os/common/portability/GCC \
8 $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC \
9 $(CHIBIOS)/os/common/startup/ARMCMx/devices/STM32F1xx \
10 $(CHIBIOS)/os/common/ext/ARM/CMSIS/Core/Include \
11 $(CHIBIOS)/os/common/ext/ST/STM32F1xx
12
13STARTUPLD = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/ld
14
15# Shared variables
16ALLXASMSRC += $(STARTUPASM)
17ALLCSRC += $(STARTUPSRC)
18ALLINC += $(STARTUPINC)
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f2xx.mk b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f2xx.mk
new file mode 100644
index 000000000..17ce6c7a6
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f2xx.mk
@@ -0,0 +1,18 @@
1# List of the ChibiOS generic STM32F2xx startup and CMSIS files.
2STARTUPSRC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt1.c
3
4STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v7m.S \
5 $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/vectors.S
6
7STARTUPINC = $(CHIBIOS)/os/common/portability/GCC \
8 $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC \
9 $(CHIBIOS)/os/common/startup/ARMCMx/devices/STM32F2xx \
10 $(CHIBIOS)/os/common/ext/ARM/CMSIS/Core/Include \
11 $(CHIBIOS)/os/common/ext/ST/STM32F2xx
12
13STARTUPLD = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/ld
14
15# Shared variables
16ALLXASMSRC += $(STARTUPASM)
17ALLCSRC += $(STARTUPSRC)
18ALLINC += $(STARTUPINC)
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f3xx.mk b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f3xx.mk
new file mode 100644
index 000000000..de20c3c3d
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f3xx.mk
@@ -0,0 +1,18 @@
1# List of the ChibiOS generic STM32F3xx startup and CMSIS files.
2STARTUPSRC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt1.c
3
4STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v7m.S \
5 $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/vectors.S
6
7STARTUPINC = $(CHIBIOS)/os/common/portability/GCC \
8 $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC \
9 $(CHIBIOS)/os/common/startup/ARMCMx/devices/STM32F3xx \
10 $(CHIBIOS)/os/common/ext/ARM/CMSIS/Core/Include \
11 $(CHIBIOS)/os/common/ext/ST/STM32F3xx
12
13STARTUPLD = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/ld
14
15# Shared variables
16ALLXASMSRC += $(STARTUPASM)
17ALLCSRC += $(STARTUPSRC)
18ALLINC += $(STARTUPINC)
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk
new file mode 100644
index 000000000..7feb3d3d0
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk
@@ -0,0 +1,18 @@
1# List of the ChibiOS generic STM32F4xx startup and CMSIS files.
2STARTUPSRC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt1.c
3
4STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v7m.S \
5 $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/vectors.S
6
7STARTUPINC = $(CHIBIOS)/os/common/portability/GCC \
8 $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC \
9 $(CHIBIOS)/os/common/startup/ARMCMx/devices/STM32F4xx \
10 $(CHIBIOS)/os/common/ext/ARM/CMSIS/Core/Include \
11 $(CHIBIOS)/os/common/ext/ST/STM32F4xx
12
13STARTUPLD = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/ld
14
15# Shared variables
16ALLXASMSRC += $(STARTUPASM)
17ALLCSRC += $(STARTUPSRC)
18ALLINC += $(STARTUPINC)
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f7xx.mk b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f7xx.mk
new file mode 100644
index 000000000..b6f892b2c
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f7xx.mk
@@ -0,0 +1,18 @@
1# List of the ChibiOS generic STM32F7xx startup and CMSIS files.
2STARTUPSRC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt1.c
3
4STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v7m.S \
5 $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/vectors.S
6
7STARTUPINC = $(CHIBIOS)/os/common/portability/GCC \
8 $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC \
9 $(CHIBIOS)/os/common/startup/ARMCMx/devices/STM32F7xx \
10 $(CHIBIOS)/os/common/ext/ARM/CMSIS/Core/Include \
11 $(CHIBIOS)/os/common/ext/ST/STM32F7xx
12
13STARTUPLD = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/ld
14
15# Shared variables
16ALLXASMSRC += $(STARTUPASM)
17ALLCSRC += $(STARTUPSRC)
18ALLINC += $(STARTUPINC)
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32g0xx.mk b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32g0xx.mk
new file mode 100644
index 000000000..631a21724
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32g0xx.mk
@@ -0,0 +1,18 @@
1# List of the ChibiOS generic STM32G0xx startup and CMSIS files.
2STARTUPSRC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt1.c
3
4STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v6m.S \
5 $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/vectors.S
6
7STARTUPINC = $(CHIBIOS)/os/common/portability/GCC \
8 $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC \
9 $(CHIBIOS)/os/common/startup/ARMCMx/devices/STM32G0xx \
10 $(CHIBIOS)/os/common/ext/ARM/CMSIS/Core/Include \
11 $(CHIBIOS)/os/common/ext/ST/STM32G0xx
12
13STARTUPLD = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/ld
14
15# Shared variables
16ALLXASMSRC += $(STARTUPASM)
17ALLCSRC += $(STARTUPSRC)
18ALLINC += $(STARTUPINC)
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32g4xx.mk b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32g4xx.mk
new file mode 100644
index 000000000..c71451dd2
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32g4xx.mk
@@ -0,0 +1,18 @@
1# List of the ChibiOS generic STM32G4xx startup and CMSIS files.
2STARTUPSRC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt1.c
3
4STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v7m.S \
5 $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/vectors.S
6
7STARTUPINC = $(CHIBIOS)/os/common/portability/GCC \
8 $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC \
9 $(CHIBIOS)/os/common/startup/ARMCMx/devices/STM32G4xx \
10 $(CHIBIOS)/os/common/ext/ARM/CMSIS/Core/Include \
11 $(CHIBIOS)/os/common/ext/ST/STM32G4xx
12
13STARTUPLD = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/ld
14
15# Shared variables
16ALLXASMSRC += $(STARTUPASM)
17ALLCSRC += $(STARTUPSRC)
18ALLINC += $(STARTUPINC)
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32h7xx.mk b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32h7xx.mk
new file mode 100644
index 000000000..158ddcfc2
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32h7xx.mk
@@ -0,0 +1,18 @@
1# List of the ChibiOS generic STM32H7xx startup and CMSIS files.
2STARTUPSRC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt1.c
3
4STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v7m.S \
5 $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/vectors.S
6
7STARTUPINC = $(CHIBIOS)/os/common/portability/GCC \
8 $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC \
9 $(CHIBIOS)/os/common/startup/ARMCMx/devices/STM32H7xx \
10 $(CHIBIOS)/os/common/ext/ARM/CMSIS/Core/Include \
11 $(CHIBIOS)/os/common/ext/ST/STM32H7xx
12
13STARTUPLD = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/ld
14
15# Shared variables
16ALLXASMSRC += $(STARTUPASM)
17ALLCSRC += $(STARTUPSRC)
18ALLINC += $(STARTUPINC)
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32l0xx.mk b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32l0xx.mk
new file mode 100644
index 000000000..c9c215044
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32l0xx.mk
@@ -0,0 +1,18 @@
1# List of the ChibiOS generic STM32L0xx startup and CMSIS files.
2STARTUPSRC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt1.c
3
4STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v6m.S \
5 $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/vectors.S
6
7STARTUPINC = $(CHIBIOS)/os/common/portability/GCC \
8 $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC \
9 $(CHIBIOS)/os/common/startup/ARMCMx/devices/STM32L0xx \
10 $(CHIBIOS)/os/common/ext/ARM/CMSIS/Core/Include \
11 $(CHIBIOS)/os/common/ext/ST/STM32L0xx
12
13STARTUPLD = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/ld
14
15# Shared variables
16ALLXASMSRC += $(STARTUPASM)
17ALLCSRC += $(STARTUPSRC)
18ALLINC += $(STARTUPINC)
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32l1xx.mk b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32l1xx.mk
new file mode 100644
index 000000000..407a0b41a
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32l1xx.mk
@@ -0,0 +1,18 @@
1# List of the ChibiOS generic STM32L1xx startup and CMSIS files.
2STARTUPSRC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt1.c
3
4STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v7m.S \
5 $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/vectors.S
6
7STARTUPINC = $(CHIBIOS)/os/common/portability/GCC \
8 $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC \
9 $(CHIBIOS)/os/common/startup/ARMCMx/devices/STM32L1xx \
10 $(CHIBIOS)/os/common/ext/ARM/CMSIS/Core/Include \
11 $(CHIBIOS)/os/common/ext/ST/STM32L1xx
12
13STARTUPLD = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/ld
14
15# Shared variables
16ALLXASMSRC += $(STARTUPASM)
17ALLCSRC += $(STARTUPSRC)
18ALLINC += $(STARTUPINC)
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32l4xx.mk b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32l4xx.mk
new file mode 100644
index 000000000..436082b35
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32l4xx.mk
@@ -0,0 +1,18 @@
1# List of the ChibiOS generic STM32L4xx startup and CMSIS files.
2STARTUPSRC = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt1.c
3
4STARTUPASM = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/crt0_v7m.S \
5 $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/vectors.S
6
7STARTUPINC = $(CHIBIOS)/os/common/portability/GCC \
8 $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC \
9 $(CHIBIOS)/os/common/startup/ARMCMx/devices/STM32L4xx \
10 $(CHIBIOS)/os/common/ext/ARM/CMSIS/Core/Include \
11 $(CHIBIOS)/os/common/ext/ST/STM32L4xx
12
13STARTUPLD = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/ld
14
15# Shared variables
16ALLXASMSRC += $(STARTUPASM)
17ALLCSRC += $(STARTUPSRC)
18ALLINC += $(STARTUPINC)
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/vectors.S b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/vectors.S
new file mode 100644
index 000000000..ae2e0fd74
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/vectors.S
@@ -0,0 +1,1031 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/**
18 * @file ARMCMx/GCC/vectors.S
19 * @brief Interrupt vectors for Cortex-Mx devices.
20 *
21 * @defgroup ARMCMx_GCC_VECTORS Cortex-Mx Interrupt Vectors
22 * @{
23 */
24
25#define _FROM_ASM_
26#include "cmparams.h"
27
28#if (CORTEX_NUM_VECTORS % 8) != 0
29#error "the constant CORTEX_NUM_VECTORS must be a multiple of 8"
30#endif
31
32#if (CORTEX_NUM_VECTORS < 8) || (CORTEX_NUM_VECTORS > 240)
33#error "the constant CORTEX_NUM_VECTORS must be between 8 and 240 inclusive"
34#endif
35
36/*===========================================================================*/
37/* Module constants. */
38/*===========================================================================*/
39
40/*===========================================================================*/
41/* Module pre-compile time settings. */
42/*===========================================================================*/
43
44/*===========================================================================*/
45/* Code section. */
46/*===========================================================================*/
47
48#if !defined(__DOXYGEN__)
49
50 .syntax unified
51 .cpu cortex-m0
52 .thumb
53
54 .section .vectors, "ax"
55 .align 4
56 .globl _vectors
57_vectors:
58 .long __main_stack_end__
59 .long Reset_Handler
60 .long NMI_Handler
61 .long HardFault_Handler
62 .long MemManage_Handler
63 .long BusFault_Handler
64 .long UsageFault_Handler
65 .long Vector1C
66 .long Vector20
67 .long Vector24
68 .long Vector28
69 .long SVC_Handler
70 .long DebugMon_Handler
71 .long Vector34
72 .long PendSV_Handler
73 .long SysTick_Handler
74 .long Vector40, Vector44, Vector48, Vector4C
75#if CORTEX_NUM_VECTORS > 4
76 .long Vector50, Vector54, Vector58, Vector5C
77#endif
78#if CORTEX_NUM_VECTORS > 8
79 .long Vector60, Vector64, Vector68, Vector6C
80#endif
81#if CORTEX_NUM_VECTORS > 12
82 .long Vector70, Vector74, Vector78, Vector7C
83#endif
84#if CORTEX_NUM_VECTORS > 16
85 .long Vector80, Vector84, Vector88, Vector8C
86#endif
87#if CORTEX_NUM_VECTORS > 20
88 .long Vector90, Vector94, Vector98, Vector9C
89#endif
90#if CORTEX_NUM_VECTORS > 24
91 .long VectorA0, VectorA4, VectorA8, VectorAC
92#endif
93#if CORTEX_NUM_VECTORS > 28
94 .long VectorB0, VectorB4, VectorB8, VectorBC
95#endif
96#if CORTEX_NUM_VECTORS > 32
97 .long VectorC0, VectorC4, VectorC8, VectorCC
98#endif
99#if CORTEX_NUM_VECTORS > 36
100 .long VectorD0, VectorD4, VectorD8, VectorDC
101#endif
102#if CORTEX_NUM_VECTORS > 40
103 .long VectorE0, VectorE4, VectorE8, VectorEC
104#endif
105#if CORTEX_NUM_VECTORS > 44
106 .long VectorF0, VectorF4, VectorF8, VectorFC
107#endif
108#if CORTEX_NUM_VECTORS > 48
109 .long Vector100, Vector104, Vector108, Vector10C
110#endif
111#if CORTEX_NUM_VECTORS > 52
112 .long Vector110, Vector114, Vector118, Vector11C
113#endif
114#if CORTEX_NUM_VECTORS > 56
115 .long Vector120, Vector124, Vector128, Vector12C
116#endif
117#if CORTEX_NUM_VECTORS > 60
118 .long Vector130, Vector134, Vector138, Vector13C
119#endif
120#if CORTEX_NUM_VECTORS > 64
121 .long Vector140, Vector144, Vector148, Vector14C
122#endif
123#if CORTEX_NUM_VECTORS > 68
124 .long Vector150, Vector154, Vector158, Vector15C
125#endif
126#if CORTEX_NUM_VECTORS > 72
127 .long Vector160, Vector164, Vector168, Vector16C
128#endif
129#if CORTEX_NUM_VECTORS > 76
130 .long Vector170, Vector174, Vector178, Vector17C
131#endif
132#if CORTEX_NUM_VECTORS > 80
133 .long Vector180, Vector184, Vector188, Vector18C
134#endif
135#if CORTEX_NUM_VECTORS > 84
136 .long Vector190, Vector194, Vector198, Vector19C
137#endif
138#if CORTEX_NUM_VECTORS > 88
139 .long Vector1A0, Vector1A4, Vector1A8, Vector1AC
140#endif
141#if CORTEX_NUM_VECTORS > 92
142 .long Vector1B0, Vector1B4, Vector1B8, Vector1BC
143#endif
144#if CORTEX_NUM_VECTORS > 96
145 .long Vector1C0, Vector1C4, Vector1C8, Vector1CC
146#endif
147#if CORTEX_NUM_VECTORS > 100
148 .long Vector1D0, Vector1D4, Vector1D8, Vector1DC
149#endif
150#if CORTEX_NUM_VECTORS > 104
151 .long Vector1E0, Vector1E4, Vector1E8, Vector1EC
152#endif
153#if CORTEX_NUM_VECTORS > 108
154 .long Vector1F0, Vector1F4, Vector1F8, Vector1FC
155#endif
156#if CORTEX_NUM_VECTORS > 112
157 .long Vector200, Vector204, Vector208, Vector20C
158#endif
159#if CORTEX_NUM_VECTORS > 116
160 .long Vector210, Vector214, Vector218, Vector21C
161#endif
162#if CORTEX_NUM_VECTORS > 120
163 .long Vector220, Vector224, Vector228, Vector22C
164#endif
165#if CORTEX_NUM_VECTORS > 124
166 .long Vector230, Vector234, Vector238, Vector23C
167#endif
168#if CORTEX_NUM_VECTORS > 128
169 .long Vector240, Vector244, Vector248, Vector24C
170#endif
171#if CORTEX_NUM_VECTORS > 132
172 .long Vector250, Vector254, Vector258, Vector25C
173#endif
174#if CORTEX_NUM_VECTORS > 136
175 .long Vector260, Vector264, Vector268, Vector26C
176#endif
177#if CORTEX_NUM_VECTORS > 140
178 .long Vector270, Vector274, Vector278, Vector27C
179#endif
180#if CORTEX_NUM_VECTORS > 144
181 .long Vector280, Vector284, Vector288, Vector28C
182#endif
183#if CORTEX_NUM_VECTORS > 148
184 .long Vector290, Vector294, Vector298, Vector29C
185#endif
186#if CORTEX_NUM_VECTORS > 152
187 .long Vector2A0, Vector2A4, Vector2A8, Vector2AC
188#endif
189#if CORTEX_NUM_VECTORS > 156
190 .long Vector2B0, Vector2B4, Vector2B8, Vector2BC
191#endif
192#if CORTEX_NUM_VECTORS > 160
193 .long Vector2C0, Vector2C4, Vector2C8, Vector2CC
194#endif
195#if CORTEX_NUM_VECTORS > 164
196 .long Vector2D0, Vector2D4, Vector2D8, Vector2DC
197#endif
198#if CORTEX_NUM_VECTORS > 168
199 .long Vector2E0, Vector2E4, Vector2E8, Vector2EC
200#endif
201#if CORTEX_NUM_VECTORS > 172
202 .long Vector2F0, Vector2F4, Vector2F8, Vector2FC
203#endif
204#if CORTEX_NUM_VECTORS > 176
205 .long Vector300, Vector304, Vector308, Vector30C
206#endif
207#if CORTEX_NUM_VECTORS > 180
208 .long Vector310, Vector314, Vector318, Vector31C
209#endif
210#if CORTEX_NUM_VECTORS > 184
211 .long Vector320, Vector324, Vector328, Vector32C
212#endif
213#if CORTEX_NUM_VECTORS > 188
214 .long Vector330, Vector334, Vector338, Vector33C
215#endif
216#if CORTEX_NUM_VECTORS > 192
217 .long Vector340, Vector344, Vector348, Vector34C
218#endif
219#if CORTEX_NUM_VECTORS > 196
220 .long Vector350, Vector354, Vector358, Vector35C
221#endif
222#if CORTEX_NUM_VECTORS > 200
223 .long Vector360, Vector364, Vector368, Vector36C
224#endif
225#if CORTEX_NUM_VECTORS > 204
226 .long Vector370, Vector374, Vector378, Vector37C
227#endif
228#if CORTEX_NUM_VECTORS > 208
229 .long Vector380, Vector384, Vector388, Vector38C
230#endif
231#if CORTEX_NUM_VECTORS > 212
232 .long Vector390, Vector394, Vector398, Vector39C
233#endif
234#if CORTEX_NUM_VECTORS > 216
235 .long Vector3A0, Vector3A4, Vector3A8, Vector3AC
236#endif
237#if CORTEX_NUM_VECTORS > 220
238 .long Vector3B0, Vector3B4, Vector3B8, Vector3BC
239#endif
240#if CORTEX_NUM_VECTORS > 224
241 .long Vector3C0, Vector3C4, Vector3C8, Vector3CC
242#endif
243#if CORTEX_NUM_VECTORS > 228
244 .long Vector3D0, Vector3D4, Vector3D8, Vector3DC
245#endif
246#if CORTEX_NUM_VECTORS > 232
247 .long Vector3E0, Vector3E4, Vector3E8, Vector3EC
248#endif
249#if CORTEX_NUM_VECTORS > 236
250 .long Vector3F0, Vector3F4, Vector3F8, Vector3FC
251#endif
252
253 .text
254
255 .align 2
256 .thumb_func
257 .weak Reset_Handler
258Reset_Handler:
259 b _crt0_entry
260
261 .thumb_func
262 .weak NMI_Handler
263 .weak HardFault_Handler
264 .weak MemManage_Handler
265 .weak BusFault_Handler
266 .weak UsageFault_Handler
267 .weak Vector1C
268 .weak Vector20
269 .weak Vector24
270 .weak Vector28
271 .weak SVC_Handler
272 .weak DebugMon_Handler
273 .weak Vector34
274 .weak PendSV_Handler
275 .weak SysTick_Handler
276 .weak Vector40, Vector44, Vector48, Vector4C
277#if CORTEX_NUM_VECTORS > 4
278 .weak Vector50, Vector54, Vector58, Vector5C
279#endif
280#if CORTEX_NUM_VECTORS > 8
281 .weak Vector60, Vector64, Vector68, Vector6C
282#endif
283#if CORTEX_NUM_VECTORS > 12
284 .weak Vector70, Vector74, Vector78, Vector7C
285#endif
286#if CORTEX_NUM_VECTORS > 16
287 .weak Vector80, Vector84, Vector88, Vector8C
288#endif
289#if CORTEX_NUM_VECTORS > 20
290 .weak Vector90, Vector94, Vector98, Vector9C
291#endif
292#if CORTEX_NUM_VECTORS > 24
293 .weak VectorA0, VectorA4, VectorA8, VectorAC
294#endif
295#if CORTEX_NUM_VECTORS > 28
296 .weak VectorB0, VectorB4, VectorB8, VectorBC
297#endif
298#if CORTEX_NUM_VECTORS > 32
299 .weak VectorC0, VectorC4, VectorC8, VectorCC
300#endif
301#if CORTEX_NUM_VECTORS > 36
302 .weak VectorD0, VectorD4, VectorD8, VectorDC
303#endif
304#if CORTEX_NUM_VECTORS > 40
305 .weak VectorE0, VectorE4, VectorE8, VectorEC
306#endif
307#if CORTEX_NUM_VECTORS > 44
308 .weak VectorF0, VectorF4, VectorF8, VectorFC
309#endif
310#if CORTEX_NUM_VECTORS > 48
311 .weak Vector100, Vector104, Vector108, Vector10C
312#endif
313#if CORTEX_NUM_VECTORS > 52
314 .weak Vector110, Vector114, Vector118, Vector11C
315#endif
316#if CORTEX_NUM_VECTORS > 56
317 .weak Vector120, Vector124, Vector128, Vector12C
318#endif
319#if CORTEX_NUM_VECTORS > 60
320 .weak Vector130, Vector134, Vector138, Vector13C
321#endif
322#if CORTEX_NUM_VECTORS > 64
323 .weak Vector140, Vector144, Vector148, Vector14C
324#endif
325#if CORTEX_NUM_VECTORS > 68
326 .weak Vector150, Vector154, Vector158, Vector15C
327#endif
328#if CORTEX_NUM_VECTORS > 72
329 .weak Vector160, Vector164, Vector168, Vector16C
330#endif
331#if CORTEX_NUM_VECTORS > 76
332 .weak Vector170, Vector174, Vector178, Vector17C
333#endif
334#if CORTEX_NUM_VECTORS > 80
335 .weak Vector180, Vector184, Vector188, Vector18C
336#endif
337#if CORTEX_NUM_VECTORS > 84
338 .weak Vector190, Vector194, Vector198, Vector19C
339#endif
340#if CORTEX_NUM_VECTORS > 88
341 .weak Vector1A0, Vector1A4, Vector1A8, Vector1AC
342#endif
343#if CORTEX_NUM_VECTORS > 92
344 .weak Vector1B0, Vector1B4, Vector1B8, Vector1BC
345#endif
346#if CORTEX_NUM_VECTORS > 96
347 .weak Vector1C0, Vector1C4, Vector1C8, Vector1CC
348#endif
349#if CORTEX_NUM_VECTORS > 100
350 .weak Vector1D0, Vector1D4, Vector1D8, Vector1DC
351#endif
352#if CORTEX_NUM_VECTORS > 104
353 .weak Vector1E0, Vector1E4, Vector1E8, Vector1EC
354#endif
355#if CORTEX_NUM_VECTORS > 108
356 .weak Vector1F0, Vector1F4, Vector1F8, Vector1FC
357#endif
358#if CORTEX_NUM_VECTORS > 112
359 .weak Vector200, Vector204, Vector208, Vector20C
360#endif
361#if CORTEX_NUM_VECTORS > 116
362 .weak Vector210, Vector214, Vector218, Vector21C
363#endif
364#if CORTEX_NUM_VECTORS > 120
365 .weak Vector220, Vector224, Vector228, Vector22C
366#endif
367#if CORTEX_NUM_VECTORS > 124
368 .weak Vector230, Vector234, Vector238, Vector23C
369#endif
370#if CORTEX_NUM_VECTORS > 128
371 .weak Vector240, Vector244, Vector248, Vector24C
372#endif
373#if CORTEX_NUM_VECTORS > 132
374 .weak Vector250, Vector254, Vector258, Vector25C
375#endif
376#if CORTEX_NUM_VECTORS > 136
377 .weak Vector260, Vector264, Vector268, Vector26C
378#endif
379#if CORTEX_NUM_VECTORS > 140
380 .weak Vector270, Vector274, Vector278, Vector27C
381#endif
382#if CORTEX_NUM_VECTORS > 144
383 .weak Vector280, Vector284, Vector288, Vector28C
384#endif
385#if CORTEX_NUM_VECTORS > 148
386 .weak Vector290, Vector294, Vector298, Vector29C
387#endif
388#if CORTEX_NUM_VECTORS > 152
389 .weak Vector2A0, Vector2A4, Vector2A8, Vector2AC
390#endif
391#if CORTEX_NUM_VECTORS > 156
392 .weak Vector2B0, Vector2B4, Vector2B8, Vector2BC
393#endif
394#if CORTEX_NUM_VECTORS > 160
395 .weak Vector2C0, Vector2C4, Vector2C8, Vector2CC
396#endif
397#if CORTEX_NUM_VECTORS > 164
398 .weak Vector2D0, Vector2D4, Vector2D8, Vector2DC
399#endif
400#if CORTEX_NUM_VECTORS > 168
401 .weak Vector2E0, Vector2E4, Vector2E8, Vector2EC
402#endif
403#if CORTEX_NUM_VECTORS > 172
404 .weak Vector2F0, Vector2F4, Vector2F8, Vector2FC
405#endif
406#if CORTEX_NUM_VECTORS > 176
407 .weak Vector300, Vector304, Vector308, Vector30C
408#endif
409#if CORTEX_NUM_VECTORS > 180
410 .weak Vector310, Vector314, Vector318, Vector31C
411#endif
412#if CORTEX_NUM_VECTORS > 184
413 .weak Vector320, Vector324, Vector328, Vector32C
414#endif
415#if CORTEX_NUM_VECTORS > 188
416 .weak Vector330, Vector334, Vector338, Vector33C
417#endif
418#if CORTEX_NUM_VECTORS > 192
419 .weak Vector340, Vector344, Vector348, Vector34C
420#endif
421#if CORTEX_NUM_VECTORS > 196
422 .weak Vector350, Vector354, Vector358, Vector35C
423#endif
424#if CORTEX_NUM_VECTORS > 200
425 .weak Vector360, Vector364, Vector368, Vector36C
426#endif
427#if CORTEX_NUM_VECTORS > 204
428 .weak Vector370, Vector374, Vector378, Vector37C
429#endif
430#if CORTEX_NUM_VECTORS > 208
431 .weak Vector380, Vector384, Vector388, Vector38C
432#endif
433#if CORTEX_NUM_VECTORS > 212
434 .weak Vector390, Vector394, Vector398, Vector39C
435#endif
436#if CORTEX_NUM_VECTORS > 216
437 .weak Vector3A0, Vector3A4, Vector3A8, Vector3AC
438#endif
439#if CORTEX_NUM_VECTORS > 220
440 .weak Vector3B0, Vector3B4, Vector3B8, Vector3BC
441#endif
442#if CORTEX_NUM_VECTORS > 224
443 .weak Vector3C0, Vector3C4, Vector3C8, Vector3CC
444#endif
445#if CORTEX_NUM_VECTORS > 228
446 .weak Vector3D0, Vector3D4, Vector3D8, Vector3DC
447#endif
448#if CORTEX_NUM_VECTORS > 232
449 .weak Vector3E0, Vector3E4, Vector3E8, Vector3EC
450#endif
451#if CORTEX_NUM_VECTORS > 236
452 .weak Vector3F0, Vector3F4, Vector3F8, Vector3FC
453#endif
454
455 .thumb_func
456NMI_Handler:
457 .thumb_func
458HardFault_Handler:
459 .thumb_func
460MemManage_Handler:
461 .thumb_func
462BusFault_Handler:
463 .thumb_func
464UsageFault_Handler:
465 .thumb_func
466Vector1C:
467 .thumb_func
468Vector20:
469 .thumb_func
470Vector24:
471 .thumb_func
472Vector28:
473 .thumb_func
474SVC_Handler:
475 .thumb_func
476DebugMon_Handler:
477 .thumb_func
478Vector34:
479 .thumb_func
480PendSV_Handler:
481 .thumb_func
482SysTick_Handler:
483 .thumb_func
484Vector40:
485 .thumb_func
486Vector44:
487 .thumb_func
488Vector48:
489 .thumb_func
490Vector4C:
491 .thumb_func
492Vector50:
493 .thumb_func
494Vector54:
495 .thumb_func
496Vector58:
497 .thumb_func
498Vector5C:
499#if CORTEX_NUM_VECTORS > 8
500 .thumb_func
501Vector60:
502 .thumb_func
503Vector64:
504 .thumb_func
505Vector68:
506 .thumb_func
507Vector6C:
508 .thumb_func
509Vector70:
510 .thumb_func
511Vector74:
512 .thumb_func
513Vector78:
514 .thumb_func
515Vector7C:
516#endif
517#if CORTEX_NUM_VECTORS > 16
518 .thumb_func
519Vector80:
520 .thumb_func
521Vector84:
522 .thumb_func
523Vector88:
524 .thumb_func
525Vector8C:
526 .thumb_func
527Vector90:
528 .thumb_func
529Vector94:
530 .thumb_func
531Vector98:
532 .thumb_func
533Vector9C:
534#endif
535#if CORTEX_NUM_VECTORS > 24
536 .thumb_func
537VectorA0:
538 .thumb_func
539VectorA4:
540 .thumb_func
541VectorA8:
542 .thumb_func
543VectorAC:
544 .thumb_func
545VectorB0:
546 .thumb_func
547VectorB4:
548 .thumb_func
549VectorB8:
550 .thumb_func
551VectorBC:
552#endif
553#if CORTEX_NUM_VECTORS > 32
554 .thumb_func
555VectorC0:
556 .thumb_func
557VectorC4:
558 .thumb_func
559VectorC8:
560 .thumb_func
561VectorCC:
562 .thumb_func
563VectorD0:
564 .thumb_func
565VectorD4:
566 .thumb_func
567VectorD8:
568 .thumb_func
569VectorDC:
570#endif
571#if CORTEX_NUM_VECTORS > 40
572 .thumb_func
573VectorE0:
574 .thumb_func
575VectorE4:
576 .thumb_func
577VectorE8:
578 .thumb_func
579VectorEC:
580 .thumb_func
581VectorF0:
582 .thumb_func
583VectorF4:
584 .thumb_func
585VectorF8:
586 .thumb_func
587VectorFC:
588#endif
589#if CORTEX_NUM_VECTORS > 48
590 .thumb_func
591Vector100:
592 .thumb_func
593Vector104:
594 .thumb_func
595Vector108:
596 .thumb_func
597Vector10C:
598 .thumb_func
599Vector110:
600 .thumb_func
601Vector114:
602 .thumb_func
603Vector118:
604 .thumb_func
605Vector11C:
606#endif
607#if CORTEX_NUM_VECTORS > 56
608 .thumb_func
609Vector120:
610 .thumb_func
611Vector124:
612 .thumb_func
613Vector128:
614 .thumb_func
615Vector12C:
616 .thumb_func
617Vector130:
618 .thumb_func
619Vector134:
620 .thumb_func
621Vector138:
622 .thumb_func
623Vector13C:
624#endif
625#if CORTEX_NUM_VECTORS > 64
626 .thumb_func
627Vector140:
628 .thumb_func
629Vector144:
630 .thumb_func
631Vector148:
632 .thumb_func
633Vector14C:
634 .thumb_func
635Vector150:
636 .thumb_func
637Vector154:
638 .thumb_func
639Vector158:
640 .thumb_func
641Vector15C:
642#endif
643#if CORTEX_NUM_VECTORS > 72
644 .thumb_func
645Vector160:
646 .thumb_func
647Vector164:
648 .thumb_func
649Vector168:
650 .thumb_func
651Vector16C:
652 .thumb_func
653Vector170:
654 .thumb_func
655Vector174:
656 .thumb_func
657Vector178:
658 .thumb_func
659Vector17C:
660#endif
661#if CORTEX_NUM_VECTORS > 80
662 .thumb_func
663Vector180:
664 .thumb_func
665Vector184:
666 .thumb_func
667Vector188:
668 .thumb_func
669Vector18C:
670 .thumb_func
671Vector190:
672 .thumb_func
673Vector194:
674 .thumb_func
675Vector198:
676 .thumb_func
677Vector19C:
678#endif
679#if CORTEX_NUM_VECTORS > 88
680 .thumb_func
681Vector1A0:
682 .thumb_func
683Vector1A4:
684 .thumb_func
685Vector1A8:
686 .thumb_func
687Vector1AC:
688 .thumb_func
689Vector1B0:
690 .thumb_func
691Vector1B4:
692 .thumb_func
693Vector1B8:
694 .thumb_func
695Vector1BC:
696#endif
697#if CORTEX_NUM_VECTORS > 96
698 .thumb_func
699Vector1C0:
700 .thumb_func
701Vector1C4:
702 .thumb_func
703Vector1C8:
704 .thumb_func
705Vector1CC:
706 .thumb_func
707Vector1D0:
708 .thumb_func
709Vector1D4:
710 .thumb_func
711Vector1D8:
712 .thumb_func
713Vector1DC:
714#endif
715#if CORTEX_NUM_VECTORS > 104
716 .thumb_func
717Vector1E0:
718 .thumb_func
719Vector1E4:
720 .thumb_func
721Vector1E8:
722 .thumb_func
723Vector1EC:
724 .thumb_func
725Vector1F0:
726 .thumb_func
727Vector1F4:
728 .thumb_func
729Vector1F8:
730 .thumb_func
731Vector1FC:
732#endif
733#if CORTEX_NUM_VECTORS > 112
734 .thumb_func
735Vector200:
736 .thumb_func
737Vector204:
738 .thumb_func
739Vector208:
740 .thumb_func
741Vector20C:
742 .thumb_func
743Vector210:
744 .thumb_func
745Vector214:
746 .thumb_func
747Vector218:
748 .thumb_func
749Vector21C:
750#endif
751#if CORTEX_NUM_VECTORS > 120
752 .thumb_func
753Vector220:
754 .thumb_func
755Vector224:
756 .thumb_func
757Vector228:
758 .thumb_func
759Vector22C:
760 .thumb_func
761Vector230:
762 .thumb_func
763Vector234:
764 .thumb_func
765Vector238:
766 .thumb_func
767Vector23C:
768#endif
769#if CORTEX_NUM_VECTORS > 128
770 .thumb_func
771Vector240:
772 .thumb_func
773Vector244:
774 .thumb_func
775Vector248:
776 .thumb_func
777Vector24C:
778 .thumb_func
779Vector250:
780 .thumb_func
781Vector254:
782 .thumb_func
783Vector258:
784 .thumb_func
785Vector25C:
786#endif
787#if CORTEX_NUM_VECTORS > 136
788 .thumb_func
789Vector260:
790 .thumb_func
791Vector264:
792 .thumb_func
793Vector268:
794 .thumb_func
795Vector26C:
796 .thumb_func
797Vector270:
798 .thumb_func
799Vector274:
800 .thumb_func
801Vector278:
802 .thumb_func
803Vector27C:
804#endif
805#if CORTEX_NUM_VECTORS > 144
806 .thumb_func
807Vector280:
808 .thumb_func
809Vector284:
810 .thumb_func
811Vector288:
812 .thumb_func
813Vector28C:
814 .thumb_func
815Vector290:
816 .thumb_func
817Vector294:
818 .thumb_func
819Vector298:
820 .thumb_func
821Vector29C:
822#endif
823#if CORTEX_NUM_VECTORS > 152
824 .thumb_func
825Vector2A0:
826 .thumb_func
827Vector2A4:
828 .thumb_func
829Vector2A8:
830 .thumb_func
831Vector2AC:
832 .thumb_func
833Vector2B0:
834 .thumb_func
835Vector2B4:
836 .thumb_func
837Vector2B8:
838 .thumb_func
839Vector2BC:
840#endif
841#if CORTEX_NUM_VECTORS > 160
842 .thumb_func
843Vector2C0:
844 .thumb_func
845Vector2C4:
846 .thumb_func
847Vector2C8:
848 .thumb_func
849Vector2CC:
850 .thumb_func
851Vector2D0:
852 .thumb_func
853Vector2D4:
854 .thumb_func
855Vector2D8:
856 .thumb_func
857Vector2DC:
858#endif
859#if CORTEX_NUM_VECTORS > 168
860 .thumb_func
861Vector2E0:
862 .thumb_func
863Vector2E4:
864 .thumb_func
865Vector2E8:
866 .thumb_func
867Vector2EC:
868 .thumb_func
869Vector2F0:
870 .thumb_func
871Vector2F4:
872 .thumb_func
873Vector2F8:
874 .thumb_func
875Vector2FC:
876#endif
877#if CORTEX_NUM_VECTORS > 176
878 .thumb_func
879Vector300:
880 .thumb_func
881Vector304:
882 .thumb_func
883Vector308:
884 .thumb_func
885Vector30C:
886 .thumb_func
887Vector310:
888 .thumb_func
889Vector314:
890 .thumb_func
891Vector318:
892 .thumb_func
893Vector31C:
894#endif
895#if CORTEX_NUM_VECTORS > 184
896 .thumb_func
897Vector320:
898 .thumb_func
899Vector324:
900 .thumb_func
901Vector328:
902 .thumb_func
903Vector32C:
904 .thumb_func
905Vector330:
906 .thumb_func
907Vector334:
908 .thumb_func
909Vector338:
910 .thumb_func
911Vector33C:
912#endif
913#if CORTEX_NUM_VECTORS > 192
914 .thumb_func
915Vector340:
916 .thumb_func
917Vector344:
918 .thumb_func
919Vector348:
920 .thumb_func
921Vector34C:
922 .thumb_func
923Vector350:
924 .thumb_func
925Vector354:
926 .thumb_func
927Vector358:
928 .thumb_func
929Vector35C:
930#endif
931#if CORTEX_NUM_VECTORS > 200
932 .thumb_func
933Vector360:
934 .thumb_func
935Vector364:
936 .thumb_func
937Vector368:
938 .thumb_func
939Vector36C:
940 .thumb_func
941Vector370:
942 .thumb_func
943Vector374:
944 .thumb_func
945Vector378:
946 .thumb_func
947Vector37C:
948#endif
949#if CORTEX_NUM_VECTORS > 208
950 .thumb_func
951Vector380:
952 .thumb_func
953Vector384:
954 .thumb_func
955Vector388:
956 .thumb_func
957Vector38C:
958 .thumb_func
959Vector390:
960 .thumb_func
961Vector394:
962 .thumb_func
963Vector398:
964 .thumb_func
965Vector39C:
966#endif
967#if CORTEX_NUM_VECTORS > 216
968 .thumb_func
969Vector3A0:
970 .thumb_func
971Vector3A4:
972 .thumb_func
973Vector3A8:
974 .thumb_func
975Vector3AC:
976 .thumb_func
977Vector3B0:
978 .thumb_func
979Vector3B4:
980 .thumb_func
981Vector3B8:
982 .thumb_func
983Vector3BC:
984#endif
985#if CORTEX_NUM_VECTORS > 224
986 .thumb_func
987Vector3C0:
988 .thumb_func
989Vector3C4:
990 .thumb_func
991Vector3C8:
992 .thumb_func
993Vector3CC:
994 .thumb_func
995Vector3D0:
996 .thumb_func
997Vector3D4:
998 .thumb_func
999Vector3D8:
1000 .thumb_func
1001Vector3DC:
1002#endif
1003#if CORTEX_NUM_VECTORS > 232
1004 .thumb_func
1005Vector3E0:
1006 .thumb_func
1007Vector3E4:
1008 .thumb_func
1009Vector3E8:
1010 .thumb_func
1011Vector3EC:
1012 .thumb_func
1013Vector3F0:
1014 .thumb_func
1015Vector3F4:
1016 .thumb_func
1017Vector3F8:
1018 .thumb_func
1019Vector3FC:
1020#endif
1021 bl _unhandled_exception
1022
1023 .thumb_func
1024 .weak _unhandled_exception
1025_unhandled_exception:
1026.stay:
1027 b .stay
1028
1029#endif /* !defined(__DOXYGEN__) */
1030
1031/** @} */