diff --git a/makefiles/arch/cortexm.inc.mk b/makefiles/arch/cortexm.inc.mk index b55d5f4fa5c14..eaf0adab95bd5 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')