arm: soc: stm32: make mpu f4 config useable for other family

As other stm32 series support MPU, move common file in a file tree
useable by socs from other series

JIRA: ZEP-2220

Signed-off-by: Michel Jaouen <michel.jaouen@st.com>
This commit is contained in:
Michel Jaouen 2017-06-09 17:18:09 +02:00 committed by Kumar Gala
commit 1dadfaa3b4
7 changed files with 10 additions and 8 deletions

View file

@ -1,2 +1,3 @@
obj-y += $(SOC_SERIES)/ obj-y += $(SOC_SERIES)/
obj-y += common/

View file

@ -16,4 +16,12 @@ config SOC_FAMILY
default st_stm32 default st_stm32
endif endif
config STM32_ARM_MPU_ENABLE
bool "Enable MPU"
depends on CPU_HAS_MPU
select ARM_MPU
default n
help
Enable MPU
source "arch/arm/soc/st_stm32/*/Kconfig.soc" source "arch/arm/soc/st_stm32/*/Kconfig.soc"

View file

@ -0,0 +1 @@
obj-$(CONFIG_STM32_ARM_MPU_ENABLE) += arm_mpu_regions.o

View file

@ -32,13 +32,6 @@ config SOC_STM32F469XI
endchoice endchoice
config STM32_ARM_MPU_ENABLE
bool "Enable MPU"
depends on CPU_HAS_MPU
select ARM_MPU
default n
help
Enable MPU
choice choice
prompt "Configure Bootloader Options" prompt "Configure Bootloader Options"

View file

@ -2,7 +2,6 @@ obj-y += soc.o
obj-$(CONFIG_GPIO) += soc_gpio.o obj-$(CONFIG_GPIO) += soc_gpio.o
obj-$(CONFIG_PINMUX) += soc_pinmux.o obj-$(CONFIG_PINMUX) += soc_pinmux.o
obj-$(CONFIG_STM32_ARM_MPU_ENABLE) += arm_mpu_regions.o
zephyr: $(KERNEL_HEX_NAME) zephyr: $(KERNEL_HEX_NAME)
all: $(KERNEL_HEX_NAME) all: $(KERNEL_HEX_NAME)