From a3c527fdbc7ddffb3535fe94cb8e1d15aa04af77 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Mon, 2 Mar 2020 15:01:22 +0100 Subject: [PATCH] cpu/*: add cortex_mpu to known-to-support CPU families --- cpu/cc2538/Makefile.features | 2 ++ cpu/cc26x0/Makefile.features | 2 ++ cpu/cc26x2_cc13x2/Makefile.features | 2 ++ cpu/cortexm_common/Makefile.features | 4 ---- cpu/efm32/Makefile.features | 1 + cpu/ezr32wg/Makefile.features | 1 + cpu/lm4f120/Makefile.features | 2 ++ cpu/lpc1768/Makefile.features | 1 + cpu/nrf52/Makefile.features | 3 +++ cpu/sam3/Makefile.features | 1 + cpu/samd5x/Makefile.features | 1 + cpu/saml1x/Makefile.features | 1 + cpu/stm32f2/Makefile.features | 1 + cpu/stm32f3/Makefile.features | 6 ++++++ cpu/stm32f4/Makefile.features | 1 + cpu/stm32f7/Makefile.features | 1 + cpu/stm32l0/Makefile.features | 6 ++++++ cpu/stm32l1/Makefile.features | 1 + cpu/stm32l4/Makefile.features | 1 + 19 files changed, 34 insertions(+), 4 deletions(-) diff --git a/cpu/cc2538/Makefile.features b/cpu/cc2538/Makefile.features index 69cede1a6b..10c9ca7571 100644 --- a/cpu/cc2538/Makefile.features +++ b/cpu/cc2538/Makefile.features @@ -4,6 +4,8 @@ FEATURES_PROVIDED += periph_cpuid FEATURES_PROVIDED += periph_gpio periph_gpio_irq FEATURES_PROVIDED += periph_hwrng FEATURES_PROVIDED += periph_uart_modecfg + +FEATURES_PROVIDED += cortexm_mpu FEATURES_PROVIDED += puf_sram -include $(RIOTCPU)/cortexm_common/Makefile.features diff --git a/cpu/cc26x0/Makefile.features b/cpu/cc26x0/Makefile.features index ad7cec435c..d2a863032e 100644 --- a/cpu/cc26x0/Makefile.features +++ b/cpu/cc26x0/Makefile.features @@ -1,3 +1,5 @@ CPU_ARCH = cortex-m3 +FEATURES_PROVIDED += cortexm_mpu + -include $(RIOTCPU)/cc26xx_cc13xx/Makefile.features diff --git a/cpu/cc26x2_cc13x2/Makefile.features b/cpu/cc26x2_cc13x2/Makefile.features index aadc616882..1f6134e83d 100644 --- a/cpu/cc26x2_cc13x2/Makefile.features +++ b/cpu/cc26x2_cc13x2/Makefile.features @@ -1,3 +1,5 @@ CPU_ARCH = cortex-m4f +FEATURES_PROVIDED += cortexm_mpu + -include $(RIOTCPU)/cc26xx_cc13xx/Makefile.features diff --git a/cpu/cortexm_common/Makefile.features b/cpu/cortexm_common/Makefile.features index cc8e19a158..74b9888ac1 100644 --- a/cpu/cortexm_common/Makefile.features +++ b/cpu/cortexm_common/Makefile.features @@ -5,7 +5,3 @@ FEATURES_PROVIDED += periph_pm FEATURES_PROVIDED += cpp FEATURES_PROVIDED += cpu_check_address FEATURES_PROVIDED += ssp - -ifneq ($(CPU_ARCH),cortex-m0) - FEATURES_PROVIDED += cortexm_mpu -endif diff --git a/cpu/efm32/Makefile.features b/cpu/efm32/Makefile.features index 88e91a46b6..ac11c70577 100644 --- a/cpu/efm32/Makefile.features +++ b/cpu/efm32/Makefile.features @@ -4,6 +4,7 @@ include $(RIOTCPU)/efm32/efm32-features.mk CPU_ARCH = $(EFM32_ARCHITECTURE) FEATURES_PROVIDED += arch_efm32 +FEATURES_PROVIDED += cortexm_mpu FEATURES_PROVIDED += periph_cpuid FEATURES_PROVIDED += periph_flashpage FEATURES_PROVIDED += periph_flashpage_raw diff --git a/cpu/ezr32wg/Makefile.features b/cpu/ezr32wg/Makefile.features index 9dc1b14696..343e1f208d 100644 --- a/cpu/ezr32wg/Makefile.features +++ b/cpu/ezr32wg/Makefile.features @@ -1,5 +1,6 @@ CPU_ARCH = cortex-m4f +FEATURES_PROVIDED += cortexm_mpu FEATURES_PROVIDED += periph_cpuid FEATURES_PROVIDED += periph_gpio periph_gpio_irq diff --git a/cpu/lm4f120/Makefile.features b/cpu/lm4f120/Makefile.features index 1a39817cab..15ef943f2c 100644 --- a/cpu/lm4f120/Makefile.features +++ b/cpu/lm4f120/Makefile.features @@ -1,3 +1,5 @@ CPU_ARCH = cortex-m4f +FEATURES_PROVIDED += cortexm_mpu + -include $(RIOTCPU)/cortexm_common/Makefile.features diff --git a/cpu/lpc1768/Makefile.features b/cpu/lpc1768/Makefile.features index 3ca489e477..738302a045 100644 --- a/cpu/lpc1768/Makefile.features +++ b/cpu/lpc1768/Makefile.features @@ -2,6 +2,7 @@ CPU_ARCH = cortex-m3 # This CPU only implements one CPU_MODEL with the same name CPU_MODEL = lpc1768 +FEATURES_PROVIDED += cortexm_mpu FEATURES_PROVIDED += periph_cpuid FEATURES_PROVIDED += periph_pm diff --git a/cpu/nrf52/Makefile.features b/cpu/nrf52/Makefile.features index a1fd08a7dd..e429f3cbe9 100644 --- a/cpu/nrf52/Makefile.features +++ b/cpu/nrf52/Makefile.features @@ -8,4 +8,7 @@ FEATURES_PROVIDED += periph_adc # feature to mark this FEATURES_PROVIDED += ble_nimble_netif +# all nrf52 have an MPU +FEATURES_PROVIDED += cortexm_mpu + -include $(RIOTCPU)/nrf5x_common/Makefile.features diff --git a/cpu/sam3/Makefile.features b/cpu/sam3/Makefile.features index 7b69420421..642671c077 100644 --- a/cpu/sam3/Makefile.features +++ b/cpu/sam3/Makefile.features @@ -1,6 +1,7 @@ CPU_ARCH = cortex-m3 CPU_FAM = sam3 +FEATURES_PROVIDED += cortexm_mpu FEATURES_PROVIDED += periph_cpuid FEATURES_PROVIDED += periph_hwrng diff --git a/cpu/samd5x/Makefile.features b/cpu/samd5x/Makefile.features index 43c9adf808..de7c61abc3 100644 --- a/cpu/samd5x/Makefile.features +++ b/cpu/samd5x/Makefile.features @@ -3,5 +3,6 @@ CPU_FAM = samd5x FEATURES_PROVIDED += periph_hwrng FEATURES_PROVIDED += backup_ram +FEATURES_PROVIDED += cortexm_mpu include $(RIOTCPU)/sam0_common/Makefile.features diff --git a/cpu/saml1x/Makefile.features b/cpu/saml1x/Makefile.features index 069dcd034f..33527b32db 100644 --- a/cpu/saml1x/Makefile.features +++ b/cpu/saml1x/Makefile.features @@ -1,6 +1,7 @@ CPU_ARCH = cortex-m23 CPU_FAM = saml1x +FEATURES_PROVIDED += cortexm_mpu FEATURES_PROVIDED += periph_hwrng include $(RIOTCPU)/sam0_common/Makefile.features diff --git a/cpu/stm32f2/Makefile.features b/cpu/stm32f2/Makefile.features index 3f3eab0636..0e2abb4aea 100644 --- a/cpu/stm32f2/Makefile.features +++ b/cpu/stm32f2/Makefile.features @@ -2,5 +2,6 @@ CPU_ARCH = cortex-m3 CPU_FAM = stm32f2 FEATURES_PROVIDED += periph_hwrng +FEATURES_PROVIDED += cortexm_mpu -include $(RIOTCPU)/stm32_common/Makefile.features diff --git a/cpu/stm32f3/Makefile.features b/cpu/stm32f3/Makefile.features index a83d6a1e08..b5704d6c02 100644 --- a/cpu/stm32f3/Makefile.features +++ b/cpu/stm32f3/Makefile.features @@ -4,4 +4,10 @@ CPU_FAM = stm32f3 FEATURES_PROVIDED += periph_flashpage FEATURES_PROVIDED += periph_flashpage_raw +# only some stm32f3 have an MPU +STM32F3_WITH_MPU += stm32f303re stm32f303vc stm32f303ze +ifneq (, $(filter $(CPU_MODEL), $(STM32F3_WITH_MPU))) + FEATURES_PROVIDED += cortexm_mpu +endif + -include $(RIOTCPU)/stm32_common/Makefile.features diff --git a/cpu/stm32f4/Makefile.features b/cpu/stm32f4/Makefile.features index 2cdb93058f..1ba7af83cc 100644 --- a/cpu/stm32f4/Makefile.features +++ b/cpu/stm32f4/Makefile.features @@ -1,6 +1,7 @@ CPU_ARCH = cortex-m4f CPU_FAM = stm32f4 +FEATURES_PROVIDED += cortexm_mpu FEATURES_PROVIDED += periph_hwrng # the granularity of provided feature definition for STMs is currently by CPU diff --git a/cpu/stm32f7/Makefile.features b/cpu/stm32f7/Makefile.features index e1903cd920..455c644c2e 100644 --- a/cpu/stm32f7/Makefile.features +++ b/cpu/stm32f7/Makefile.features @@ -1,5 +1,6 @@ CPU_ARCH = cortex-m7 CPU_FAM = stm32f7 +FEATURES_PROVIDED += cortexm_mpu FEATURES_PROVIDED += periph_hwrng -include $(RIOTCPU)/stm32_common/Makefile.features diff --git a/cpu/stm32l0/Makefile.features b/cpu/stm32l0/Makefile.features index dac7c11b39..5691c37cf4 100644 --- a/cpu/stm32l0/Makefile.features +++ b/cpu/stm32l0/Makefile.features @@ -8,4 +8,10 @@ FEATURES_PROVIDED += periph_hwrng BOARDS_WITHOUT_HWRNG += nucleo-l031k6 +# only some stm32l0 have an MPU +STM32L0_WITH_MPU += stm32l052t8 +ifneq (, $(filter $(CPU_MODEL), $(STM32L0_WITH_MPU))) + FEATURES_PROVIDED += cortexm_mpu +endif + -include $(RIOTCPU)/stm32_common/Makefile.features diff --git a/cpu/stm32l1/Makefile.features b/cpu/stm32l1/Makefile.features index 4e83fb8e1a..010619595f 100644 --- a/cpu/stm32l1/Makefile.features +++ b/cpu/stm32l1/Makefile.features @@ -1,6 +1,7 @@ CPU_ARCH = cortex-m3 CPU_FAM = stm32l1 +FEATURES_PROVIDED += cortexm_mpu FEATURES_PROVIDED += periph_eeprom FEATURES_PROVIDED += periph_flashpage FEATURES_PROVIDED += periph_flashpage_raw diff --git a/cpu/stm32l4/Makefile.features b/cpu/stm32l4/Makefile.features index b077625a3e..8f438a44c6 100644 --- a/cpu/stm32l4/Makefile.features +++ b/cpu/stm32l4/Makefile.features @@ -1,6 +1,7 @@ CPU_ARCH = cortex-m4f CPU_FAM = stm32l4 +FEATURES_PROVIDED += cortexm_mpu FEATURES_PROVIDED += periph_flashpage FEATURES_PROVIDED += periph_flashpage_raw FEATURES_PROVIDED += periph_hwrng