From 7ac30e471cbe47923b4f117b463139284297b3bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= Date: Wed, 9 Oct 2019 18:51:57 +0200 Subject: [PATCH] boards/slwstk6000b-*: move CPU_MODEL definition to Makefile.features This is still currently a hack to hardcode it as the value can be deduced from the `BOARD_MODULE` daughter board name. But it requires more cleanup and could come in a separate step. Part of moving CPU/CPU_MODEL definition to Makefile.features to have it available before Makefile.include. --- boards/common/slwstk6000b/Makefile.features | 2 +- boards/common/slwstk6000b/Makefile.include | 2 -- boards/slwstk6000b-slwrb4150a/Makefile.features | 2 ++ boards/slwstk6000b-slwrb4162a/Makefile.features | 2 ++ dist/tools/buildsystem_sanity_check/check.sh | 3 --- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/boards/common/slwstk6000b/Makefile.features b/boards/common/slwstk6000b/Makefile.features index 031f30d249..c283226995 100644 --- a/boards/common/slwstk6000b/Makefile.features +++ b/boards/common/slwstk6000b/Makefile.features @@ -1,5 +1,5 @@ CPU = efm32 -# TODO move CPU_MODEL here +# TODO move CPU_MODEL here based on the daughter board # Put defined MCU peripherals here (in alphabetical order) FEATURES_PROVIDED += periph_adc diff --git a/boards/common/slwstk6000b/Makefile.include b/boards/common/slwstk6000b/Makefile.include index 1070acdb89..e511c7de3c 100644 --- a/boards/common/slwstk6000b/Makefile.include +++ b/boards/common/slwstk6000b/Makefile.include @@ -4,8 +4,6 @@ INCLUDES += -I$(RIOTBOARD)/common/slwstk6000b/include # add module specific includes INCLUDES += -I$(RIOTBOARD)/common/slwstk6000b/modules/$(BOARD_MODULE)/include -export CPU_MODEL = $(MODULE_CPU) - # set default port depending on operating system PORT_LINUX ?= /dev/ttyACM0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) diff --git a/boards/slwstk6000b-slwrb4150a/Makefile.features b/boards/slwstk6000b-slwrb4150a/Makefile.features index a9759a3c88..50a9307d14 100644 --- a/boards/slwstk6000b-slwrb4150a/Makefile.features +++ b/boards/slwstk6000b-slwrb4150a/Makefile.features @@ -1 +1,3 @@ +# HACK this should be deduced from the daughter board in 'common/slwstk6000b' +CPU_MODEL = efr32mg1p233f256gm48 include $(RIOTBOARD)/common/slwstk6000b/Makefile.features diff --git a/boards/slwstk6000b-slwrb4162a/Makefile.features b/boards/slwstk6000b-slwrb4162a/Makefile.features index a9759a3c88..5667afc2fb 100644 --- a/boards/slwstk6000b-slwrb4162a/Makefile.features +++ b/boards/slwstk6000b-slwrb4162a/Makefile.features @@ -1 +1,3 @@ +# HACK this should be deduced from the daughter board in 'common/slwstk6000b' +CPU_MODEL = efr32mg12p332f1024gl125 include $(RIOTBOARD)/common/slwstk6000b/Makefile.features diff --git a/dist/tools/buildsystem_sanity_check/check.sh b/dist/tools/buildsystem_sanity_check/check.sh index 6c2c53abec..dc6d23f5b0 100755 --- a/dist/tools/buildsystem_sanity_check/check.sh +++ b/dist/tools/buildsystem_sanity_check/check.sh @@ -155,9 +155,6 @@ check_cpu_cpu_model_defined_in_makefile_features() { pathspec+=(':!boards/**/Makefile.features') pathspec+=(':!cpu/**/Makefile.features') - # Currently blacklist this non migrated file for CPU_MODEL - pathspec+=(':!boards/common/slwstk6000b/Makefile.include') - git -C "${RIOTBASE}" grep "${patterns[@]}" -- "${pathspec[@]}" \ | error_with_message 'CPU and CPU_MODEL definition must be done by board/BOARD/Makefile.features, board/common/**/Makefile.features or cpu/CPU/Makefile.features' }