1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/cpu/stm32/stmclk/Makefile
Gilles DOFFE 4bfbb75578 cpu/stm32: add stm32mp1_eng_mode pseudomodule
In Engineering mode (BOOT0 off and BOOT2 on), only the Cortex-M4
core is running. It means that all clocks have to be setup
by the Cortex-M4 core.
In other modes, the clocks are setup by the Cortex-A7 and then should
not be setup by Cortex-M4.
stm32mp1_eng_mode pseudomodule have to be used in Engineering mode
to ensure clocks configuration with IS_USED(MODULE_STM32MP1_ENG_MODE)
macro.
This macro can also be used in periph_conf.h to define clock source
for each peripheral.

Signed-off-by: Gilles DOFFE <gilles.doffe@savoirfairelinux.com>
2020-11-13 10:43:08 +01:00

29 lines
710 B
Makefile

MODULE = stm32_clk
ifneq (mp1,$(CPU_FAM))
SRC = stmclk_common.c
endif
ifneq (,$(filter $(CPU_FAM),f2 f4 f7))
SRC += stmclk_f2f4f7.c
else ifneq (,$(filter $(CPU_FAM),f0 f1 f3))
SRC += stmclk_f0f1f3.c
else ifneq (,$(filter $(CPU_FAM),l0 l1))
SRC += stmclk_l0l1.c
else ifneq (,$(filter $(CPU_FAM),l4 wb))
SRC += stmclk_l4wb.c
else ifneq (,$(filter $(CPU_FAM),l5))
SRC += stmclk_l5.c
else ifneq (,$(filter $(CPU_FAM),g0 g4))
SRC += stmclk_gx.c
else ifneq (,$(filter $(CPU_FAM),mp1))
ifneq (,$(filter stm32mp1_eng_mode,$(USEMODULE)))
SRC = stmclk_mp1.c
else
# Do not use *.c as SRC if SRC is empty (see Makefile.base)
NO_AUTO_SRC = 1
endif
endif
include $(RIOTBASE)/Makefile.base