Skip to content

Commit 9933b7d

Browse files
committed
CMake: add STM32F2 targets
1 parent 81b61b2 commit 9933b7d

File tree

2 files changed

+114
-0
lines changed

2 files changed

+114
-0
lines changed
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if("NUCLEO_F207ZG" IN_LIST MBED_TARGET_LABELS)
5+
add_subdirectory(TARGET_NUCLEO_F207ZG)
6+
endif()
7+
8+
target_sources(mbed-core
9+
INTERFACE
10+
analogin_device.c
11+
analogout_device.c
12+
flash_api.c
13+
gpio_irq_device.c
14+
pwmout_device.c
15+
serial_device.c
16+
spi_api.c
17+
18+
device/stm32f2xx_hal.c
19+
device/stm32f2xx_hal_adc.c
20+
device/stm32f2xx_hal_adc_ex.c
21+
device/stm32f2xx_hal_can.c
22+
device/stm32f2xx_hal_cortex.c
23+
device/stm32f2xx_hal_crc.c
24+
device/stm32f2xx_hal_cryp.c
25+
device/stm32f2xx_hal_dac.c
26+
device/stm32f2xx_hal_dac_ex.c
27+
device/stm32f2xx_hal_dcmi.c
28+
device/stm32f2xx_hal_dma.c
29+
device/stm32f2xx_hal_dma_ex.c
30+
device/stm32f2xx_hal_eth.c
31+
device/stm32f2xx_hal_flash.c
32+
device/stm32f2xx_hal_flash_ex.c
33+
device/stm32f2xx_hal_gpio.c
34+
device/stm32f2xx_hal_hash.c
35+
device/stm32f2xx_hal_hcd.c
36+
device/stm32f2xx_hal_i2c.c
37+
device/stm32f2xx_hal_i2s.c
38+
device/stm32f2xx_hal_irda.c
39+
device/stm32f2xx_hal_iwdg.c
40+
device/stm32f2xx_hal_mmc.c
41+
device/stm32f2xx_hal_nand.c
42+
device/stm32f2xx_hal_nor.c
43+
device/stm32f2xx_hal_pccard.c
44+
device/stm32f2xx_hal_pcd.c
45+
device/stm32f2xx_hal_pcd_ex.c
46+
device/stm32f2xx_hal_pwr.c
47+
device/stm32f2xx_hal_pwr_ex.c
48+
device/stm32f2xx_hal_rcc.c
49+
device/stm32f2xx_hal_rcc_ex.c
50+
device/stm32f2xx_hal_rng.c
51+
device/stm32f2xx_hal_rtc.c
52+
device/stm32f2xx_hal_rtc_ex.c
53+
device/stm32f2xx_hal_sd.c
54+
device/stm32f2xx_hal_smartcard.c
55+
device/stm32f2xx_hal_spi.c
56+
device/stm32f2xx_hal_sram.c
57+
device/stm32f2xx_hal_tim.c
58+
device/stm32f2xx_hal_tim_ex.c
59+
device/stm32f2xx_hal_uart.c
60+
device/stm32f2xx_hal_usart.c
61+
device/stm32f2xx_hal_wwdg.c
62+
device/stm32f2xx_ll_adc.c
63+
device/stm32f2xx_ll_crc.c
64+
device/stm32f2xx_ll_dac.c
65+
device/stm32f2xx_ll_dma.c
66+
device/stm32f2xx_ll_exti.c
67+
device/stm32f2xx_ll_fsmc.c
68+
device/stm32f2xx_ll_gpio.c
69+
device/stm32f2xx_ll_i2c.c
70+
device/stm32f2xx_ll_pwr.c
71+
device/stm32f2xx_ll_rcc.c
72+
device/stm32f2xx_ll_rng.c
73+
device/stm32f2xx_ll_rtc.c
74+
device/stm32f2xx_ll_sdmmc.c
75+
device/stm32f2xx_ll_spi.c
76+
device/stm32f2xx_ll_tim.c
77+
device/stm32f2xx_ll_usart.c
78+
device/stm32f2xx_ll_usb.c
79+
device/stm32f2xx_ll_utils.c
80+
device/system_stm32f2xx.c
81+
)
82+
83+
target_include_directories(mbed-core
84+
INTERFACE
85+
.
86+
device
87+
)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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_stm32f207xx.S)
6+
set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32F207ZGTx_FLASH.ld)
7+
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
8+
set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32f207xx.S)
9+
set(LINKER_FILE TOOLCHAIN_ARM/stm32f207xx.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+
${STARTUP_FILE}
19+
)
20+
21+
add_subdirectory(STM32Cube_FW)
22+
23+
target_include_directories(mbed-core
24+
INTERFACE
25+
.
26+
device
27+
)

0 commit comments

Comments
 (0)