Commit 9a9ae6ff authored by Carles Cufi's avatar Carles Cufi Committed by Dan Kalowsky
Browse files

boards: nordic: Enable CONFIG_HW_STACK_PROTECTION conditionally



All Nordic boards were enabling CONFIG_HW_STACK_PROTECTION
unconditionally, which is usually not a problem except if the particular
application happens to want to disable the MPU (or equivalent hardware
for RISC-V). In that case, the following warning is shown:

warning: HW_STACK_PROTECTION (defined at arch/Kconfig) was assigned the
value 'y' but got the value 'n'.
Check these unsatisfied dependencies: ARCH_HAS_STACK_PROTECTION (=n).

In order to avoid this warning, conditionally enable the hardware stack
protection only when the architecture supports it.

Signed-off-by: default avatarCarles Cufi <carles.cufi@nordicsemi.no>
parent 1142c40c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -5,4 +5,7 @@

if BOARD_NRF21540DK

config HW_STACK_PROTECTION
	default ARCH_HAS_STACK_PROTECTION

endif # BOARD_NRF21540DK
+0 −3
Original line number Diff line number Diff line
@@ -3,9 +3,6 @@
# Enable MPU
CONFIG_ARM_MPU=y

# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y

# enable GPIO
CONFIG_GPIO=y

+3 −0
Original line number Diff line number Diff line
@@ -5,4 +5,7 @@

if BOARD_NRF52833DK

config HW_STACK_PROTECTION
	default ARCH_HAS_STACK_PROTECTION

endif # BOARD_NRF52833DK
+0 −3
Original line number Diff line number Diff line
@@ -3,9 +3,6 @@
# Enable MPU
CONFIG_ARM_MPU=y

# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y

# enable GPIO
CONFIG_GPIO=y

+0 −3
Original line number Diff line number Diff line
@@ -3,9 +3,6 @@
# Enable MPU
CONFIG_ARM_MPU=y

# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y

# enable GPIO
CONFIG_GPIO=y

Loading