From 8e1f6efa6d684b1822ac22d74826589474ce7361 Mon Sep 17 00:00:00 2001 From: Bas Stottelaar Date: Wed, 18 Nov 2020 17:26:02 +0100 Subject: [PATCH 1/4] makefiles: model efm32_coretemp as a feature --- makefiles/features_modules.inc.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/makefiles/features_modules.inc.mk b/makefiles/features_modules.inc.mk index d1e6efce49..1469df279d 100644 --- a/makefiles/features_modules.inc.mk +++ b/makefiles/features_modules.inc.mk @@ -44,3 +44,6 @@ endif ifneq (,$(filter cortexm_mpu,$(FEATURES_USED))) USEMODULE += mpu_stack_guard endif + +# use efm32_coretemp if the feature is used +USEMODULE += $(filter efm32_coretemp, $(FEATURES_USED)) From e438e9afde81940114a1883d9ffb3245b0648d06 Mon Sep 17 00:00:00 2001 From: Bas Stottelaar Date: Wed, 18 Nov 2020 17:26:24 +0100 Subject: [PATCH 2/4] boards/efm32: provide efm32_coretemp feature --- boards/common/silabs/Kconfig | 1 + boards/common/silabs/Makefile.features | 1 + boards/ikea-tradfri/Kconfig | 1 + boards/ikea-tradfri/Makefile.features | 1 + 4 files changed, 4 insertions(+) diff --git a/boards/common/silabs/Kconfig b/boards/common/silabs/Kconfig index 5f32360e5f..73d84a7f37 100644 --- a/boards/common/silabs/Kconfig +++ b/boards/common/silabs/Kconfig @@ -7,4 +7,5 @@ config BOARD_COMMON_SILABS bool select HAS_ARDUINO + select HAS_EFM32_CORETEMP select HAS_RIOTBOOT diff --git a/boards/common/silabs/Makefile.features b/boards/common/silabs/Makefile.features index da335a0963..bd382ec652 100644 --- a/boards/common/silabs/Makefile.features +++ b/boards/common/silabs/Makefile.features @@ -2,4 +2,5 @@ CPU = efm32 # Various other features (if any) FEATURES_PROVIDED += arduino +FEATURES_PROVIDED += efm32_coretemp FEATURES_PROVIDED += riotboot diff --git a/boards/ikea-tradfri/Kconfig b/boards/ikea-tradfri/Kconfig index 2a0061f746..360acedbb3 100644 --- a/boards/ikea-tradfri/Kconfig +++ b/boards/ikea-tradfri/Kconfig @@ -18,4 +18,5 @@ config BOARD_IKEA_TRADFRI select HAS_PERIPH_TIMER select HAS_PERIPH_UART select HAS_PERIPH_UART_MODECFG + select HAS_EFM32_CORETEMP select HAS_RIOTBOOT diff --git a/boards/ikea-tradfri/Makefile.features b/boards/ikea-tradfri/Makefile.features index e47e12b0ea..2eb3d3a320 100644 --- a/boards/ikea-tradfri/Makefile.features +++ b/boards/ikea-tradfri/Makefile.features @@ -12,3 +12,4 @@ FEATURES_PROVIDED += periph_uart periph_uart_modecfg # Put other features for this board (in alphabetical order) FEATURES_PROVIDED += riotboot +FEATURES_PROVIDED += efm32_coretemp From e2e64e7546dc975d524672e2ed5ecdde836765ac Mon Sep 17 00:00:00 2001 From: Bas Stottelaar Date: Wed, 18 Nov 2020 17:26:42 +0100 Subject: [PATCH 3/4] tests/cpu_efm32_drivers: require efm32_coretemp feature --- tests/cpu_efm32_drivers/Makefile | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/tests/cpu_efm32_drivers/Makefile b/tests/cpu_efm32_drivers/Makefile index 192e00f572..1c43cda421 100644 --- a/tests/cpu_efm32_drivers/Makefile +++ b/tests/cpu_efm32_drivers/Makefile @@ -1,17 +1,6 @@ BOARD ?= sltb001a include ../Makefile.tests_common -BOARD_WHITELIST := ikea-tradfri \ - slstk3401a \ - slstk3402a \ - sltb001a \ - slwstk6000b-slwrb4150a \ - slwstk6000b-slwrb4162a \ - slwstk6220a \ - stk3200 \ - stk3600 \ - stk3700 - -USEMODULE += efm32_coretemp +FEATURES_REQUIRED += efm32_coretemp include $(RIOTBASE)/Makefile.include From 6f60185bfa3156dd0fe8e891d658c94939737cd4 Mon Sep 17 00:00:00 2001 From: Bas Stottelaar Date: Wed, 18 Nov 2020 18:43:33 +0100 Subject: [PATCH 4/4] cpu/efm32: define Kconfig option for efm32_coretemp --- cpu/efm32/Kconfig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cpu/efm32/Kconfig b/cpu/efm32/Kconfig index 8115ae4339..2bb539e5f1 100644 --- a/cpu/efm32/Kconfig +++ b/cpu/efm32/Kconfig @@ -33,6 +33,12 @@ config HAS_CPU_EFM32 help Indicates that the CPU being used is an EFM32. +## Definition of EFM32-specific drivers ## +config HAS_EFM32_CORETEMP + bool + help + Indicates that the EFM32 coretemp driver is being used. + ## Common CPU symbols config CPU default "efm32" if CPU_COMMON_EFM32