Skip to content

Commit 4b7a719

Browse files
henrikbrixandersennashif
authored andcommitted
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 bc9a498. Signed-off-by: Henrik Brix Andersen <[email protected]>
1 parent d661eb7 commit 4b7a719

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

boards/arm/twr_ke18f/Kconfig.defconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,9 @@ config TEMP_KINETIS
2222
default y if "$(dt_nodelabel_enabled,adc0)"
2323
depends on SENSOR && ADC
2424

25+
# The KE1xF has 8 MPU regions, which is not enough for both HW stack protection
26+
# and userspace. Only enable HW stack protection if userspace is not enabled.
27+
config HW_STACK_PROTECTION
28+
default y if !USERSPACE
29+
2530
endif # BOARD_TWR_KE18F

boards/arm/twr_ke18f/twr_ke18f_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=120000000
1414

1515
# Enable MPU
1616
CONFIG_ARM_MPU=y
17-
CONFIG_HW_STACK_PROTECTION=y

0 commit comments

Comments
 (0)