1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/cpu/efm32/Makefile.features
Leandro Lanzieri df7ce1c647
makefiles/kconfig: use two lists for boards and CPUs default configs
This introduces KCONFIG_BOARD_CONFIG and KCONFIG_CPU_CONFIG variable for
boards and CPUs (including common directories) to add default
configuration files to be merged. The current approach, as it uses
Makefile.features, would include boards first, not allowing them to
override CPU configurations.
2021-12-13 12:33:21 +01:00

43 lines
1.2 KiB
Makefile

include $(RIOTCPU)/efm32/efm32-info.mk
include $(RIOTCPU)/efm32/efm32-features.mk
CPU_CORE = $(EFM32_ARCHITECTURE)
# families without MPU
ifeq (,$(filter efm32zg efm32hg, $(CPU_FAM)))
FEATURES_PROVIDED += cortexm_mpu
endif
FEATURES_PROVIDED += arch_efm32
FEATURES_PROVIDED += periph_cpuid
FEATURES_PROVIDED += periph_flashpage
FEATURES_PROVIDED += periph_flashpage_pagewise
FEATURES_PROVIDED += periph_gpio periph_gpio_irq
FEATURES_PROVIDED += periph_rtt_set_counter
FEATURES_PROVIDED += periph_rtt_overflow
FEATURES_PROVIDED += periph_wdt
FEATURES_CONFLICT += periph_rtc:periph_rtt
FEATURES_CONFLICT_MSG += "On the EFM32, the RTC and RTT map to the same hardware peripheral."
ifeq (1,$(EFM32_TRNG))
FEATURES_PROVIDED += periph_hwrng
endif
ifeq (1,$(EFM32_SERIES))
FEATURES_PROVIDED += periph_wdt_cb
endif
ifeq (1,$(EFM32_LEUART_ENABLED))
CFLAGS += -DEFM32_LEUART_ENABLED=1
endif
include $(RIOTCPU)/cortexm_common/Makefile.features
# Add efm32 configurations after including cortexm_common so efm32 takes precendence
# This configuration enables modules that are only available when using Kconfig
# module modelling
ifeq (1,$(TEST_KCONFIG))
KCONFIG_CPU_CONFIG += $(RIOTCPU)/efm32/efm32.config
endif