Skip to content

Commit 23eed7c

Browse files
committed
CMake: add STM32WB targets
1 parent 39cb929 commit 23eed7c

File tree

5 files changed

+173
-0
lines changed

5 files changed

+173
-0
lines changed
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("STM32WB50xx" IN_LIST MBED_TARGET_LABELS)
5+
add_subdirectory(TARGET_STM32WB50xx)
6+
elseif("STM32WB55xx" IN_LIST MBED_TARGET_LABELS)
7+
add_subdirectory(TARGET_STM32WB55xx)
8+
endif()
9+
10+
add_subdirectory(STM32Cube_FW)
11+
12+
target_sources(mbed-core
13+
INTERFACE
14+
analogin_device.c
15+
analogout_device.c
16+
flash_api.c
17+
gpio_irq_device.c
18+
pwmout_device.c
19+
serial_device.c
20+
spi_api.c
21+
)
22+
23+
target_include_directories(mbed-core
24+
INTERFACE
25+
.
26+
)
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
target_sources(mbed-core
5+
INTERFACE
6+
otp.c
7+
STM32WBxx_HAL_Driver/stm32wbxx_hal.c
8+
STM32WBxx_HAL_Driver/stm32wbxx_hal_adc.c
9+
STM32WBxx_HAL_Driver/stm32wbxx_hal_adc_ex.c
10+
STM32WBxx_HAL_Driver/stm32wbxx_hal_comp.c
11+
STM32WBxx_HAL_Driver/stm32wbxx_hal_cortex.c
12+
STM32WBxx_HAL_Driver/stm32wbxx_hal_crc.c
13+
STM32WBxx_HAL_Driver/stm32wbxx_hal_crc_ex.c
14+
STM32WBxx_HAL_Driver/stm32wbxx_hal_cryp.c
15+
STM32WBxx_HAL_Driver/stm32wbxx_hal_cryp_ex.c
16+
STM32WBxx_HAL_Driver/stm32wbxx_hal_dma.c
17+
STM32WBxx_HAL_Driver/stm32wbxx_hal_dma_ex.c
18+
STM32WBxx_HAL_Driver/stm32wbxx_hal_exti.c
19+
STM32WBxx_HAL_Driver/stm32wbxx_hal_flash.c
20+
STM32WBxx_HAL_Driver/stm32wbxx_hal_flash_ex.c
21+
STM32WBxx_HAL_Driver/stm32wbxx_hal_gpio.c
22+
STM32WBxx_HAL_Driver/stm32wbxx_hal_hsem.c
23+
STM32WBxx_HAL_Driver/stm32wbxx_hal_i2c.c
24+
STM32WBxx_HAL_Driver/stm32wbxx_hal_i2c_ex.c
25+
STM32WBxx_HAL_Driver/stm32wbxx_hal_ipcc.c
26+
STM32WBxx_HAL_Driver/stm32wbxx_hal_irda.c
27+
STM32WBxx_HAL_Driver/stm32wbxx_hal_iwdg.c
28+
STM32WBxx_HAL_Driver/stm32wbxx_hal_lcd.c
29+
STM32WBxx_HAL_Driver/stm32wbxx_hal_lptim.c
30+
STM32WBxx_HAL_Driver/stm32wbxx_hal_pcd.c
31+
STM32WBxx_HAL_Driver/stm32wbxx_hal_pcd_ex.c
32+
STM32WBxx_HAL_Driver/stm32wbxx_hal_pka.c
33+
STM32WBxx_HAL_Driver/stm32wbxx_hal_pwr.c
34+
STM32WBxx_HAL_Driver/stm32wbxx_hal_pwr_ex.c
35+
STM32WBxx_HAL_Driver/stm32wbxx_hal_qspi.c
36+
STM32WBxx_HAL_Driver/stm32wbxx_hal_rcc.c
37+
STM32WBxx_HAL_Driver/stm32wbxx_hal_rcc_ex.c
38+
STM32WBxx_HAL_Driver/stm32wbxx_hal_rng.c
39+
STM32WBxx_HAL_Driver/stm32wbxx_hal_rtc.c
40+
STM32WBxx_HAL_Driver/stm32wbxx_hal_rtc_ex.c
41+
STM32WBxx_HAL_Driver/stm32wbxx_hal_sai.c
42+
STM32WBxx_HAL_Driver/stm32wbxx_hal_sai_ex.c
43+
STM32WBxx_HAL_Driver/stm32wbxx_hal_smartcard.c
44+
STM32WBxx_HAL_Driver/stm32wbxx_hal_smartcard_ex.c
45+
STM32WBxx_HAL_Driver/stm32wbxx_hal_smbus.c
46+
STM32WBxx_HAL_Driver/stm32wbxx_hal_spi.c
47+
STM32WBxx_HAL_Driver/stm32wbxx_hal_spi_ex.c
48+
STM32WBxx_HAL_Driver/stm32wbxx_hal_tim.c
49+
STM32WBxx_HAL_Driver/stm32wbxx_hal_tim_ex.c
50+
STM32WBxx_HAL_Driver/stm32wbxx_hal_tsc.c
51+
STM32WBxx_HAL_Driver/stm32wbxx_hal_uart.c
52+
STM32WBxx_HAL_Driver/stm32wbxx_hal_uart_ex.c
53+
STM32WBxx_HAL_Driver/stm32wbxx_hal_usart.c
54+
STM32WBxx_HAL_Driver/stm32wbxx_hal_usart_ex.c
55+
STM32WBxx_HAL_Driver/stm32wbxx_hal_wwdg.c
56+
STM32WBxx_HAL_Driver/stm32wbxx_ll_adc.c
57+
STM32WBxx_HAL_Driver/stm32wbxx_ll_comp.c
58+
STM32WBxx_HAL_Driver/stm32wbxx_ll_crc.c
59+
STM32WBxx_HAL_Driver/stm32wbxx_ll_crs.c
60+
STM32WBxx_HAL_Driver/stm32wbxx_ll_dma.c
61+
STM32WBxx_HAL_Driver/stm32wbxx_ll_exti.c
62+
STM32WBxx_HAL_Driver/stm32wbxx_ll_gpio.c
63+
STM32WBxx_HAL_Driver/stm32wbxx_ll_i2c.c
64+
STM32WBxx_HAL_Driver/stm32wbxx_ll_lptim.c
65+
STM32WBxx_HAL_Driver/stm32wbxx_ll_lpuart.c
66+
STM32WBxx_HAL_Driver/stm32wbxx_ll_pka.c
67+
STM32WBxx_HAL_Driver/stm32wbxx_ll_pwr.c
68+
STM32WBxx_HAL_Driver/stm32wbxx_ll_rcc.c
69+
STM32WBxx_HAL_Driver/stm32wbxx_ll_rng.c
70+
STM32WBxx_HAL_Driver/stm32wbxx_ll_rtc.c
71+
STM32WBxx_HAL_Driver/stm32wbxx_ll_spi.c
72+
STM32WBxx_HAL_Driver/stm32wbxx_ll_tim.c
73+
STM32WBxx_HAL_Driver/stm32wbxx_ll_usart.c
74+
STM32WBxx_HAL_Driver/stm32wbxx_ll_usb.c
75+
STM32WBxx_HAL_Driver/stm32wbxx_ll_utils.c
76+
stm32_lpm_if.c
77+
system_stm32wbxx.c
78+
)
79+
80+
target_include_directories(mbed-core
81+
INTERFACE
82+
.
83+
CMSIS
84+
STM32WBxx_HAL_Driver
85+
STM32WBxx_HAL_Driver/Legacy
86+
)
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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_stm32wb50xx.S)
6+
set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32wb50xx.ld)
7+
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
8+
set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32wb50xx.S)
9+
set(LINKER_FILE TOOLCHAIN_ARM/stm32wb50xx.sct)
10+
endif()
11+
12+
set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
13+
14+
target_sources(mbed-core
15+
INTERFACE
16+
${STARTUP_FILE}
17+
)
18+
19+
target_include_directories(mbed-core
20+
INTERFACE
21+
.
22+
)
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("NUCLEO_WB55RG" IN_LIST MBED_TARGET_LABELS)
5+
add_subdirectory(TARGET_NUCLEO_WB55RG)
6+
endif()
7+
8+
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
9+
set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32wb55xx.S)
10+
set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32wb55xx.ld)
11+
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
12+
set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32wb55xx.S)
13+
set(LINKER_FILE TOOLCHAIN_ARM/stm32wb55xx.sct)
14+
endif()
15+
16+
set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
17+
18+
target_sources(mbed-core
19+
INTERFACE
20+
${STARTUP_FILE}
21+
)
22+
23+
target_include_directories(mbed-core
24+
INTERFACE
25+
.
26+
)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
target_sources(mbed-core
5+
INTERFACE
6+
PeripheralPins.c
7+
system_clock.c
8+
)
9+
10+
target_include_directories(mbed-core
11+
INTERFACE
12+
.
13+
)

0 commit comments

Comments
 (0)