Skip to content

Commit bfa7800

Browse files
committed
STM32WL file alignment before cube update
1 parent 5a1e864 commit bfa7800

File tree

27 files changed

+243
-39
lines changed

27 files changed

+243
-39
lines changed

targets/TARGET_STM/TARGET_STM32WL/CMakeLists.txt

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4+
add_subdirectory(TARGET_STM32WL54xC EXCLUDE_FROM_ALL)
45
add_subdirectory(TARGET_STM32WL55xC EXCLUDE_FROM_ALL)
6+
add_subdirectory(TARGET_STM32WLE4x8 EXCLUDE_FROM_ALL)
7+
add_subdirectory(TARGET_STM32WLE4xB EXCLUDE_FROM_ALL)
8+
add_subdirectory(TARGET_STM32WLE4xC EXCLUDE_FROM_ALL)
9+
add_subdirectory(TARGET_STM32WLE5x8 EXCLUDE_FROM_ALL)
10+
add_subdirectory(TARGET_STM32WLE5xB EXCLUDE_FROM_ALL)
511
add_subdirectory(TARGET_STM32WLE5xC EXCLUDE_FROM_ALL)
6-
712
add_subdirectory(STM32Cube_FW EXCLUDE_FROM_ALL)
813

914
add_library(mbed-stm32wl INTERFACE)
1015

