Skip to content

Commit 1a90deb

Browse files
committed
CMake: Fix the listing of system_clock.c for STM32F413xH
Each variant now has its own system_clock.c file. Therefore ensure the correct one is added for each variant. Also reduce the number of CMakeLists.txt file as each variant does not have significant number of files.
1 parent c28f0d6 commit 1a90deb

File tree

4 files changed

+13
-44
lines changed

4 files changed

+13
-44
lines changed

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/CMakeLists.txt

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,19 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
if("DISCO_F413ZH" IN_LIST MBED_TARGET_LABELS)
5-
add_subdirectory(TARGET_DISCO_F413ZH)
5+
target_include_directories(mbed-core INTERFACE TARGET_DISCO_F413ZH)
6+
set(PERIPHERALPINS_FILE TARGET_DISCO_F413ZH/PeripheralPins.c)
7+
set(SYSTEM_CLOCK_FILE TARGET_DISCO_F413ZH/system_clock.c)
68
elseif("MTS_DRAGONFLY_F413RH" IN_LIST MBED_TARGET_LABELS)
7-
add_subdirectory(TARGET_MTS_DRAGONFLY_F413RH)
9+
target_include_directories(mbed-core INTERFACE TARGET_MTS_DRAGONFLY_F413RH)
10+
set(PERIPHERALPINS_FILE TARGET_MTS_DRAGONFLY_F413RH/PeripheralPins.c)
11+
set(SYSTEM_CLOCK_FILE TARGET_MTS_DRAGONFLY_F413RH/system_clock.c)
12+
13+
target_sources(mbed-core INTERFACE TARGET_MTS_DRAGONFLY_F413RH/ONBOARD_TELIT_HE910.cpp)
814
elseif("NUCLEO_F413ZH" IN_LIST MBED_TARGET_LABELS)
9-
add_subdirectory(TARGET_NUCLEO_F413ZH)
15+
target_include_directories(mbed-core INTERFACE TARGET_NUCLEO_F413ZH)
16+
set(PERIPHERALPINS_FILE TARGET_NUCLEO_F413ZH/PeripheralPins.c)
17+
set(SYSTEM_CLOCK_FILE TARGET_NUCLEO_F413ZH/system_clock.c)
1018
endif()
1119

1220
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
@@ -21,8 +29,9 @@ set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}
2129

2230
target_sources(mbed-core
2331
INTERFACE
24-
system_clock.c
32+
${PERIPHERALPINS_FILE}
2533
${STARTUP_FILE}
34+
${SYSTEM_CLOCK_FILE}
2635
)
2736

2837
target_include_directories(mbed-core

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/TARGET_DISCO_F413ZH/CMakeLists.txt

Lines changed: 0 additions & 13 deletions
This file was deleted.

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/TARGET_MTS_DRAGONFLY_F413RH/CMakeLists.txt

Lines changed: 0 additions & 14 deletions
This file was deleted.

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/TARGET_NUCLEO_F413ZH/CMakeLists.txt

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)