boards: arm: twr_ke18f: only enable HW stack protection if !userspace

Only enable hardware stack protection by default on the NXP TWR-K18F
development board if userspace is not enabled.

The NXP KE1xF SoC has 8 MPU regions, which is insufficient for using HW
stack protection and userspace simultaneously.

Fixes bc9a498bdf.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
Henrik Brix Andersen 2021-01-07 13:02:12 +01:00 committed by Anas Nashif
commit 4b7a71962f
2 changed files with 5 additions and 1 deletions

View file

@ -22,4 +22,9 @@ config TEMP_KINETIS
default y if "$(dt_nodelabel_enabled,adc0)"
depends on SENSOR && ADC
# The KE1xF has 8 MPU regions, which is not enough for both HW stack protection
# and userspace. Only enable HW stack protection if userspace is not enabled.
config HW_STACK_PROTECTION
default y if !USERSPACE
endif # BOARD_TWR_KE18F

View file

@ -14,4 +14,3 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=120000000
# Enable MPU
CONFIG_ARM_MPU=y
CONFIG_HW_STACK_PROTECTION=y