diff --git a/boards/Kconfig b/boards/Kconfig index 6be3cf0f3b..2e9e73988b 100644 --- a/boards/Kconfig +++ b/boards/Kconfig @@ -4693,9 +4693,9 @@ source "boards/arm/nrf91/common/Kconfig" endif endif -config BOARD_CRASHDUMP - bool "Enable Board level logging of crash dumps" - default n +choice + prompt "BOARD crashdump method" + default BOARD_CRASHDUMP_NONE ---help--- If selected up_assert will call out to board_crashdump, in the case of an assertion failure, prior to calling exit. Or in the @@ -4712,28 +4712,31 @@ config BOARD_CRASHDUMP config BOARD_COREDUMP_SYSLOG bool "Enable Core dump to syslog" - default n depends on COREDUMP ---help--- Enable put coredump to syslog when crash. config BOARD_COREDUMP_BLKDEV bool "Enable Core Dump to block device" - default n depends on COREDUMP ---help--- - Enable save coredump at block device when crash. + Enable save coredump to block device when crash. -config BOARD_COREDUMP_BLKDEV_PATH - string "Save Core Dump block device PATH" +config BOARD_CRASHDUMP_NONE + bool "No Board level crash dump" + +endchoice # BOARD crashdump method + +config BOARD_COREDUMP_DEVPATH + string "Save Core Dump data with device PATH" depends on BOARD_COREDUMP_BLKDEV ---help--- - Save coredump file block device path. + Save coredump file into block device path. config BOARD_COREDUMP_FULL bool "Core Dump all thread registers and stacks" default y - depends on BOARD_COREDUMP_SYSLOG || BOARD_COREDUMP_BLKDEV + depends on !BOARD_CRASHDUMP_NONE ---help--- Enable to support for the dump all task registers and stacks. @@ -4741,7 +4744,7 @@ config BOARD_COREDUMP_COMPRESSION bool "Enable Core Dump compression" default y select LIBC_LZF - depends on BOARD_COREDUMP_SYSLOG || BOARD_COREDUMP_BLKDEV + depends on !BOARD_CRASHDUMP_NONE ---help--- Enable LZF compression algorithm for core dump content diff --git a/sched/init/nx_bringup.c b/sched/init/nx_bringup.c index 2ea82b920a..f9dbb69d35 100644 --- a/sched/init/nx_bringup.c +++ b/sched/init/nx_bringup.c @@ -322,8 +322,7 @@ static inline void nx_start_application(void) board_late_initialize(); #endif -#if defined(CONFIG_BOARD_COREDUMP_SYSLOG) || \ - defined(CONFIG_BOARD_COREDUMP_BLKDEV) +#ifndef CONFIG_BOARD_CRASHDUMP_NONE coredump_initialize(); #endif diff --git a/sched/misc/assert.c b/sched/misc/assert.c index f07bad20f0..28ff549697 100644 --- a/sched/misc/assert.c +++ b/sched/misc/assert.c @@ -769,9 +769,7 @@ static void dump_fatal_info(FAR struct tcb_s *rtcb, board_crashdump(up_getsp(), rtcb, filename, linenum, msg, regs); #endif -#if defined(CONFIG_BOARD_COREDUMP_SYSLOG) || \ - defined(CONFIG_BOARD_COREDUMP_BLKDEV) - +#ifndef CONFIG_BOARD_CRASHDUMP_NONE /* Flush previous SYSLOG data before possible long time coredump */ syslog_flush();