diff --git a/boards/saml10-xpro/Makefile.include b/boards/saml10-xpro/Makefile.include index e33947745c..6901e1f502 100644 --- a/boards/saml10-xpro/Makefile.include +++ b/boards/saml10-xpro/Makefile.include @@ -1,4 +1,4 @@ -export CPU_FAM = saml10 +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 c24adbef10..4161a45cf2 100644 --- a/boards/saml11-xpro/Makefile.include +++ b/boards/saml11-xpro/Makefile.include @@ -1,4 +1,4 @@ -export CPU_FAM = saml11 +CPU_FAM = saml11 CFLAGS += -D__SAML11E16A__ include $(RIOTBOARD)/common/saml1x/Makefile.include diff --git a/cpu/cc2538/Makefile.include b/cpu/cc2538/Makefile.include index 7a03b807df..1fe925bc54 100644 --- a/cpu/cc2538/Makefile.include +++ b/cpu/cc2538/Makefile.include @@ -1,3 +1,3 @@ -export CPU_ARCH := cortex-m3 +CPU_ARCH = cortex-m3 include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/cc26x0/Makefile.include b/cpu/cc26x0/Makefile.include index 7a03b807df..1fe925bc54 100644 --- a/cpu/cc26x0/Makefile.include +++ b/cpu/cc26x0/Makefile.include @@ -1,3 +1,3 @@ -export CPU_ARCH := cortex-m3 +CPU_ARCH = cortex-m3 include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/efm32/Makefile.include b/cpu/efm32/Makefile.include index cb5d566fc4..94cdda7a40 100644 --- a/cpu/efm32/Makefile.include +++ b/cpu/efm32/Makefile.include @@ -1,7 +1,7 @@ include $(RIOTCPU)/efm32/efm32-info.mk -export CPU_ARCH = $(EFM32_ARCHITECTURE) -export CPU_FAM = $(EFM32_FAMILY) +CPU_ARCH = $(EFM32_ARCHITECTURE) +CPU_FAM = $(EFM32_FAMILY) # the size of riotboot on the EFM32 exceeds the default value RIOTBOOT_LEN ?= 0x2000 diff --git a/cpu/ezr32wg/Makefile.include b/cpu/ezr32wg/Makefile.include index 1e08098b24..6fdedf4c05 100644 --- a/cpu/ezr32wg/Makefile.include +++ b/cpu/ezr32wg/Makefile.include @@ -1,3 +1,3 @@ -export CPU_ARCH = cortex-m4f +CPU_ARCH = cortex-m4f include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/kinetis/kinetis-info.mk b/cpu/kinetis/kinetis-info.mk index aca8caec3b..8ca1b14cea 100644 --- a/cpu/kinetis/kinetis-info.mk +++ b/cpu/kinetis/kinetis-info.mk @@ -31,17 +31,17 @@ export KINETIS_SPEED := $(word 11, $(KINETIS_INFO)) ifeq ($(KINETIS_CORE), Z) # Cortex-M0+ - export CPU_ARCH = cortex-m0plus - export CPU_FAMILY = klx + CPU_ARCH = cortex-m0plus + CPU_FAMILY = klx else ifeq ($(KINETIS_CORE), D) # Cortex-M4 - export CPU_ARCH = cortex-m4 - export CPU_FAMILY = kx + CPU_ARCH = cortex-m4 + CPU_FAMILY = kx else ifeq ($(KINETIS_CORE), F) # Cortex-M4F or Cortex-M7 # TODO: Add floating point support - export CPU_ARCH = cortex-m4 - export CPU_FAMILY = kx + CPU_ARCH = cortex-m4 + CPU_FAMILY = kx endif # RAM sizes are a bit arbitrary, but are usually dependent on ROM size and core speed. diff --git a/cpu/lm4f120/Makefile.include b/cpu/lm4f120/Makefile.include index 4570e4a1bc..c7b25bb927 100644 --- a/cpu/lm4f120/Makefile.include +++ b/cpu/lm4f120/Makefile.include @@ -1,4 +1,4 @@ -export CPU_ARCH = cortex-m4f +CPU_ARCH = cortex-m4f include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/lpc1768/Makefile.include b/cpu/lpc1768/Makefile.include index f98dd6eba7..7897d949a4 100644 --- a/cpu/lpc1768/Makefile.include +++ b/cpu/lpc1768/Makefile.include @@ -1,4 +1,4 @@ -export CPU_ARCH = cortex-m3 +CPU_ARCH = cortex-m3 USEMODULE += pm_layered diff --git a/cpu/nrf51/Makefile.include b/cpu/nrf51/Makefile.include index b182bf12fa..065e1b5f3e 100644 --- a/cpu/nrf51/Makefile.include +++ b/cpu/nrf51/Makefile.include @@ -1,5 +1,5 @@ -export CPU_ARCH = cortex-m0 -export CPU_FAM = nrf51 +CPU_ARCH = cortex-m0 +CPU_FAM = nrf51 include $(RIOTCPU)/nrf5x_common/Makefile.include include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/nrf52/Makefile.include b/cpu/nrf52/Makefile.include index 5b59f412b0..c6a9ed6913 100644 --- a/cpu/nrf52/Makefile.include +++ b/cpu/nrf52/Makefile.include @@ -1,5 +1,5 @@ -export CPU_ARCH = cortex-m4f -export CPU_FAM = nrf52 +CPU_ARCH = cortex-m4f +CPU_FAM = nrf52 # Slot size is determined by "((total_flash_size - RIOTBOOT_LEN) / 2)". # If RIOTBOOT_LEN uses an uneven number of flashpages, the remainder of the diff --git a/cpu/sam3/Makefile.include b/cpu/sam3/Makefile.include index 76410eb754..6310a1e913 100644 --- a/cpu/sam3/Makefile.include +++ b/cpu/sam3/Makefile.include @@ -1,5 +1,5 @@ -export CPU_ARCH = cortex-m3 -export CPU_FAM = sam3 +CPU_ARCH = cortex-m3 +CPU_FAM = sam3 include $(RIOTCPU)/sam_common/Makefile.include include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/samd21/Makefile.include b/cpu/samd21/Makefile.include index e5486c8a89..2576ff4ed2 100644 --- a/cpu/samd21/Makefile.include +++ b/cpu/samd21/Makefile.include @@ -1,5 +1,5 @@ -export CPU_ARCH = cortex-m0plus -export CPU_FAM = samd21 +CPU_ARCH = cortex-m0plus +CPU_FAM = samd21 USEMODULE += pm_layered diff --git a/cpu/samd5x/Makefile.include b/cpu/samd5x/Makefile.include index c83d5399e5..4484c2497e 100644 --- a/cpu/samd5x/Makefile.include +++ b/cpu/samd5x/Makefile.include @@ -1,5 +1,5 @@ -export CPU_ARCH = cortex-m4f -export CPU_FAM = samd5x +CPU_ARCH = cortex-m4f +CPU_FAM = samd5x # Slot size is determined by "((total_flash_size - RIOTBOOT_LEN) / 2)". # If RIOTBOOT_LEN uses an uneven number of flashpages, the remainder of the diff --git a/cpu/saml1x/Makefile.include b/cpu/saml1x/Makefile.include index 2342d0fc2d..c552017b2d 100644 --- a/cpu/saml1x/Makefile.include +++ b/cpu/saml1x/Makefile.include @@ -1,4 +1,4 @@ -export CPU_ARCH = cortex-m23 +CPU_ARCH = cortex-m23 USEMODULE += pm_layered diff --git a/cpu/saml21/Makefile.include b/cpu/saml21/Makefile.include index e0d91c7fde..f42f494a78 100644 --- a/cpu/saml21/Makefile.include +++ b/cpu/saml21/Makefile.include @@ -1,5 +1,5 @@ -export CPU_ARCH = cortex-m0plus -export CPU_FAM = saml21 +CPU_ARCH = cortex-m0plus +CPU_FAM = saml21 USEMODULE += pm_layered diff --git a/cpu/stm32f0/Makefile.include b/cpu/stm32f0/Makefile.include index 18fc5c661d..5860ac1e33 100644 --- a/cpu/stm32f0/Makefile.include +++ b/cpu/stm32f0/Makefile.include @@ -1,5 +1,5 @@ -export CPU_ARCH = cortex-m0 -export CPU_FAM = stm32f0 +CPU_ARCH = cortex-m0 +CPU_FAM = stm32f0 include $(RIOTCPU)/stm32_common/Makefile.include include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/stm32f1/Makefile.include b/cpu/stm32f1/Makefile.include index 7ca8e6dec6..572e7a6b58 100644 --- a/cpu/stm32f1/Makefile.include +++ b/cpu/stm32f1/Makefile.include @@ -1,5 +1,5 @@ -export CPU_ARCH = cortex-m3 -export CPU_FAM = stm32f1 +CPU_ARCH = cortex-m3 +CPU_FAM = stm32f1 include $(RIOTCPU)/stm32_common/Makefile.include include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/stm32f2/Makefile.include b/cpu/stm32f2/Makefile.include index e5d37fb4ea..b01f22ed62 100644 --- a/cpu/stm32f2/Makefile.include +++ b/cpu/stm32f2/Makefile.include @@ -1,5 +1,5 @@ -export CPU_ARCH = cortex-m3 -export CPU_FAM = stm32f2 +CPU_ARCH = cortex-m3 +CPU_FAM = stm32f2 # STM32F2 uses sectors instead of pages, where the minimum sector length is 16KB # (the first sector), therefore RIOTBOOT_LEN must be 16KB to cover a whole sector. diff --git a/cpu/stm32f3/Makefile.include b/cpu/stm32f3/Makefile.include index 3ad9e9546c..e2648b9a5d 100644 --- a/cpu/stm32f3/Makefile.include +++ b/cpu/stm32f3/Makefile.include @@ -1,5 +1,5 @@ -export CPU_ARCH = cortex-m4f -export CPU_FAM = stm32f3 +CPU_ARCH = cortex-m4f +CPU_FAM = stm32f3 include $(RIOTCPU)/stm32_common/Makefile.include include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/stm32f4/Makefile.include b/cpu/stm32f4/Makefile.include index e6ee4ee22f..5258a494b8 100644 --- a/cpu/stm32f4/Makefile.include +++ b/cpu/stm32f4/Makefile.include @@ -1,5 +1,5 @@ -export CPU_ARCH = cortex-m4f -export CPU_FAM = stm32f4 +CPU_ARCH = cortex-m4f +CPU_FAM = stm32f4 # STM32F4 uses sectors instead of pages, where the minimum sector length is 16KB # (the first sector), therefore RIOTBOOT_LEN must be 16KB to cover a whole sector. diff --git a/cpu/stm32f7/Makefile.include b/cpu/stm32f7/Makefile.include index d3a25f6bad..4d0d5243a4 100644 --- a/cpu/stm32f7/Makefile.include +++ b/cpu/stm32f7/Makefile.include @@ -1,5 +1,5 @@ -export CPU_ARCH = cortex-m7 -export CPU_FAM = stm32f7 +CPU_ARCH = cortex-m7 +CPU_FAM = stm32f7 # STM32F7 uses sectors instead of pages, where the minimum sector length is 16KB or # 32kB (the first sector), depending on the CPU_MODEL. Therefore RIOTBOOT_LEN must diff --git a/cpu/stm32l0/Makefile.include b/cpu/stm32l0/Makefile.include index ccf6a3b05e..8e09dbaed2 100644 --- a/cpu/stm32l0/Makefile.include +++ b/cpu/stm32l0/Makefile.include @@ -1,5 +1,5 @@ -export CPU_ARCH = cortex-m0plus -export CPU_FAM = stm32l0 +CPU_ARCH = cortex-m0plus +CPU_FAM = stm32l0 include $(RIOTCPU)/stm32_common/Makefile.include include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/stm32l1/Makefile.include b/cpu/stm32l1/Makefile.include index 3d6f379e13..46bb58c516 100644 --- a/cpu/stm32l1/Makefile.include +++ b/cpu/stm32l1/Makefile.include @@ -1,5 +1,5 @@ -export CPU_ARCH = cortex-m3 -export CPU_FAM = stm32l1 +CPU_ARCH = cortex-m3 +CPU_FAM = stm32l1 include $(RIOTCPU)/stm32_common/Makefile.include include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/stm32l4/Makefile.include b/cpu/stm32l4/Makefile.include index a2f364d6d0..91eae9acdd 100644 --- a/cpu/stm32l4/Makefile.include +++ b/cpu/stm32l4/Makefile.include @@ -1,5 +1,5 @@ -export CPU_ARCH = cortex-m4f -export CPU_FAM = stm32l4 +CPU_ARCH = cortex-m4f +CPU_FAM = stm32l4 # "The Vector table must be naturally aligned to a power of two whose alignment # value is greater than or equal to number of Exceptions supported x 4" diff --git a/dist/tools/buildsystem_sanity_check/check.sh b/dist/tools/buildsystem_sanity_check/check.sh index 6fabde740f..ba9b88d97b 100755 --- a/dist/tools/buildsystem_sanity_check/check.sh +++ b/dist/tools/buildsystem_sanity_check/check.sh @@ -81,6 +81,8 @@ UNEXPORTED_VARIABLES+=('PORT_LINUX' 'PORT_DARWIN') UNEXPORTED_VARIABLES+=('PORT[ ?=:]' 'PORT$') EXPORTED_VARIABLES_ONLY_IN_VARS=() +EXPORTED_VARIABLES_ONLY_IN_VARS+=('CPU_ARCH') +EXPORTED_VARIABLES_ONLY_IN_VARS+=('CPU_FAM') check_not_exporting_variables() { local patterns=() local pathspec=() diff --git a/makefiles/vars.inc.mk b/makefiles/vars.inc.mk index 135bd81605..263d528e17 100644 --- a/makefiles/vars.inc.mk +++ b/makefiles/vars.inc.mk @@ -10,6 +10,8 @@ export APPLICATION_MODULE # The application module name. export BOARD # The board to compile the application for. export CPU # The CPU, set by the board's Makefile.features. export CPU_MODEL # The specific identifier of the used CPU, used for some CPU implementations to differentiate between different memory layouts. Set by the board's Makefile.features. +export CPU_ARCH # The specific identifier of the core present in the CPU, used currently only for ARM CPU's. Needed for depency resolution. +export CPU_FAM # An intermediate identifier between CPU and CPU_MODEL that represents a sub-group of a Manufacturers CPU's. export MCU # The MCU, set by the board's Makefile.include, or defaulted to the same value as CPU. export INCLUDES # The extra include paths, set by the various Makefile.include files. export CXXINCLUDES # The extra include paths for c++, set by the various Makefile.include files.