Skip to content

Commit 945c3de

Browse files
authored
Merge pull request #15502 from mbed-ce/upstreamed/stm32h7x-clocking-fixes
Rework STM32H7x clocking configuration
2 parents e3d2c56 + 45e9efc commit 945c3de

File tree

16 files changed

+488
-906
lines changed

16 files changed

+488
-906
lines changed

targets/TARGET_STM/TARGET_STM32H7/CMakeLists.txt

+10
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,13 @@ target_include_directories(mbed-stm32h7
3333
)
3434

3535
target_link_libraries(mbed-stm32h7 INTERFACE mbed-stm mbed-stm32h7cube-fw)
36+
37+
38+
# Add clock file depending on the frequency
39+
if("STM32H7_480MHZ" IN_LIST MBED_TARGET_LABELS)
40+
target_sources(mbed-stm32h7 INTERFACE clock_cfg/TARGET_STM32H7_480MHZ/system_clock.c)
41+
elseif("STM32H7_550MHZ" IN_LIST MBED_TARGET_LABELS)
42+
target_sources(mbed-stm32h7 INTERFACE clock_cfg/TARGET_STM32H7_550MHZ/system_clock.c)
43+
elseif("STM32H7_280MHZ" IN_LIST MBED_TARGET_LABELS)
44+
target_sources(mbed-stm32h7 INTERFACE clock_cfg/TARGET_STM32H7_280MHZ/system_clock.c)
45+
endif()

targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H723xG/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ target_include_directories(mbed-stm32h723xg
2121
target_sources(mbed-stm32h723xg
2222
INTERFACE
2323
${STARTUP_FILE}
24-
system_clock.c
2524
)
2625

2726
mbed_set_linker_script(mbed-stm32h723xg ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})

targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H743xI/TARGET_NUCLEO_H743ZI2/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ add_library(mbed-nucleo-h743zi2 INTERFACE)
66
target_sources(mbed-nucleo-h743zi2
77
INTERFACE
88
PeripheralPins.c
9-
system_clock.c
109
)
1110

1211
target_include_directories(mbed-nucleo-h743zi2

targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H745xI/CMakeLists.txt

-5
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,4 @@ add_subdirectory(TARGET_STM32H745xI_CM7 EXCLUDE_FROM_ALL)
66

77
add_library(mbed-stm32h745xi INTERFACE)
88

9-
target_sources(mbed-stm32h745xi
10-
INTERFACE
11-
system_clock.c
12-
)
13-
149
target_link_libraries(mbed-stm32h745xi INTERFACE mbed-stm32h7)

targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H745xI/system_clock.c

-206
This file was deleted.

targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/CMakeLists.txt

-5
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,4 @@ add_subdirectory(TARGET_PORTENTA_H7 EXCLUDE_FROM_ALL)
88

99
add_library(mbed-stm32h747xi INTERFACE)
1010

11-
target_sources(mbed-stm32h747xi
12-
INTERFACE
13-
system_clock.c
14-
)
15-
1611
target_link_libraries(mbed-stm32h747xi INTERFACE mbed-stm32h7)

targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_PORTENTA_H7/CMakeLists.txt

-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ add_library(mbed-portenta-h7-m4 INTERFACE)
88
target_sources(mbed-portenta-h7-m4
99
INTERFACE
1010
PeripheralPins.c
11-
system_clock_override.c
1211
portenta_power.cpp
1312
)
1413

@@ -25,7 +24,6 @@ add_library(mbed-portenta-h7-m7 INTERFACE)
2524
target_sources(mbed-portenta-h7-m7
2625
INTERFACE
2726
PeripheralPins.c
28-
system_clock_override.c
2927
portenta_power.cpp
3028
)
3129

0 commit comments

Comments
 (0)