Skip to content

Commit 347ada5

Browse files
committed
STM32WL : ADDING STM32WL55xC SUPPORT
Add code concerning all STM32WL55xC platforms - Scatter loader and start-up files for ARM, GCC and IAR compilers. - cmsis file
1 parent aaf9e99 commit 347ada5

File tree

57 files changed

+12812
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+12812
-0
lines changed
Lines changed: 320 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,320 @@
1+
;******************************************************************************
2+
;* File Name : startup_stm32wl54xx_cm4.s
3+
;* Author : MCD Application Team
4+
;* Description : STM32WL54xx devices vector table for MDK-ARM toolchain.
5+
;* This module performs:
6+
;* - Set the initial SP
7+
;* - Set the initial PC == Reset_Handler
8+
;* - Set the vector table entries with the exceptions ISR address
9+
;* - Branches to __main in the C library (which eventually
10+
;* calls main()).
11+
;* After Reset the CortexM4 processor is in Thread mode,
12+
;* priority is Privileged, and the Stack is set to Main.
13+
;* <<< Use Configuration Wizard in Context Menu >>>
14+
;******************************************************************************
15+
;* @attention
16+
;*
17+
;* Copyright (c) 2020 STMicroelectronics. All rights reserved.
18+
;*
19+
;* This software component is licensed by ST under Apache License, Version 2.0,
20+
;* the "License"; You may not use this file except in compliance with the
21+
;* License. You may obtain a copy of the License at:
22+
;* opensource.org/licenses/Apache-2.0
23+
;*
24+
;******************************************************************************
25+
26+
PRESERVE8
27+
THUMB
28+
29+
30+
; Vector Table Mapped to Address 0 at Reset
31+
AREA RESET, DATA, READONLY
32+
EXPORT __Vectors
33+
EXPORT __Vectors_End
34+
EXPORT __Vectors_Size
35+
36+
IMPORT |Image$$ARM_LIB_STACK$$ZI$$Limit|
37+
__Vectors DCD |Image$$ARM_LIB_STACK$$ZI$$Limit| ; Top of Stack
38+
DCD Reset_Handler ; Reset Handler
39+
DCD NMI_Handler ; NMI Handler
40+
DCD HardFault_Handler ; Hard Fault Handler
41+
DCD MemManage_Handler ; MPU Fault Handler
42+
DCD BusFault_Handler ; Bus Fault Handler
43+
DCD UsageFault_Handler ; Usage Fault Handler
44+
DCD 0 ; Reserved
45+
DCD 0 ; Reserved
46+
DCD 0 ; Reserved
47+
DCD 0 ; Reserved
48+
DCD SVC_Handler ; SVCall Handler
49+
DCD DebugMon_Handler ; Debug Monitor Handler
50+
DCD 0 ; Reserved
51+
DCD PendSV_Handler ; PendSV Handler
52+
DCD SysTick_Handler ; SysTick Handler
53+
54+
; External Interrupts
55+
DCD WWDG_IRQHandler ; Window WatchDog
56+
DCD PVD_PVM_IRQHandler ; PVD and PVM detector
57+
DCD TAMP_STAMP_LSECSS_SSRU_IRQHandler ; RTC Tamper, RTC TimeStamp, LSECSS and RTC SSR Underflow Interrupts
58+
DCD RTC_WKUP_IRQHandler ; RTC Wakeup Interrupt
59+
DCD FLASH_IRQHandler ; FLASH global Interrupt
60+
DCD RCC_IRQHandler ; RCC Interrupt
61+
DCD EXTI0_IRQHandler ; EXTI Line 0 Interrupt
62+
DCD EXTI1_IRQHandler ; EXTI Line 1 Interrupt
63+
DCD EXTI2_IRQHandler ; EXTI Line 2 Interrupt
64+
DCD EXTI3_IRQHandler ; EXTI Line 3 Interrup
65+
DCD EXTI4_IRQHandler ; EXTI Line 4 Interrupt
66+
DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1 Interrupt
67+
DCD DMA1_Channel2_IRQHandler ; DMA1 Channel 2 Interrupt
68+
DCD DMA1_Channel3_IRQHandler ; DMA1 Channel 3 Interrupt
69+
DCD DMA1_Channel4_IRQHandler ; DMA1 Channel 4 Interrupt
70+
DCD DMA1_Channel5_IRQHandler ; DMA1 Channel 5 Interrupt
71+
DCD DMA1_Channel6_IRQHandler ; DMA1 Channel 6 Interrupt
72+
DCD DMA1_Channel7_IRQHandler ; DMA1 Channel 7 Interrupt
73+
DCD ADC_IRQHandler ; ADC Interrupt
74+
DCD DAC_IRQHandler ; DAC Interrupt
75+
DCD C2SEV_PWR_C2H_IRQHandler ; CPU M0+ SEV and PWR CPU M0+ HOLD wakeup Interrupt
76+
DCD COMP_IRQHandler ; COMP1 and COMP2 Interrupts
77+
DCD EXTI9_5_IRQHandler ; EXTI Lines [9:5] Interrupt
78+
DCD TIM1_BRK_IRQHandler ; TIM1 Break Interrupt
79+
DCD TIM1_UP_IRQHandler ; TIM1 Update Interrupts
80+
DCD TIM1_TRG_COM_IRQHandler ; TIM1 Trigger and Communication Interrupts
81+
DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare Interrupt
82+
DCD TIM2_IRQHandler ; TIM2 Global Interrupt
83+
DCD TIM16_IRQHandler ; TIM16 Global Interrupt
84+
DCD TIM17_IRQHandler ; TIM17 Global Interrupt
85+
DCD I2C1_EV_IRQHandler ; I2C1 Event Interrupt
86+
DCD I2C1_ER_IRQHandler ; I2C1 Error Interrupt
87+
DCD I2C2_EV_IRQHandler ; I2C2 Event Interrupt
88+
DCD I2C2_ER_IRQHandler ; I2C2 Error Interrupt
89+
DCD SPI1_IRQHandler ; SPI1 Interrupt
90+
DCD SPI2_IRQHandler ; SPI2 Interrupt
91+
DCD USART1_IRQHandler ; USART1 Interrupt
92+
DCD USART2_IRQHandler ; USART2 Interrupt
93+
DCD LPUART1_IRQHandler ; LPUART1 Interrupt
94+
DCD LPTIM1_IRQHandler ; LPTIM1 Interrupt
95+
DCD LPTIM2_IRQHandler ; LPTIM2 Interrupt
96+
DCD EXTI15_10_IRQHandler ; EXTI Lines1[15:10 ]Interrupts
97+
DCD RTC_Alarm_IRQHandler ; RTC Alarms (A and B) Interrupt
98+
DCD LPTIM3_IRQHandler ; LPTIM3 Interrupt
99+
DCD SUBGHZSPI_IRQHandler ; SUBGHZSPI Interrupt
100+
DCD IPCC_C1_RX_IRQHandler ; IPCC CPU1 RX occupied interrupt
101+
DCD IPCC_C1_TX_IRQHandler ; IPCC CPU1 RX free interrupt
102+
DCD HSEM_IRQHandler ; HSEM0 Interrupt
103+
DCD I2C3_EV_IRQHandler ; I2C3 Event Interrupt
104+
DCD I2C3_ER_IRQHandler ; I2C3 Error Interrupt
105+
DCD SUBGHZ_Radio_IRQHandler ; SUBGHZ Radio Interrupt
106+
DCD AES_IRQHandler ; AES Interrupt
107+
DCD RNG_IRQHandler ; RNG1 Interrupt
108+
DCD PKA_IRQHandler ; PKA Interrupt
109+
DCD DMA2_Channel1_IRQHandler ; DMA2 Channel 1 Interrupt
110+
DCD DMA2_Channel2_IRQHandler ; DMA2 Channel 2 Interrupt
111+
DCD DMA2_Channel3_IRQHandler ; DMA2 Channel 3 Interrupt
112+
DCD DMA2_Channel4_IRQHandler ; DMA2 Channel 4 Interrupt
113+
DCD DMA2_Channel5_IRQHandler ; DMA2 Channel 5 Interrupt
114+
DCD DMA2_Channel6_IRQHandler ; DMA2 Channel 6 Interrupt
115+
DCD DMA2_Channel7_IRQHandler ; DMA2 Channel 7 Interrupt
116+
DCD DMAMUX1_OVR_IRQHandler ; DMAMUX overrun Interrupt
117+
118+
__Vectors_End
119+
120+
__Vectors_Size EQU __Vectors_End - __Vectors
121+
122+
AREA |.text|, CODE, READONLY
123+
124+
; Reset handler
125+
Reset_Handler PROC
126+
EXPORT Reset_Handler [WEAK]
127+
IMPORT SystemInit
128+
IMPORT __main
129+
130+
LDR R0, =SystemInit
131+
BLX R0
132+
LDR R0, =__main
133+
BX R0
134+
ENDP
135+
136+
; Dummy Exception Handlers (infinite loops which can be modified)
137+
138+
NMI_Handler PROC
139+
EXPORT NMI_Handler [WEAK]
140+
B .
141+
ENDP
142+
HardFault_Handler\
143+
PROC
144+
EXPORT HardFault_Handler [WEAK]
145+
B .
146+
ENDP
147+
MemManage_Handler\
148+
PROC
149+
EXPORT MemManage_Handler [WEAK]
150+
B .
151+
ENDP
152+
BusFault_Handler\
153+
PROC
154+
EXPORT BusFault_Handler [WEAK]
155+
B .
156+
ENDP
157+
UsageFault_Handler\
158+
PROC
159+
EXPORT UsageFault_Handler [WEAK]
160+
B .
161+
ENDP
162+
SVC_Handler PROC
163+
EXPORT SVC_Handler [WEAK]
164+
B .
165+
ENDP
166+
DebugMon_Handler\
167+
PROC
168+
EXPORT DebugMon_Handler [WEAK]
169+
B .
170+
ENDP
171+
PendSV_Handler PROC
172+
EXPORT PendSV_Handler [WEAK]
173+
B .
174+
ENDP
175+
SysTick_Handler PROC
176+
EXPORT SysTick_Handler [WEAK]
177+
B .
178+
ENDP
179+
180+
Default_Handler PROC
181+
182+
EXPORT WWDG_IRQHandler [WEAK]
183+
EXPORT PVD_PVM_IRQHandler [WEAK]
184+
EXPORT TAMP_STAMP_LSECSS_SSRU_IRQHandler [WEAK]
185+
EXPORT RTC_WKUP_IRQHandler [WEAK]
186+
EXPORT FLASH_IRQHandler [WEAK]
187+
EXPORT RCC_IRQHandler [WEAK]
188+
EXPORT EXTI0_IRQHandler [WEAK]
189+
EXPORT EXTI1_IRQHandler [WEAK]
190+
EXPORT EXTI2_IRQHandler [WEAK]
191+
EXPORT EXTI3_IRQHandler [WEAK]
192+
EXPORT EXTI4_IRQHandler [WEAK]
193+
EXPORT DMA1_Channel1_IRQHandler [WEAK]
194+
EXPORT DMA1_Channel2_IRQHandler [WEAK]
195+
EXPORT DMA1_Channel3_IRQHandler [WEAK]
196+
EXPORT DMA1_Channel4_IRQHandler [WEAK]
197+
EXPORT DMA1_Channel5_IRQHandler [WEAK]
198+
EXPORT DMA1_Channel6_IRQHandler [WEAK]
199+
EXPORT DMA1_Channel7_IRQHandler [WEAK]
200+
EXPORT ADC_IRQHandler [WEAK]
201+
EXPORT DAC_IRQHandler [WEAK]
202+
EXPORT C2SEV_PWR_C2H_IRQHandler [WEAK]
203+
EXPORT COMP_IRQHandler [WEAK]
204+
EXPORT EXTI9_5_IRQHandler [WEAK]
205+
EXPORT TIM1_BRK_IRQHandler [WEAK]
206+
EXPORT TIM1_UP_IRQHandler [WEAK]
207+
EXPORT TIM1_TRG_COM_IRQHandler [WEAK]
208+
EXPORT TIM1_CC_IRQHandler [WEAK]
209+
EXPORT TIM2_IRQHandler [WEAK]
210+
EXPORT TIM16_IRQHandler [WEAK]
211+
EXPORT TIM17_IRQHandler [WEAK]
212+
EXPORT I2C1_EV_IRQHandler [WEAK]
213+
EXPORT I2C1_ER_IRQHandler [WEAK]
214+
EXPORT I2C2_EV_IRQHandler [WEAK]
215+
EXPORT I2C2_ER_IRQHandler [WEAK]
216+
EXPORT SPI1_IRQHandler [WEAK]
217+
EXPORT SPI2_IRQHandler [WEAK]
218+
EXPORT USART1_IRQHandler [WEAK]
219+
EXPORT USART2_IRQHandler [WEAK]
220+
EXPORT LPUART1_IRQHandler [WEAK]
221+
EXPORT LPTIM1_IRQHandler [WEAK]
222+
EXPORT LPTIM2_IRQHandler [WEAK]
223+
EXPORT EXTI15_10_IRQHandler [WEAK]
224+
EXPORT RTC_Alarm_IRQHandler [WEAK]
225+
EXPORT LPTIM3_IRQHandler [WEAK]
226+
EXPORT SUBGHZSPI_IRQHandler [WEAK]
227+
EXPORT IPCC_C1_RX_IRQHandler [WEAK]
228+
EXPORT IPCC_C1_TX_IRQHandler [WEAK]
229+
EXPORT HSEM_IRQHandler [WEAK]
230+
EXPORT I2C3_EV_IRQHandler [WEAK]
231+
EXPORT I2C3_ER_IRQHandler [WEAK]
232+
EXPORT SUBGHZ_Radio_IRQHandler [WEAK]
233+
EXPORT AES_IRQHandler [WEAK]
234+
EXPORT RNG_IRQHandler [WEAK]
235+
EXPORT PKA_IRQHandler [WEAK]
236+
EXPORT DMA2_Channel1_IRQHandler [WEAK]
237+
EXPORT DMA2_Channel2_IRQHandler [WEAK]
238+
EXPORT DMA2_Channel3_IRQHandler [WEAK]
239+
EXPORT DMA2_Channel4_IRQHandler [WEAK]
240+
EXPORT DMA2_Channel5_IRQHandler [WEAK]
241+
EXPORT DMA2_Channel6_IRQHandler [WEAK]
242+
EXPORT DMA2_Channel7_IRQHandler [WEAK]
243+
EXPORT DMAMUX1_OVR_IRQHandler [WEAK]
244+
245+
WWDG_IRQHandler
246+
PVD_PVM_IRQHandler
247+
TAMP_STAMP_LSECSS_SSRU_IRQHandler
248+
RTC_WKUP_IRQHandler
249+
FLASH_IRQHandler
250+
RCC_IRQHandler
251+
EXTI0_IRQHandler
252+
EXTI1_IRQHandler
253+
EXTI2_IRQHandler
254+
EXTI3_IRQHandler
255+
EXTI4_IRQHandler
256+
DMA1_Channel1_IRQHandler
257+
DMA1_Channel2_IRQHandler
258+
DMA1_Channel3_IRQHandler
259+
DMA1_Channel4_IRQHandler
260+
DMA1_Channel5_IRQHandler
261+
DMA1_Channel6_IRQHandler
262+
DMA1_Channel7_IRQHandler
263+
ADC_IRQHandler
264+
DAC_IRQHandler
265+
C2SEV_PWR_C2H_IRQHandler
266+
COMP_IRQHandler
267+
EXTI9_5_IRQHandler
268+
TIM1_BRK_IRQHandler
269+
TIM1_UP_IRQHandler
270+
TIM1_TRG_COM_IRQHandler
271+
TIM1_CC_IRQHandler
272+
TIM2_IRQHandler
273+
TIM16_IRQHandler
274+
TIM17_IRQHandler
275+
I2C1_EV_IRQHandler
276+
I2C1_ER_IRQHandler
277+
I2C2_EV_IRQHandler
278+
I2C2_ER_IRQHandler
279+
SPI1_IRQHandler
280+
SPI2_IRQHandler
281+
USART1_IRQHandler
282+
USART2_IRQHandler
283+
LPUART1_IRQHandler
284+
LPTIM1_IRQHandler
285+
LPTIM2_IRQHandler
286+
EXTI15_10_IRQHandler
287+
RTC_Alarm_IRQHandler
288+
LPTIM3_IRQHandler
289+
SUBGHZSPI_IRQHandler
290+
IPCC_C1_RX_IRQHandler
291+
IPCC_C1_TX_IRQHandler
292+
HSEM_IRQHandler
293+
I2C3_EV_IRQHandler
294+
I2C3_ER_IRQHandler
295+
SUBGHZ_Radio_IRQHandler
296+
AES_IRQHandler
297+
RNG_IRQHandler
298+
PKA_IRQHandler
299+
DMA2_Channel1_IRQHandler
300+
DMA2_Channel2_IRQHandler
301+
DMA2_Channel3_IRQHandler
302+
DMA2_Channel4_IRQHandler
303+
DMA2_Channel5_IRQHandler
304+
DMA2_Channel6_IRQHandler
305+
DMA2_Channel7_IRQHandler
306+
DMAMUX1_OVR_IRQHandler
307+
308+
B .
309+
310+
ENDP
311+
312+
ALIGN
313+
314+
;*******************************************************************************
315+
; User Stack and Heap initialization
316+
;*******************************************************************************
317+
318+
END
319+
320+
;************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE*****
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-M4
2+
; Scatter-Loading Description File
3+
;
4+
; SPDX-License-Identifier: BSD-3-Clause
5+
;******************************************************************************
6+
;* @attention
7+
;*
8+
;* Copyright (c) 2016-2020 STMicroelectronics.
9+
;* All rights reserved.
10+
;*
11+
;* This software component is licensed by ST under BSD 3-Clause license,
12+
;* the "License"; You may not use this file except in compliance with the
13+
;* License. You may obtain a copy of the License at:
14+
;* opensource.org/licenses/BSD-3-Clause
15+
;*
16+
;******************************************************************************
17+
18+
#include "../cmsis_nvic.h"
19+
20+
#if !defined(MBED_APP_START)
21+
#define MBED_APP_START MBED_ROM_START
22+
#endif
23+
24+
#if !defined(MBED_APP_SIZE)
25+
#define MBED_APP_SIZE MBED_ROM_SIZE
26+
#endif
27+
28+
#if !defined(MBED_CONF_TARGET_BOOT_STACK_SIZE)
29+
/* This value is normally defined by the tools to 0x1000 for bare metal and 0x400 for RTOS */
30+
#if defined(MBED_BOOT_STACK_SIZE)
31+
#define MBED_CONF_TARGET_BOOT_STACK_SIZE MBED_BOOT_STACK_SIZE
32+
#else
33+
#define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400
34+
#endif
35+
#endif
36+
37+
/* Round up VECTORS_SIZE to 8 bytes */
38+
#define VECTORS_SIZE (((NVIC_NUM_VECTORS * 4) + 7) AND ~7)
39+
40+
LR_IROM1 MBED_APP_START MBED_APP_SIZE {
41+
42+
ER_IROM1 MBED_APP_START MBED_APP_SIZE {
43+
*.o (RESET, +First)
44+
*(InRoot$$Sections)
45+
.ANY (+RO)
46+
}
47+
48+
RW_IRAM1 (MBED_RAM_START + VECTORS_SIZE) { ; RW data
49+
.ANY (+RW +ZI)
50+
}
51+
52+
ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (MBED_RAM_START + MBED_RAM_SIZE - MBED_CONF_TARGET_BOOT_STACK_SIZE - AlignExpr(ImageLimit(RW_IRAM1), 16)) { ; Heap growing up
53+
}
54+
55+
ARM_LIB_STACK (MBED_RAM_START + MBED_RAM_SIZE) EMPTY -MBED_CONF_TARGET_BOOT_STACK_SIZE { ; Stack region growing down
56+
}
57+
}

0 commit comments

Comments
 (0)