Skip to content

Commit f05db1b

Browse files
committed
CMake: add STM32F0 targets
1 parent 66c05dd commit f05db1b

File tree

6 files changed

+201
-1
lines changed

6 files changed

+201
-1
lines changed

targets/TARGET_STM/CMakeLists.txt

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

4-
if("STM32F3" IN_LIST MBED_TARGET_LABELS)
4+
if("STM32F0" IN_LIST MBED_TARGET_LABELS)
5+
add_subdirectory(TARGET_STM32F0)
6+
elseif("STM32F1" IN_LIST MBED_TARGET_LABELS)
7+
add_subdirectory(TARGET_STM32F1)
8+
elseif("STM32F2" IN_LIST MBED_TARGET_LABELS)
9+
add_subdirectory(TARGET_STM32F2)
10+
elseif("STM32F3" IN_LIST MBED_TARGET_LABELS)
511
add_subdirectory(TARGET_STM32F3)
612
elseif("STM32F4" IN_LIST MBED_TARGET_LABELS)
713
add_subdirectory(TARGET_STM32F4)
14+
elseif("STM32F7" IN_LIST MBED_TARGET_LABELS)
15+
add_subdirectory(TARGET_STM32F7)
16+
elseif("STM32G0" IN_LIST MBED_TARGET_LABELS)
17+
add_subdirectory(TARGET_STM32G0)
18+
elseif("STM32G4" IN_LIST MBED_TARGET_LABELS)
19+
add_subdirectory(TARGET_STM32G4)
20+
elseif("STM32H7" IN_LIST MBED_TARGET_LABELS)
21+
add_subdirectory(TARGET_STM32H7)
22+
elseif("STM32L0" IN_LIST MBED_TARGET_LABELS)
23+
add_subdirectory(TARGET_STM32L0)
24+
elseif("STM32L1" IN_LIST MBED_TARGET_LABELS)
25+
add_subdirectory(TARGET_STM32L1)
826
elseif("STM32L4" IN_LIST MBED_TARGET_LABELS)
927
add_subdirectory(TARGET_STM32L4)
28+
elseif("STM32L5" IN_LIST MBED_TARGET_LABELS)
29+
add_subdirectory(TARGET_STM32L5)
30+
elseif("STM32WB" IN_LIST MBED_TARGET_LABELS)
31+
add_subdirectory(TARGET_STM32WB)
1032
endif()
1133

