Skip to content

Commit

Permalink
Merge pull request #15502 from mbed-ce/upstreamed/stm32h7x-clocking-f…
Browse files Browse the repository at this point in the history
…ixes

Rework STM32H7x clocking configuration
  • Loading branch information
0xc0170 committed Jun 8, 2024
2 parents e3d2c56 + 45e9efc commit 945c3de
Show file tree
Hide file tree
Showing 16 changed files with 488 additions and 906 deletions.
10 changes: 10 additions & 0 deletions targets/TARGET_STM/TARGET_STM32H7/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,13 @@ target_include_directories(mbed-stm32h7
)

target_link_libraries(mbed-stm32h7 INTERFACE mbed-stm mbed-stm32h7cube-fw)


# Add clock file depending on the frequency
if("STM32H7_480MHZ" IN_LIST MBED_TARGET_LABELS)
target_sources(mbed-stm32h7 INTERFACE clock_cfg/TARGET_STM32H7_480MHZ/system_clock.c)
elseif("STM32H7_550MHZ" IN_LIST MBED_TARGET_LABELS)
target_sources(mbed-stm32h7 INTERFACE clock_cfg/TARGET_STM32H7_550MHZ/system_clock.c)
elseif("STM32H7_280MHZ" IN_LIST MBED_TARGET_LABELS)
target_sources(mbed-stm32h7 INTERFACE clock_cfg/TARGET_STM32H7_280MHZ/system_clock.c)
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ target_include_directories(mbed-stm32h723xg
target_sources(mbed-stm32h723xg
INTERFACE
${STARTUP_FILE}
system_clock.c
)

mbed_set_linker_script(mbed-stm32h723xg ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ add_library(mbed-nucleo-h743zi2 INTERFACE)
target_sources(mbed-nucleo-h743zi2
INTERFACE
PeripheralPins.c
system_clock.c
)

target_include_directories(mbed-nucleo-h743zi2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,4 @@ add_subdirectory(TARGET_STM32H745xI_CM7 EXCLUDE_FROM_ALL)

add_library(mbed-stm32h745xi INTERFACE)

target_sources(mbed-stm32h745xi
INTERFACE
system_clock.c
)

target_link_libraries(mbed-stm32h745xi INTERFACE mbed-stm32h7)
206 changes: 0 additions & 206 deletions targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H745xI/system_clock.c

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,4 @@ add_subdirectory(TARGET_PORTENTA_H7 EXCLUDE_FROM_ALL)

add_library(mbed-stm32h747xi INTERFACE)

target_sources(mbed-stm32h747xi
INTERFACE
system_clock.c
)

target_link_libraries(mbed-stm32h747xi INTERFACE mbed-stm32h7)
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ add_library(mbed-portenta-h7-m4 INTERFACE)
target_sources(mbed-portenta-h7-m4
INTERFACE
PeripheralPins.c
system_clock_override.c
portenta_power.cpp
)

Expand All @@ -25,7 +24,6 @@ add_library(mbed-portenta-h7-m7 INTERFACE)
target_sources(mbed-portenta-h7-m7
INTERFACE
PeripheralPins.c
system_clock_override.c
portenta_power.cpp
)

Expand Down
Loading

0 comments on commit 945c3de

Please sign in to comment.