diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index b6ccafafd6..dc32729a87 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -164,6 +164,7 @@ config ARCH_CHIP_SAM34 select ARCH_HAVE_CMNVECTOR select ARCH_HAVE_MPU select ARCH_HAVE_RAMFUNCS + select ARMV7M_HAVE_STACKCHECK ---help--- Atmel SAM3 (ARM Cortex-M3) and SAM4 (ARM Cortex-M4) architectures @@ -174,6 +175,7 @@ config ARCH_CHIP_SAMV7 select ARCH_CORTEXM7 select ARCH_HAVE_MPU select ARCH_HAVE_RAMFUNCS + select ARMV7M_HAVE_STACKCHECK ---help--- Atmel SAMV7 (ARM Cortex-M7) architectures @@ -183,6 +185,7 @@ config ARCH_CHIP_STM32 select ARCH_HAVE_MPU select ARCH_HAVE_I2CRESET select ARCH_HAVE_HEAPCHECK + select ARMV7M_HAVE_STACKCHECK ---help--- STMicro STM32 architectures (ARM Cortex-M3/4). diff --git a/arch/arm/src/armv7-m/Kconfig b/arch/arm/src/armv7-m/Kconfig index a9274b28d0..750229be19 100644 --- a/arch/arm/src/armv7-m/Kconfig +++ b/arch/arm/src/armv7-m/Kconfig @@ -106,10 +106,14 @@ config ARMV7M_OABI_TOOLCHAIN Most of the older buildroot toolchains are OABI and are named arm-nuttx-elf- vs. arm-nuttx-eabi- +config ARMV7M_HAVE_STACKCHECK + bool + default n + config ARMV7M_STACKCHECK bool "Check for stack overflow on each function call" default n - depends on ARCH_CHIP_STM32 + depends on ARMV7M_HAVE_STACKCHECK ---help--- This check uses R10 to check for a stack overflow within each function call. This has performances and code size impacts, but it will be able to