Skip to content

Commit

Permalink
board: arm: Enable MPU for all STM32 boards supporting it
Browse files Browse the repository at this point in the history
Only boards with at least 64K Flash will activate MPU because:
MPU + UERSPACE + All switches implicity activated
(CONFIG_MPU_STACK_GUARD, CONFIG_ARM_STACK_PROTECTION ...)
will consume about 40K Flash
(value computed on nucleo_f767_zi on tests/arch/arm/arm_ramfunc/).

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
  • Loading branch information
ABOSTM authored and galak committed Jun 19, 2020
1 parent 76f0d72 commit 6f55614
Show file tree
Hide file tree
Showing 29 changed files with 83 additions and 0 deletions.
3 changes: 3 additions & 0 deletions boards/arm/96b_argonkey/96b_argonkey_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ CONFIG_SOC_STM32F412CG=y
# 84MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=84000000

# Enable MPU
CONFIG_ARM_MPU=y

# enable uart driver
CONFIG_SERIAL=y

Expand Down
3 changes: 3 additions & 0 deletions boards/arm/96b_avenger96/96b_avenger96_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ CONFIG_SOC_STM32MP15_M4=y
# 209 MHz system clock (mlhclk_ck)
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=209000000

# Enable MPU
CONFIG_ARM_MPU=y

# enable GPIO
CONFIG_GPIO=y

Expand Down
3 changes: 3 additions & 0 deletions boards/arm/96b_neonkey/96b_neonkey_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ CONFIG_SOC_STM32F411XE=y
# 84MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=84000000

# Enable MPU
CONFIG_ARM_MPU=y

# enable uart driver
CONFIG_SERIAL=y

Expand Down
3 changes: 3 additions & 0 deletions boards/arm/96b_wistrio/96b_wistrio_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ CONFIG_SOC_STM32L151XBA=y
# 32MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=32000000

# Enable MPU
CONFIG_ARM_MPU=y

# enable uart driver
CONFIG_SERIAL=y

Expand Down
3 changes: 3 additions & 0 deletions boards/arm/b_l072z_lrwan1/b_l072z_lrwan1_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ CONFIG_BOARD_B_L072Z_LRWAN1=y
# General Kernel Options
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=32000000

# Enable MPU
CONFIG_ARM_MPU=y

# Clock configuration
CONFIG_CLOCK_CONTROL=y
# SYSCLK selection
Expand Down
3 changes: 3 additions & 0 deletions boards/arm/nucleo_f207zg/nucleo_f207zg_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=120000000

CONFIG_SERIAL=y

# Enable MPU
CONFIG_ARM_MPU=y

# console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
Expand Down
3 changes: 3 additions & 0 deletions boards/arm/nucleo_f303re/nucleo_f303re_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000

CONFIG_SERIAL=y

# Enable MPU
CONFIG_ARM_MPU=y

# console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
Expand Down
3 changes: 3 additions & 0 deletions boards/arm/nucleo_l053r8/nucleo_l053r8_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ CONFIG_SOC_STM32L053XX=y
# General Kernel Options
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=32000000

# Enable MPU
CONFIG_ARM_MPU=y

# Kernel Options due to Low Memory (8k)
CONFIG_MAIN_STACK_SIZE=640
CONFIG_IDLE_STACK_SIZE=200
Expand Down
3 changes: 3 additions & 0 deletions boards/arm/nucleo_l073rz/nucleo_l073rz_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ CONFIG_SOC_STM32L073XX=y
# General Kernel Options
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=32000000

# Enable MPU
CONFIG_ARM_MPU=y

# Serial Drivers
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
Expand Down
3 changes: 3 additions & 0 deletions boards/arm/nucleo_l152re/nucleo_l152re_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ CONFIG_CORTEX_M_SYSTICK=y
# 32MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=32000000

# Enable MPU
CONFIG_ARM_MPU=y

# enable uart driver
CONFIG_SERIAL=y
# enable console
Expand Down
3 changes: 3 additions & 0 deletions boards/arm/nucleo_l432kc/nucleo_l432kc_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ CONFIG_SOC_STM32L432XX=y
# 80MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=80000000

# Enable MPU
CONFIG_ARM_MPU=y

# enable uart driver
CONFIG_SERIAL=y

Expand Down
3 changes: 3 additions & 0 deletions boards/arm/nucleo_l452re/nucleo_l452re_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=80000000
# enable uart driver
CONFIG_SERIAL=y

# Enable MPU
CONFIG_ARM_MPU=y

# enable pinmux
CONFIG_PINMUX=y

Expand Down
3 changes: 3 additions & 0 deletions boards/arm/olimexino_stm32/olimexino_stm32_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ CONFIG_SOC_STM32F103XB=y
# 72MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000

# Enable MPU
CONFIG_ARM_MPU=y

# enable uart driver
CONFIG_SERIAL=y

Expand Down
3 changes: 3 additions & 0 deletions boards/arm/stm32373c_eval/stm32373c_eval_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ CONFIG_SOC_STM32F373XC=y
# Floating Point Options
CONFIG_FPU=y

# Enable MPU
CONFIG_ARM_MPU=y

# General Kernel Options
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000

