diff --git a/cpu/lpc1768/Makefile.features b/cpu/lpc1768/Makefile.features index 01cd4811b72a..1c25c072c7dc 100644 --- a/cpu/lpc1768/Makefile.features +++ b/cpu/lpc1768/Makefile.features @@ -1,3 +1,5 @@ +# This CPU only implements one CPU_MODEL with the same name +CPU_MODEL = lpc1768 FEATURES_PROVIDED += periph_cpuid FEATURES_PROVIDED += periph_pm diff --git a/makefiles/arch/cortexm.inc.mk b/makefiles/arch/cortexm.inc.mk index b55d5f4fa5c1..eaf0adab95bd 100644 --- a/makefiles/arch/cortexm.inc.mk +++ b/makefiles/arch/cortexm.inc.mk @@ -1,3 +1,7 @@ +ifeq (,$(CPU_MODEL)) + $(error CPU_MODEL must have been defined by the board/cpu Makefile.features) +endif + # Target triple for the build. Use arm-none-eabi if you are unsure. export TARGET_ARCH ?= arm-none-eabi @@ -39,9 +43,6 @@ export USEMODULE += cortexm_common_periph # all cortex MCU's use newlib as libc export USEMODULE += newlib -# set default for CPU_MODEL -export CPU_MODEL ?= $(CPU) - # extract version inside the first parentheses ARM_GCC_VERSION = $(shell $(TARGET_ARCH)-gcc --version | sed -n '1 s/[^(]*(\([^\)]*\)).*/\1/p')