Skip to content

Commit 9a9ae6f

Browse files
carlescufidkalowsk
authored andcommitted
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: Carles Cufi <carles.cufi@nordicsemi.no>
1 parent 1142c40 commit 9a9ae6f

File tree

63 files changed

+73
-126
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+73
-126
lines changed

boards/nordic/nrf21540dk/Kconfig.defconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@
55

66
if BOARD_NRF21540DK
77

8+
config HW_STACK_PROTECTION
9+
default ARCH_HAS_STACK_PROTECTION
10+
811
endif # BOARD_NRF21540DK

boards/nordic/nrf21540dk/nrf21540dk_nrf52840_defconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
# Enable MPU
44
CONFIG_ARM_MPU=y
55

6-
# Enable hardware stack protection
7-
CONFIG_HW_STACK_PROTECTION=y
8-
96
# enable GPIO
107
CONFIG_GPIO=y
118

boards/nordic/nrf52833dk/Kconfig.defconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@
55

66
if BOARD_NRF52833DK
77

8+
config HW_STACK_PROTECTION
9+
default ARCH_HAS_STACK_PROTECTION
10+
811
endif # BOARD_NRF52833DK

boards/nordic/nrf52833dk/nrf52833dk_nrf52820_defconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
# Enable MPU
44
CONFIG_ARM_MPU=y
55

6-
# Enable hardware stack protection
7-
CONFIG_HW_STACK_PROTECTION=y
8-
96
# enable GPIO
107
CONFIG_GPIO=y
118

boards/nordic/nrf52833dk/nrf52833dk_nrf52833_defconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
# Enable MPU
44
CONFIG_ARM_MPU=y
55

6-
# Enable hardware stack protection
7-
CONFIG_HW_STACK_PROTECTION=y
8-
96
# enable GPIO
107
CONFIG_GPIO=y
118

boards/nordic/nrf52840dk/Kconfig.defconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@
55

66
if BOARD_NRF52840DK
77

8+
config HW_STACK_PROTECTION
9+
default ARCH_HAS_STACK_PROTECTION
10+
811
endif # BOARD_NRF52840DK

boards/nordic/nrf52840dk/nrf52840dk_nrf52811_defconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
# Enable MPU
66
CONFIG_ARM_MPU=y
77

8-
# Enable hardware stack protection
9-
CONFIG_HW_STACK_PROTECTION=y
10-
118
# Enable UART
129
CONFIG_SERIAL=y
1310

boards/nordic/nrf52840dk/nrf52840dk_nrf52840_defconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
# Enable MPU
44
CONFIG_ARM_MPU=y
55

6-
# Enable hardware stack protection
7-
CONFIG_HW_STACK_PROTECTION=y
8-
96
# enable GPIO
107
CONFIG_GPIO=y
118

boards/nordic/nrf52840dongle/Kconfig.defconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
if BOARD_NRF52840DONGLE
88

9+
config HW_STACK_PROTECTION
10+
default ARCH_HAS_STACK_PROTECTION
11+
912
# To let the nRF5 bootloader load an application, the application
1013
# must be linked after Nordic MBR, that is factory-programmed on the board.
1114

boards/nordic/nrf52840dongle/nrf52840dongle_nrf52840_defconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
# Enable MPU
44
CONFIG_ARM_MPU=y
55

6-
# Enable hardware stack protection
7-
CONFIG_HW_STACK_PROTECTION=y
8-
96
# enable GPIO
107
CONFIG_GPIO=y
118

0 commit comments

Comments
 (0)