16+
target_include_directories(mbed-stm32wl
17+
INTERFACE
18+
.
19+
)
20+
1121
target_sources(mbed-stm32wl
1222
INTERFACE
1323
analogin_device.c
@@ -21,9 +31,5 @@ target_sources(mbed-stm32wl
2131
system_clock.c
2232
)
2333

24-
target_include_directories(mbed-stm32wl
25-
INTERFACE
26-
.
27-
)
2834

2935
target_link_libraries(mbed-stm32wl INTERFACE mbed-stm mbed-stm32wlcube-fw)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Copyright (c) 2020 STMicroelectronics
2+
3+
This software component is licensed by STMicroelectronics under the **BSD-3-Clause** license. You may not use this software except in compliance with this license. You may obtain a copy of the license [here](https://opensource.org/licenses/BSD-3-Clause).

targets/TARGET_STM/TARGET_STM32WL/STM32Cube_FW/stm32wlxx_hal_conf.h

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,25 +69,63 @@
6969
/**
7070
* @brief This is the list of modules where register callback can be used
7171
*/
72+
#if !defined (USE_HAL_ADC_REGISTER_CALLBACKS)
7273
#define USE_HAL_ADC_REGISTER_CALLBACKS 0u
74+
#endif
75+
#if !defined (USE_HAL_COMP_REGISTER_CALLBACKS)
7376
#define USE_HAL_COMP_REGISTER_CALLBACKS 0u
77+
#endif
78+
#if !defined (USE_HAL_CRYP_REGISTER_CALLBACKS)
7479
#define USE_HAL_CRYP_REGISTER_CALLBACKS 0u
80+
#endif
81+
#if !defined (USE_HAL_DAC_REGISTER_CALLBACKS)
7582
#define USE_HAL_DAC_REGISTER_CALLBACKS 0u
83+
#endif
84+
#if !defined (USE_HAL_I2C_REGISTER_CALLBACKS)
7685
#define USE_HAL_I2C_REGISTER_CALLBACKS 0u
86+
#endif
87+
#if !defined (USE_HAL_I2S_REGISTER_CALLBACKS)
7788
#define USE_HAL_I2S_REGISTER_CALLBACKS 0u
89+
#endif
90+
#if !defined (USE_HAL_IRDA_REGISTER_CALLBACKS)
7891
#define USE_HAL_IRDA_REGISTER_CALLBACKS 0u
92+
#endif
93+
#if !defined (USE_HAL_LPTIM_REGISTER_CALLBACKS)
7994
#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0u
95+
#endif
96+
#if !defined (USE_HAL_PKA_REGISTER_CALLBACKS)
8097
#define USE_HAL_PKA_REGISTER_CALLBACKS 0u
98+
#endif
99+
#if !defined (USE_HAL_RNG_REGISTER_CALLBACKS)
81100
#define USE_HAL_RNG_REGISTER_CALLBACKS 0u
101+
#endif
102+
#if !defined (USE_HAL_RTC_REGISTER_CALLBACKS)
82103
#define USE_HAL_RTC_REGISTER_CALLBACKS 0u
104+
#endif
105+
#if !defined (USE_HAL_SMARTCARD_REGISTER_CALLBACKS)
83106
#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0u
107+
#endif
108+
#if !defined (USE_HAL_SMBUS_REGISTER_CALLBACKS)
84109
#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0u
110+
#endif
111+
#if !defined (USE_HAL_SPI_REGISTER_CALLBACKS)
85112
#define USE_HAL_SPI_REGISTER_CALLBACKS 0u
113+
#endif
114+
#if !defined (USE_HAL_SUBGHZ_REGISTER_CALLBACKS)
86115
#define USE_HAL_SUBGHZ_REGISTER_CALLBACKS 0u
116+
#endif
117+
#if !defined (USE_HAL_TIM_REGISTER_CALLBACKS)
87118
#define USE_HAL_TIM_REGISTER_CALLBACKS 0u
119+
#endif
120+
#if !defined (USE_HAL_UART_REGISTER_CALLBACKS)
88121
#define USE_HAL_UART_REGISTER_CALLBACKS 0u
122+
#endif
123+
#if !defined (USE_HAL_USART_REGISTER_CALLBACKS)
89124
#define USE_HAL_USART_REGISTER_CALLBACKS 0u
125+
#endif
126+
#if !defined (USE_HAL_WWDG_REGISTER_CALLBACKS)
90127
#define USE_HAL_WWDG_REGISTER_CALLBACKS 0u
128+
#endif
91129

92130
/* ########################## Oscillator Values adaptation ####################*/
93131
/**
@@ -183,7 +221,9 @@
183221

184222
/* ################## CRYP peripheral configuration ########################## */
185223

224+
#if !defined (USE_HAL_CRYP_SUSPEND_RESUME)
186225
#define USE_HAL_CRYP_SUSPEND_RESUME 1U
226+
#endif
187227

188228

189229
/* Includes ------------------------------------------------------------------*/

targets/TARGET_STM/TARGET_STM32WL/STM32Cube_FW/system_stm32wlxx.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,7 @@
138138
#define VECT_TAB_OFFSET 0x00008000U /*!< Vector Table base offset field.
139139
This value must be a multiple of 0x100. */
140140
#else
141-
#include "nvic_addr.h" // MBED
142-
SCB->VTOR = NVIC_FLASH_VECTOR_ADDRESS; // MBED
141+
#define VECT_TAB_BASE_ADDRESS FLASH_BASE /*!< Vector Table base address field.
143142
This value must be a multiple of 0x100. */
144143
#define VECT_TAB_OFFSET 0x00020000U /*!< Vector Table base offset field.
145144
This value must be a multiple of 0x100. */
@@ -154,8 +153,7 @@
154153
#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field.
155154
This value must be a multiple of 0x200. */
156155
#else
157-
#include "nvic_addr.h" // MBED
158-
SCB->VTOR = NVIC_FLASH_VECTOR_ADDRESS; // MBED
156+
#define VECT_TAB_BASE_ADDRESS FLASH_BASE /*!< Vector Table base address field.
159157
This value must be a multiple of 0x200. */
160158
#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field.
161159
This value must be a multiple of 0x200. */
@@ -211,11 +209,12 @@
211209
* @param None
212210
* @retval None
213211
*/
214-
void SystemInit(void)
212+
__WEAK void SystemInit(void)
215213
{
214+
#include "nvic_addr.h" // MBED
215+
SCB->VTOR = NVIC_FLASH_VECTOR_ADDRESS; // MBED
216216
#if defined(USER_VECT_TAB_ADDRESS)
217217
/* Configure the Vector Table location add offset address ------------------*/
218-
SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET;
219218
#endif
220219

221220
/* FPU settings ------------------------------------------------------------*/
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
5+
set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32wl54xx.S)
6+
set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32wl54xc.ld)
7+
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
8+
set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32wl54xx.S)
9+
set(LINKER_FILE TOOLCHAIN_ARM/stm32wl54xc.sct)
10+
endif()
11+
12+
add_library(mbed-stm32wl54xc INTERFACE)
13+
14+
target_include_directories(mbed-stm32wl54xc
15+
INTERFACE
16+
.
17+
)
18+
19+
target_sources(mbed-stm32wl54xc
20+
INTERFACE
21+
${STARTUP_FILE}
22+
)
23+
24+
mbed_set_linker_script(mbed-stm32wl54xc ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
25+
26+
target_link_libraries(mbed-stm32wl54xc INTERFACE mbed-stm32wl)

targets/TARGET_STM/TARGET_STM32WL/TARGET_STM32WL54xC/TOOLCHAIN_ARM/stm32wl54xc.sct

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-M4
1+
#! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m4
22
; Scatter-Loading Description File
33
;
44
; SPDX-License-Identifier: BSD-3-Clause

targets/TARGET_STM/TARGET_STM32WL/TARGET_STM32WL54xC/cmsis_nvic.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@
2222
#endif
2323

2424
#if !defined(MBED_ROM_SIZE)
25-
#define MBED_ROM_SIZE 0x0 // 0 B
25+
#define MBED_ROM_SIZE 0x40000 // 256 KB
2626
#endif
2727

2828
#if !defined(MBED_RAM_START)
2929
#define MBED_RAM_START 0x20000000
3030
#endif
3131

3232
#if !defined(MBED_RAM_SIZE)
33-
#define MBED_RAM_SIZE 0x0 // 0 B
33+
#define MBED_RAM_SIZE 0x10000 // 64 KB
3434
#endif
3535

3636
#define NVIC_NUM_VECTORS 78

targets/TARGET_STM/TARGET_STM32WL/TARGET_STM32WL55xC/TOOLCHAIN_ARM/stm32wl55xc.sct

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-M4
1+
#! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m4
22
; Scatter-Loading Description File
33
;
44
; SPDX-License-Identifier: BSD-3-Clause

targets/TARGET_STM/TARGET_STM32WL/TARGET_STM32WL55xC/cmsis_nvic.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@
2222
#endif
2323

2424
#if !defined(MBED_ROM_SIZE)
25-
#define MBED_ROM_SIZE 0x40000
25+
#define MBED_ROM_SIZE 0x40000 // 256 KB
2626
#endif
2727

2828
#if !defined(MBED_RAM_START)
2929
#define MBED_RAM_START 0x20000000
3030
#endif
3131

3232
#if !defined(MBED_RAM_SIZE)
33-
#define MBED_RAM_SIZE 0x10000
33+
#define MBED_RAM_SIZE 0x10000 // 64 KB
3434
#endif
3535

3636
#define NVIC_NUM_VECTORS 78
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
5+
set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32wle4xx.S)
6+
set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32wle4x8.ld)
7+
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
8+
set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32wle4xx.S)
9+
set(LINKER_FILE TOOLCHAIN_ARM/stm32wle4x8.sct)
10+
endif()
11+
12+
add_library(mbed-stm32wle4x8 INTERFACE)
13+
14+
target_include_directories(mbed-stm32wle4x8
15+
INTERFACE
16+
.
17+
)
18+
19+
target_sources(mbed-stm32wle4x8
20+
INTERFACE
21+
${STARTUP_FILE}
22+
)
23+
24+
mbed_set_linker_script(mbed-stm32wle4x8 ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
25+
26+
target_link_libraries(mbed-stm32wle4x8 INTERFACE mbed-stm32wl)

0 commit comments

Comments
 (0)