diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 2a7ea10b59..02a8719943 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -4,6 +4,8 @@ # if ARCH_ARM +comment "ARM Options" + choice prompt "ARM chip selection" default ARCH_CHIP_STM32 @@ -239,6 +241,15 @@ config ARCH_CALIBRATION watch to measure the 100 second delay then adjust BOARD_LOOPSPERMSEC until the delay actually is 100 seconds. +config DEBUG_HARDFAULT + bool "Verbose Hard-Fault Debug" + default n + depends on DEBUG && (ARCH_CORTEXM3 || ARCH_CORTEXM4) + ---help--- + Enables verbose debug output when a hard fault is occurs. This verbose + output is sometimes helpful when debugging difficult hard fault problems, + but may be more than you typcially want to see. + if ARCH_CHIP_C5471 source arch/arm/src/c5471/Kconfig endif diff --git a/arch/arm/src/armv7-m/up_hardfault.c b/arch/arm/src/armv7-m/up_hardfault.c index cb3ce9e8a9..c30015ad22 100644 --- a/arch/arm/src/armv7-m/up_hardfault.c +++ b/arch/arm/src/armv7-m/up_hardfault.c @@ -57,9 +57,7 @@ /* Debug output from this file may interfere with context switching! */ -#undef DEBUG_HARDFAULTS /* Define to debug hard faults */ - -#ifdef DEBUG_HARDFAULTS +#ifdef CONFIG_DEBUG_HARDFAULT # define hfdbg(format, arg...) lldbg(format, ##arg) #else # define hfdbg(x...)