Expand Down
3 changes: 3 additions & 0 deletions boards/arm/stm32_min_dev/stm32_min_dev_black_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ CONFIG_SOC_STM32F103X8=y
# 72MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000

# Enable MPU
CONFIG_ARM_MPU=y

# enable uart driver
CONFIG_SERIAL=y

Expand Down
3 changes: 3 additions & 0 deletions boards/arm/stm32_min_dev/stm32_min_dev_blue_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ CONFIG_SOC_STM32F103X8=y
# 72MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000

# Enable MPU
CONFIG_ARM_MPU=y

# enable uart driver
CONFIG_SERIAL=y

Expand Down
3 changes: 3 additions & 0 deletions boards/arm/stm32f3_disco/stm32f3_disco_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000
# Floating Point Options
CONFIG_FPU=y

# Enable MPU
CONFIG_ARM_MPU=y

# enable uart driver
CONFIG_SERIAL=y

Expand Down
3 changes: 3 additions & 0 deletions boards/arm/stm32f723e_disco/stm32f723e_disco_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ CONFIG_SOC_STM32F723XX=y
# 216MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=216000000

# Enable MPU
CONFIG_ARM_MPU=y

CONFIG_SERIAL=y

# console
Expand Down
3 changes: 3 additions & 0 deletions boards/arm/stm32f746g_disco/stm32f746g_disco_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ CONFIG_SOC_STM32F746XX=y
# 216MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=216000000

# Enable MPU
CONFIG_ARM_MPU=y

CONFIG_SERIAL=y

# console
Expand Down
3 changes: 3 additions & 0 deletions boards/arm/stm32f769i_disco/stm32f769i_disco_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ CONFIG_SOC_STM32F769XX=y
# 216MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=216000000

# Enable MPU
CONFIG_ARM_MPU=y

CONFIG_SERIAL=y

# console
Expand Down
3 changes: 3 additions & 0 deletions boards/arm/stm32h747i_disco/stm32h747i_disco_m4_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ CONFIG_GPIO=y
# clock configuration
CONFIG_CLOCK_CONTROL=y

# Enable MPU
CONFIG_ARM_MPU=y

# By default SERIAL peripherals are assigned to m7

# enable uart driver
Expand Down
3 changes: 3 additions & 0 deletions boards/arm/stm32h747i_disco/stm32h747i_disco_m7_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ CONFIG_CLOCK_STM32_PLL_P_DIVISOR=2
CONFIG_CLOCK_STM32_PLL_Q_DIVISOR=4
CONFIG_CLOCK_STM32_PLL_R_DIVISOR=2

# Enable MPU
CONFIG_ARM_MPU=y

# Disable following to assign serial ports to m4 core

# enable uart driver
Expand Down
3 changes: 3 additions & 0 deletions boards/arm/stm32l476g_disco/stm32l476g_disco_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ CONFIG_SOC_STM32L476XX=y
# 80MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=80000000

# Enable MPU
CONFIG_ARM_MPU=y

# enable uart driver
CONFIG_SERIAL=y

Expand Down
3 changes: 3 additions & 0 deletions boards/arm/stm32l496g_disco/stm32l496g_disco_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ CONFIG_SOC_STM32L496XX=y
# 80MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=80000000

# Enable MPU
CONFIG_ARM_MPU=y

# enable uart driver
CONFIG_SERIAL=y

Expand Down
3 changes: 3 additions & 0 deletions boards/arm/stm32mp157c_dk2/stm32mp157c_dk2_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=209000000
# enable GPIO
CONFIG_GPIO=y

# Enable MPU
CONFIG_ARM_MPU=y

# enable uart driver
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
Expand Down
3 changes: 3 additions & 0 deletions boards/arm/stm32vl_disco/stm32vl_disco_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ CONFIG_SOC_STM32F100XB=y
# 24MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=24000000

# Enable MPU
CONFIG_ARM_MPU=y

# enable uart driver
CONFIG_SERIAL=y

Expand Down
1 change: 1 addition & 0 deletions soc/arm/st_stm32/stm32f2/Kconfig.series
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ config SOC_SERIES_STM32F2X
select SOC_FAMILY_STM32
select HAS_STM32CUBE
select HAS_SWO
select CPU_HAS_ARM_MPU
help
Enable support for stm32f2 MCU series
3 changes: 3 additions & 0 deletions soc/arm/st_stm32/stm32l0/Kconfig.soc
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ config SOC_STM32L011XX

config SOC_STM32L053XX
bool "STM32L053XX"
select CPU_HAS_ARM_MPU

config SOC_STM32L072XX
bool "STM32L072XX"
select CPU_HAS_ARM_MPU

config SOC_STM32L073XX
bool "STM32L073XX"
select CPU_HAS_ARM_MPU

endchoice
1 change: 1 addition & 0 deletions soc/arm/st_stm32/stm32l1/Kconfig.series
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ config SOC_SERIES_STM32L1X
select SOC_FAMILY_STM32
select HAS_STM32CUBE
select HAS_SWO
select CPU_HAS_ARM_MPU
help
Enable support for STM32L1 MCU series

0 comments on commit 6f55614

Please sign in to comment.