From b7783e67a8b1b1b04a4948b7402ce13fcdd9e5e8 Mon Sep 17 00:00:00 2001 From: Francisco Molina Date: Tue, 8 Oct 2019 22:39:27 +0200 Subject: [PATCH] boards/common/slwstk6000b: use slwstk6000b.vars.mk to parse CPU_MODEL --- boards/common/slwstk6000b/Makefile.features | 11 ++++++++++- boards/slwstk6000b-slwrb4150a/Makefile.features | 2 -- boards/slwstk6000b-slwrb4162a/Makefile.features | 2 -- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/boards/common/slwstk6000b/Makefile.features b/boards/common/slwstk6000b/Makefile.features index 69f83b7559..a32588dc27 100644 --- a/boards/common/slwstk6000b/Makefile.features +++ b/boards/common/slwstk6000b/Makefile.features @@ -1,5 +1,14 @@ CPU = efm32 -# TODO move CPU_MODEL here based on the daughter board + +# The radio board connected to the slwstk6000b mainboard +BOARD_MODULE = $(word 2, $(subst -, ,$(BOARD))) + +include $(RIOTBOARD)/common/slwstk6000b/slwstk6000b.info.mk +CPU_MODEL = $(word 1, $(SLWSTK6000B_MAINBOARD_VARS_$(BOARD_MODULE))) + +ifeq (,$(CPU_MODEL)) + $(error $(BOARD_MODULE) can not be used with slwstk600b mainboard) +endif # Put defined MCU peripherals here (in alphabetical order) FEATURES_PROVIDED += periph_adc diff --git a/boards/slwstk6000b-slwrb4150a/Makefile.features b/boards/slwstk6000b-slwrb4150a/Makefile.features index 4890267050..d536aa382b 100644 --- a/boards/slwstk6000b-slwrb4150a/Makefile.features +++ b/boards/slwstk6000b-slwrb4150a/Makefile.features @@ -1,4 +1,2 @@ -# HACK this should be deduced from the daughter board in 'common/slwstk6000b' CPU_FAM = efr32mg1p -CPU_MODEL = efr32mg1p233f256gm48 include $(RIOTBOARD)/common/slwstk6000b/Makefile.features diff --git a/boards/slwstk6000b-slwrb4162a/Makefile.features b/boards/slwstk6000b-slwrb4162a/Makefile.features index 756fd27081..df1fefe402 100644 --- a/boards/slwstk6000b-slwrb4162a/Makefile.features +++ b/boards/slwstk6000b-slwrb4162a/Makefile.features @@ -1,4 +1,2 @@ -# HACK this should be deduced from the daughter board in 'common/slwstk6000b' CPU_FAM = efr32mg12p -CPU_MODEL = efr32mg12p332f1024gl125 include $(RIOTBOARD)/common/slwstk6000b/Makefile.features