diff --git a/cpu/cc2538/Makefile.features b/cpu/cc2538/Makefile.features index 32c68f079c..69cede1a6b 100644 --- a/cpu/cc2538/Makefile.features +++ b/cpu/cc2538/Makefile.features @@ -1,3 +1,5 @@ +CPU_ARCH = cortex-m3 + FEATURES_PROVIDED += periph_cpuid FEATURES_PROVIDED += periph_gpio periph_gpio_irq FEATURES_PROVIDED += periph_hwrng diff --git a/cpu/cc2538/Makefile.include b/cpu/cc2538/Makefile.include index 1fe925bc54..ea1a0f256b 100644 --- a/cpu/cc2538/Makefile.include +++ b/cpu/cc2538/Makefile.include @@ -1,3 +1 @@ -CPU_ARCH = cortex-m3 - include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/cc26x0/Makefile.features b/cpu/cc26x0/Makefile.features index 34f3697b8d..ad7cec435c 100644 --- a/cpu/cc26x0/Makefile.features +++ b/cpu/cc26x0/Makefile.features @@ -1 +1,3 @@ +CPU_ARCH = cortex-m3 + -include $(RIOTCPU)/cc26xx_cc13xx/Makefile.features diff --git a/cpu/cc26x0/Makefile.include b/cpu/cc26x0/Makefile.include index 57e8be0e93..9e7ad2a34a 100644 --- a/cpu/cc26x0/Makefile.include +++ b/cpu/cc26x0/Makefile.include @@ -1,4 +1,3 @@ -CPU_ARCH = cortex-m3 CPU_VARIANT = x0 VECTORS_O = $(BINDIR)/cc26xx_cc13xx/vectors.o diff --git a/cpu/cc26x2_cc13x2/Makefile.features b/cpu/cc26x2_cc13x2/Makefile.features index 34f3697b8d..aadc616882 100644 --- a/cpu/cc26x2_cc13x2/Makefile.features +++ b/cpu/cc26x2_cc13x2/Makefile.features @@ -1 +1,3 @@ +CPU_ARCH = cortex-m4f + -include $(RIOTCPU)/cc26xx_cc13xx/Makefile.features diff --git a/cpu/cc26x2_cc13x2/Makefile.include b/cpu/cc26x2_cc13x2/Makefile.include index 0000d029ae..cbfec44aa3 100644 --- a/cpu/cc26x2_cc13x2/Makefile.include +++ b/cpu/cc26x2_cc13x2/Makefile.include @@ -1,4 +1,3 @@ -CPU_ARCH = cortex-m4f CPU_VARIANT = x2 VECTORS_O = $(BINDIR)/cc26xx_cc13xx/vectors.o diff --git a/cpu/ezr32wg/Makefile.features b/cpu/ezr32wg/Makefile.features index 8c82fc14b7..9dc1b14696 100644 --- a/cpu/ezr32wg/Makefile.features +++ b/cpu/ezr32wg/Makefile.features @@ -1,3 +1,5 @@ +CPU_ARCH = cortex-m4f + FEATURES_PROVIDED += periph_cpuid FEATURES_PROVIDED += periph_gpio periph_gpio_irq diff --git a/cpu/ezr32wg/Makefile.include b/cpu/ezr32wg/Makefile.include index 6fdedf4c05..ea1a0f256b 100644 --- a/cpu/ezr32wg/Makefile.include +++ b/cpu/ezr32wg/Makefile.include @@ -1,3 +1 @@ -CPU_ARCH = cortex-m4f - include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/lm4f120/Makefile.features b/cpu/lm4f120/Makefile.features index c3bedeeaa2..1a39817cab 100644 --- a/cpu/lm4f120/Makefile.features +++ b/cpu/lm4f120/Makefile.features @@ -1 +1,3 @@ +CPU_ARCH = cortex-m4f + -include $(RIOTCPU)/cortexm_common/Makefile.features diff --git a/cpu/lm4f120/Makefile.include b/cpu/lm4f120/Makefile.include index c7b25bb927..717f1ea64f 100644 --- a/cpu/lm4f120/Makefile.include +++ b/cpu/lm4f120/Makefile.include @@ -1,5 +1,3 @@ -CPU_ARCH = cortex-m4f - include $(RIOTMAKE)/arch/cortexm.inc.mk include $(RIOTCPU)/stellaris_common/Makefile.include diff --git a/cpu/lpc1768/Makefile.features b/cpu/lpc1768/Makefile.features index 1c25c072c7..3ca489e477 100644 --- a/cpu/lpc1768/Makefile.features +++ b/cpu/lpc1768/Makefile.features @@ -1,5 +1,7 @@ +CPU_ARCH = cortex-m3 # 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/cpu/lpc1768/Makefile.include b/cpu/lpc1768/Makefile.include index 1fe925bc54..ea1a0f256b 100644 --- a/cpu/lpc1768/Makefile.include +++ b/cpu/lpc1768/Makefile.include @@ -1,3 +1 @@ -CPU_ARCH = cortex-m3 - include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/nrf51/Makefile.features b/cpu/nrf51/Makefile.features index 7d12728b90..32e53e90ce 100644 --- a/cpu/nrf51/Makefile.features +++ b/cpu/nrf51/Makefile.features @@ -1 +1,4 @@ +CPU_ARCH = cortex-m0 +CPU_FAM = nrf51 + -include $(RIOTCPU)/nrf5x_common/Makefile.features diff --git a/cpu/nrf51/Makefile.include b/cpu/nrf51/Makefile.include index 065e1b5f3e..500a78244b 100644 --- a/cpu/nrf51/Makefile.include +++ b/cpu/nrf51/Makefile.include @@ -1,5 +1,2 @@ -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.features b/cpu/nrf52/Makefile.features index 19fd27cc26..a1fd08a7dd 100644 --- a/cpu/nrf52/Makefile.features +++ b/cpu/nrf52/Makefile.features @@ -1,3 +1,6 @@ +CPU_ARCH = cortex-m4f +CPU_FAM = nrf52 + # The ADC does not depend on any board configuration, so always available FEATURES_PROVIDED += periph_adc diff --git a/cpu/nrf52/Makefile.include b/cpu/nrf52/Makefile.include index c6a9ed6913..f22e1610c4 100644 --- a/cpu/nrf52/Makefile.include +++ b/cpu/nrf52/Makefile.include @@ -1,6 +1,3 @@ -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 # flash cannot be divided by two slots while staying FLASHPAGE_SIZE aligned. diff --git a/cpu/sam3/Makefile.features b/cpu/sam3/Makefile.features index 894817aedb..7b69420421 100644 --- a/cpu/sam3/Makefile.features +++ b/cpu/sam3/Makefile.features @@ -1,3 +1,6 @@ +CPU_ARCH = cortex-m3 +CPU_FAM = sam3 + FEATURES_PROVIDED += periph_cpuid FEATURES_PROVIDED += periph_hwrng diff --git a/cpu/sam3/Makefile.include b/cpu/sam3/Makefile.include index 6310a1e913..24f75984d7 100644 --- a/cpu/sam3/Makefile.include +++ b/cpu/sam3/Makefile.include @@ -1,5 +1,2 @@ -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.features b/cpu/samd21/Makefile.features index 4b58fe348b..e57847cd7e 100644 --- a/cpu/samd21/Makefile.features +++ b/cpu/samd21/Makefile.features @@ -1,3 +1,6 @@ +CPU_ARCH = cortex-m0plus +CPU_FAM = samd21 + FEATURES_PROVIDED += puf_sram -include $(RIOTCPU)/sam0_common/Makefile.features diff --git a/cpu/samd21/Makefile.include b/cpu/samd21/Makefile.include index c7ab2ab978..f36d960ae8 100644 --- a/cpu/samd21/Makefile.include +++ b/cpu/samd21/Makefile.include @@ -1,6 +1,3 @@ -CPU_ARCH = cortex-m0plus -CPU_FAM = samd21 - ifneq (,$(filter samd21%a,$(CPU_MODEL))) CFLAGS += -DCPU_SAMD21A endif diff --git a/cpu/samd5x/Makefile.features b/cpu/samd5x/Makefile.features index 7bd02ec90c..43c9adf808 100644 --- a/cpu/samd5x/Makefile.features +++ b/cpu/samd5x/Makefile.features @@ -1,3 +1,6 @@ +CPU_ARCH = cortex-m4f +CPU_FAM = samd5x + FEATURES_PROVIDED += periph_hwrng FEATURES_PROVIDED += backup_ram diff --git a/cpu/samd5x/Makefile.include b/cpu/samd5x/Makefile.include index e7778c35e4..ad3e8ae274 100644 --- a/cpu/samd5x/Makefile.include +++ b/cpu/samd5x/Makefile.include @@ -1,6 +1,3 @@ -CPU_ARCH = cortex-m4f -CPU_FAM = samd5x - ifneq (,$(filter samd51%,$(CPU_MODEL))) CFLAGS += -DCPU_SAMD51 endif diff --git a/cpu/saml1x/Makefile.features b/cpu/saml1x/Makefile.features index 42a90337c2..069dcd034f 100644 --- a/cpu/saml1x/Makefile.features +++ b/cpu/saml1x/Makefile.features @@ -1,3 +1,6 @@ +CPU_ARCH = cortex-m23 +CPU_FAM = saml1x + FEATURES_PROVIDED += periph_hwrng include $(RIOTCPU)/sam0_common/Makefile.features diff --git a/cpu/saml1x/Makefile.include b/cpu/saml1x/Makefile.include index 4067e6c0da..f15fbd7576 100644 --- a/cpu/saml1x/Makefile.include +++ b/cpu/saml1x/Makefile.include @@ -1,5 +1,3 @@ -CPU_ARCH = cortex-m23 - ifneq (,$(filter saml10%,$(CPU_MODEL))) CFLAGS += -DCPU_SAML10 endif diff --git a/cpu/saml21/Makefile.features b/cpu/saml21/Makefile.features index fb7676dda1..40e448fabc 100644 --- a/cpu/saml21/Makefile.features +++ b/cpu/saml21/Makefile.features @@ -1,3 +1,6 @@ +CPU_ARCH = cortex-m0plus +CPU_FAM = saml21 + # The SAMR30 line of MCUs does not contain a TRNG BOARDS_WITHOUT_HWRNG += samr30-xpro diff --git a/cpu/saml21/Makefile.include b/cpu/saml21/Makefile.include index d93cf4da43..f2fd7a0448 100644 --- a/cpu/saml21/Makefile.include +++ b/cpu/saml21/Makefile.include @@ -1,6 +1,3 @@ -CPU_ARCH = cortex-m0plus -CPU_FAM = saml21 - ifneq (,$(filter saml21%a,$(CPU_MODEL))) CFLAGS += -DCPU_SAML21A endif diff --git a/cpu/stm32f0/Makefile.features b/cpu/stm32f0/Makefile.features index d286ea06f2..02176d2887 100644 --- a/cpu/stm32f0/Makefile.features +++ b/cpu/stm32f0/Makefile.features @@ -1,3 +1,6 @@ +CPU_ARCH = cortex-m0 +CPU_FAM = stm32f0 + ifeq (,$(filter nucleo-f031k6,$(BOARD))) FEATURES_PROVIDED += periph_flashpage FEATURES_PROVIDED += periph_flashpage_raw diff --git a/cpu/stm32f0/Makefile.include b/cpu/stm32f0/Makefile.include index 5860ac1e33..ded533c199 100644 --- a/cpu/stm32f0/Makefile.include +++ b/cpu/stm32f0/Makefile.include @@ -1,5 +1,2 @@ -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.features b/cpu/stm32f1/Makefile.features index 20b5c5564d..d44ca1aa09 100644 --- a/cpu/stm32f1/Makefile.features +++ b/cpu/stm32f1/Makefile.features @@ -1,3 +1,6 @@ +CPU_ARCH = cortex-m3 +CPU_FAM = stm32f1 + FEATURES_PROVIDED += periph_flashpage FEATURES_PROVIDED += periph_flashpage_raw FEATURES_PROVIDED += periph_rtc diff --git a/cpu/stm32f1/Makefile.include b/cpu/stm32f1/Makefile.include index 572e7a6b58..ded533c199 100644 --- a/cpu/stm32f1/Makefile.include +++ b/cpu/stm32f1/Makefile.include @@ -1,5 +1,2 @@ -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.features b/cpu/stm32f2/Makefile.features index c51e0186eb..3f3eab0636 100644 --- a/cpu/stm32f2/Makefile.features +++ b/cpu/stm32f2/Makefile.features @@ -1,3 +1,6 @@ +CPU_ARCH = cortex-m3 +CPU_FAM = stm32f2 + FEATURES_PROVIDED += periph_hwrng -include $(RIOTCPU)/stm32_common/Makefile.features diff --git a/cpu/stm32f2/Makefile.include b/cpu/stm32f2/Makefile.include index b01f22ed62..fff391c06d 100644 --- a/cpu/stm32f2/Makefile.include +++ b/cpu/stm32f2/Makefile.include @@ -1,6 +1,3 @@ -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. RIOTBOOT_LEN ?= 0x4000 diff --git a/cpu/stm32f3/Makefile.features b/cpu/stm32f3/Makefile.features index 5e5e8b9118..a83d6a1e08 100644 --- a/cpu/stm32f3/Makefile.features +++ b/cpu/stm32f3/Makefile.features @@ -1,3 +1,6 @@ +CPU_ARCH = cortex-m4f +CPU_FAM = stm32f3 + FEATURES_PROVIDED += periph_flashpage FEATURES_PROVIDED += periph_flashpage_raw diff --git a/cpu/stm32f3/Makefile.include b/cpu/stm32f3/Makefile.include index e2648b9a5d..ded533c199 100644 --- a/cpu/stm32f3/Makefile.include +++ b/cpu/stm32f3/Makefile.include @@ -1,5 +1,2 @@ -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.features b/cpu/stm32f4/Makefile.features index f6818fb224..2cdb93058f 100644 --- a/cpu/stm32f4/Makefile.features +++ b/cpu/stm32f4/Makefile.features @@ -1,3 +1,6 @@ +CPU_ARCH = cortex-m4f +CPU_FAM = stm32f4 + FEATURES_PROVIDED += periph_hwrng # the granularity of provided feature definition for STMs is currently by CPU diff --git a/cpu/stm32f4/Makefile.include b/cpu/stm32f4/Makefile.include index 5258a494b8..3097e3fd4e 100644 --- a/cpu/stm32f4/Makefile.include +++ b/cpu/stm32f4/Makefile.include @@ -1,6 +1,3 @@ -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. RIOTBOOT_LEN ?= 0x4000 diff --git a/cpu/stm32f7/Makefile.features b/cpu/stm32f7/Makefile.features index 2d4e44ccb5..e1903cd920 100644 --- a/cpu/stm32f7/Makefile.features +++ b/cpu/stm32f7/Makefile.features @@ -1,2 +1,5 @@ +CPU_ARCH = cortex-m7 +CPU_FAM = stm32f7 + FEATURES_PROVIDED += periph_hwrng -include $(RIOTCPU)/stm32_common/Makefile.features diff --git a/cpu/stm32f7/Makefile.include b/cpu/stm32f7/Makefile.include index 4d0d5243a4..19b7c87936 100644 --- a/cpu/stm32f7/Makefile.include +++ b/cpu/stm32f7/Makefile.include @@ -1,6 +1,3 @@ -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 # be 16KB or 32kB to cover a whole sector. diff --git a/cpu/stm32l0/Makefile.features b/cpu/stm32l0/Makefile.features index d76642f390..dac7c11b39 100644 --- a/cpu/stm32l0/Makefile.features +++ b/cpu/stm32l0/Makefile.features @@ -1,3 +1,6 @@ +CPU_ARCH = cortex-m0plus +CPU_FAM = stm32l0 + FEATURES_PROVIDED += periph_eeprom FEATURES_PROVIDED += periph_flashpage FEATURES_PROVIDED += periph_flashpage_raw diff --git a/cpu/stm32l0/Makefile.include b/cpu/stm32l0/Makefile.include index 8e09dbaed2..ded533c199 100644 --- a/cpu/stm32l0/Makefile.include +++ b/cpu/stm32l0/Makefile.include @@ -1,5 +1,2 @@ -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.features b/cpu/stm32l1/Makefile.features index e13289086a..4e83fb8e1a 100644 --- a/cpu/stm32l1/Makefile.features +++ b/cpu/stm32l1/Makefile.features @@ -1,3 +1,6 @@ +CPU_ARCH = cortex-m3 +CPU_FAM = stm32l1 + FEATURES_PROVIDED += periph_eeprom FEATURES_PROVIDED += periph_flashpage FEATURES_PROVIDED += periph_flashpage_raw diff --git a/cpu/stm32l1/Makefile.include b/cpu/stm32l1/Makefile.include index 46bb58c516..ded533c199 100644 --- a/cpu/stm32l1/Makefile.include +++ b/cpu/stm32l1/Makefile.include @@ -1,5 +1,2 @@ -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.features b/cpu/stm32l4/Makefile.features index baed9e6078..b077625a3e 100644 --- a/cpu/stm32l4/Makefile.features +++ b/cpu/stm32l4/Makefile.features @@ -1,3 +1,6 @@ +CPU_ARCH = cortex-m4f +CPU_FAM = stm32l4 + FEATURES_PROVIDED += periph_flashpage FEATURES_PROVIDED += periph_flashpage_raw FEATURES_PROVIDED += periph_hwrng diff --git a/cpu/stm32l4/Makefile.include b/cpu/stm32l4/Makefile.include index 91eae9acdd..8a05ff0361 100644 --- a/cpu/stm32l4/Makefile.include +++ b/cpu/stm32l4/Makefile.include @@ -1,6 +1,3 @@ -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" # CPU_IRQ_NUMOFF for stm32l4 boards is < 91+16 so (107*4 bytes = 428 bytes ~= 0x200)