Skip to content

Commit

Permalink
Rework STM32H7x clocking configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
multiplemonomials committed Mar 25, 2024
1 parent baf6a30 commit 4e1f335
Show file tree
Hide file tree
Showing 14 changed files with 489 additions and 589 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)
Loading

0 comments on commit 4e1f335

Please sign in to comment.