Skip to content

Commit

Permalink
cpu/stm32/kconfig: rework clock tree
Browse files Browse the repository at this point in the history
This splits up the clock configs.
It allows CPU_FAM based file sourcing and also common CPU_FAMs.
The dependancies are also included in wildcards would be used for the CPU_FAM macro.
This should be much more readable.
This also takes into account the HSE speeds in order to match the make/header resolution.
Some hidden symbols were added to make sorting many CPU_SERIES dependencies easier.
  • Loading branch information
MrKevinWeiss committed Nov 3, 2022
1 parent ba4843b commit 28aed3c
Show file tree
Hide file tree
Showing 29 changed files with 822 additions and 427 deletions.
20 changes: 16 additions & 4 deletions cpu/stm32/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ config CPU_STM32
# This CPU requires periph_rtc when periph_rtc_mem
select MODULE_PERIPH_RTC if MODULE_PERIPH_RTC_MEM && HAS_PERIPH_RTC

menu "STM32 configuration"

# Common CPU symbol
config CPU
default "stm32" if CPU_STM32
Expand All @@ -39,10 +41,18 @@ config MODULE_BOOTLOADER_STM32
depends on HAS_BOOTLOADER_STM32
depends on TEST_KCONFIG

orsource "kconfigs/Kconfig.clk"
orsource "kconfigs/*/Kconfig"
orsource "kconfigs/*/Kconfig.lines"
orsource "kconfigs/*/Kconfig.models"

menu "STM32 clock configuration"
depends on CPU_STM32

rsource "kconfigs/Kconfig.clk"
rsource "kconfigs/$(CPU_FAM)/Kconfig.clk"

endmenu

rsource "kconfigs/$(CPU_FAM)/Kconfig"
rsource "kconfigs/$(CPU_FAM)/Kconfig.lines"
rsource "kconfigs/$(CPU_FAM)/Kconfig.models"

choice
prompt "ReaDout Protection level"
Expand Down Expand Up @@ -72,4 +82,6 @@ rsource "vectors/Kconfig"

endif # TEST_KCONFIG

endmenu

source "$(RIOTCPU)/cortexm_common/Kconfig"
Loading

0 comments on commit 28aed3c

Please sign in to comment.