1234
target_include_directories(mbed-core
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if("STM32F091xC" IN_LIST MBED_TARGET_LABELS)
5+
add_subdirectory(TARGET_STM32F091xC)
6+
elseif("NUCLEO_F070RB" IN_LIST MBED_TARGET_LABELS)
7+
add_subdirectory(TARGET_NUCLEO_F070RB)
8+
elseif("NUCLEO_F072RB" IN_LIST MBED_TARGET_LABELS)
9+
add_subdirectory(TARGET_NUCLEO_F072RB)
10+
endif()
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+
device/stm32f0xx_hal.c
23+
device/stm32f0xx_hal_adc.c
24+
device/stm32f0xx_hal_adc_ex.c
25+
device/stm32f0xx_hal_can.c
26+
device/stm32f0xx_hal_cec.c
27+
device/stm32f0xx_hal_comp.c
28+
device/stm32f0xx_hal_cortex.c
29+
device/stm32f0xx_hal_crc.c
30+
device/stm32f0xx_hal_crc_ex.c
31+
device/stm32f0xx_hal_dac.c
32+
device/stm32f0xx_hal_dac_ex.c
33+
device/stm32f0xx_hal_dma.c
34+
device/stm32f0xx_hal_flash.c
35+
device/stm32f0xx_hal_flash_ex.c
36+
device/stm32f0xx_hal_gpio.c
37+
device/stm32f0xx_hal_i2c.c
38+
device/stm32f0xx_hal_i2c_ex.c
39+
device/stm32f0xx_hal_i2s.c
40+
device/stm32f0xx_hal_irda.c
41+
device/stm32f0xx_hal_iwdg.c
42+
device/stm32f0xx_hal_pcd.c
43+
device/stm32f0xx_hal_pcd_ex.c
44+
device/stm32f0xx_hal_pwr.c
45+
device/stm32f0xx_hal_pwr_ex.c
46+
device/stm32f0xx_hal_rcc.c
47+
device/stm32f0xx_hal_rcc_ex.c
48+
device/stm32f0xx_hal_rtc.c
49+
device/stm32f0xx_hal_rtc_ex.c
50+
device/stm32f0xx_hal_smartcard.c
51+
device/stm32f0xx_hal_smartcard_ex.c
52+
device/stm32f0xx_hal_smbus.c
53+
device/stm32f0xx_hal_spi.c
54+
device/stm32f0xx_hal_spi_ex.c
55+
device/stm32f0xx_hal_tim.c
56+
device/stm32f0xx_hal_tim_ex.c
57+
device/stm32f0xx_hal_tsc.c
58+
device/stm32f0xx_hal_uart.c
59+
device/stm32f0xx_hal_uart_ex.c
60+
device/stm32f0xx_hal_usart.c
61+
device/stm32f0xx_hal_wwdg.c
62+
device/stm32f0xx_ll_adc.c
63+
device/stm32f0xx_ll_comp.c
64+
device/stm32f0xx_ll_crc.c
65+
device/stm32f0xx_ll_crs.c
66+
device/stm32f0xx_ll_dac.c
67+
device/stm32f0xx_ll_dma.c
68+
device/stm32f0xx_ll_exti.c
69+
device/stm32f0xx_ll_gpio.c
70+
device/stm32f0xx_ll_i2c.c
71+
device/stm32f0xx_ll_pwr.c
72+
device/stm32f0xx_ll_rcc.c
73+
device/stm32f0xx_ll_rtc.c
74+
device/stm32f0xx_ll_spi.c
75+
device/stm32f0xx_ll_tim.c
76+
device/stm32f0xx_ll_usart.c
77+
device/stm32f0xx_ll_utils.c
78+
device/system_stm32f0xx.c
79+
)
80+
81+
target_include_directories(mbed-core
82+
INTERFACE
83+
.
84+
device
85+
)
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_stm32f070xb.S)
6+
set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32F070XB.ld)
7+
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
8+
set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32f070xb.S)
9+
set(LINKER_FILE TOOLCHAIN_ARM/stm32f070xb.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+
PeripheralPins.c
17+
device/system_clock.c
18+
device/cmsis_nvic.c
19+
${STARTUP_FILE}
20+
)
21+
22+
target_include_directories(mbed-core
23+
INTERFACE
24+
.
25+
device
26+
)
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_stm32f072xb.S)
6+
set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32F072XB.ld)
7+
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
8+
set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32f072xb.S)
9+
set(LINKER_FILE TOOLCHAIN_ARM/stm32f072xb.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+
PeripheralPins.c
17+
device/system_clock.c
18+
device/cmsis_nvic.c
19+
${STARTUP_FILE}
20+
)
21+
22+
target_include_directories(mbed-core
23+
INTERFACE
24+
.
25+
device
26+
)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if("NUCLEO_F091RC" IN_LIST MBED_TARGET_LABELS)
5+
add_subdirectory(TARGET_NUCLEO_F091RC)
6+
endif()
7+
8+
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
9+
set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f091xc.S)
10+
set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32F091XC.ld)
11+
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
12+
set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32f091xc.S)
13+
set(LINKER_FILE TOOLCHAIN_ARM/stm32f091rc.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+
device/cmsis_nvic.c
21+
device/system_clock.c
22+
${STARTUP_FILE}
23+
)
24+
25+
target_include_directories(mbed-core
26+
INTERFACE
27+
.
28+
device
29+
)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
)
8+
9+
target_include_directories(mbed-core
10+
INTERFACE
11+
.
12+
)

0 commit comments

Comments
 (0)