From 84de2d8f7b1395bba6ddd7cbda03e0301110853c Mon Sep 17 00:00:00 2001 From: Leandro Lanzieri Date: Fri, 10 Jul 2020 10:55:50 +0200 Subject: [PATCH] cpu/saml1x: Specify CPU_FAM only in Makefile.features --- boards/saml10-xpro/Makefile.include | 1 - boards/saml11-xpro/Makefile.include | 1 - cpu/saml1x/Makefile.features | 9 ++++++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/boards/saml10-xpro/Makefile.include b/boards/saml10-xpro/Makefile.include index 6901e1f502..4a14fb0cf7 100644 --- a/boards/saml10-xpro/Makefile.include +++ b/boards/saml10-xpro/Makefile.include @@ -1,4 +1,3 @@ -CPU_FAM = saml10 CFLAGS += -D__SAML10E16A__ include $(RIOTBOARD)/common/saml1x/Makefile.include diff --git a/boards/saml11-xpro/Makefile.include b/boards/saml11-xpro/Makefile.include index 4161a45cf2..1706953598 100644 --- a/boards/saml11-xpro/Makefile.include +++ b/boards/saml11-xpro/Makefile.include @@ -1,4 +1,3 @@ -CPU_FAM = saml11 CFLAGS += -D__SAML11E16A__ include $(RIOTBOARD)/common/saml1x/Makefile.include diff --git a/cpu/saml1x/Makefile.features b/cpu/saml1x/Makefile.features index 74b904eb6e..2b005dda64 100644 --- a/cpu/saml1x/Makefile.features +++ b/cpu/saml1x/Makefile.features @@ -1,5 +1,12 @@ CPU_CORE = cortex-m23 -CPU_FAM = saml1x + +ifneq (,$(filter saml10%,$(CPU_MODEL))) + CPU_FAM = saml10 +else ifneq (,$(filter saml11%,$(CPU_MODEL))) + CPU_FAM = saml11 +else + $(error Unknown saml1x CPU Model: $(CPU_MODEL)) +endif FEATURES_PROVIDED += cortexm_mpu FEATURES_PROVIDED += periph_hwrng