coredump: add BOARD_CRASHDUMP_CUSTOM support
For only board specific crashdump and no syslog/blk/mtd coredump Signed-off-by: buxiasen <buxiasen@xiaomi.com>
This commit is contained in:
parent
ddf428d66c
commit
7a4fac0df6
4 changed files with 15 additions and 10 deletions
|
@ -149,7 +149,7 @@ config RX65N_CMT0
|
|||
config RX65N_CMT1
|
||||
bool "CMT1"
|
||||
default n
|
||||
depends on BOARD_CRASHDUMP && RX65N_SBRAM && RX65N_SAVE_CRASHDUMP
|
||||
depends on BOARD_CRASHDUMP_CUSTOM && RX65N_SBRAM && RX65N_SAVE_CRASHDUMP
|
||||
|
||||
config RX65N_CMT2
|
||||
bool "CMT2"
|
||||
|
@ -170,7 +170,7 @@ config RX65N_IRQ_GROUP
|
|||
config RX65N_SBRAM
|
||||
bool "SBRAM"
|
||||
default n
|
||||
depends on BOARD_CRASHDUMP
|
||||
depends on BOARD_CRASHDUMP_CUSTOM
|
||||
|
||||
config RX65N_SAVE_CRASHDUMP
|
||||
bool "SBRAM Save Crashdump"
|
||||
|
@ -541,7 +541,7 @@ config RX65N_CMT0
|
|||
config RX65N_CMT1
|
||||
bool "CMT1"
|
||||
default n
|
||||
depends on BOARD_CRASHDUMP && RX65N_SBRAM && RX65N_SAVE_CRASHDUMP
|
||||
depends on BOARD_CRASHDUMP_CUSTOM && RX65N_SBRAM && RX65N_SAVE_CRASHDUMP
|
||||
|
||||
config RX65N_CMT2
|
||||
bool "CMT2"
|
||||
|
@ -562,7 +562,7 @@ config RX65N_IRQ_GROUP
|
|||
config RX65N_SBRAM
|
||||
bool "SBRAM"
|
||||
default n
|
||||
depends on BOARD_CRASHDUMP
|
||||
depends on BOARD_CRASHDUMP_CUSTOM
|
||||
|
||||
config RX65N_SAVE_CRASHDUMP
|
||||
bool "SBRAM Save Crashdump"
|
||||
|
|
|
@ -4728,6 +4728,12 @@ config BOARD_COREDUMP_MTDDEV
|
|||
---help---
|
||||
Enable save coredump to mtd device when crash.
|
||||
|
||||
config BOARD_CRASHDUMP_CUSTOM
|
||||
bool "Enable Core Dump with custom method"
|
||||
---help---
|
||||
Enable save coredump with custom method. only work with
|
||||
board_crashdump api.
|
||||
|
||||
config BOARD_CRASHDUMP_NONE
|
||||
bool "No Board level crash dump"
|
||||
|
||||
|
|
|
@ -820,7 +820,7 @@ int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg);
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_BOARD_CRASHDUMP
|
||||
#ifdef CONFIG_BOARD_CRASHDUMP_CUSTOM
|
||||
struct tcb_s;
|
||||
void board_crashdump(uintptr_t sp, FAR struct tcb_s *tcb,
|
||||
FAR const char *filename, int lineno,
|
||||
|
|
|
@ -765,15 +765,14 @@ static void dump_fatal_info(FAR struct tcb_s *rtcb,
|
|||
usbtrace_enumerate(assert_tracecallback, NULL);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BOARD_CRASHDUMP
|
||||
board_crashdump(up_getsp(), rtcb, filename, linenum, msg, regs);
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_BOARD_CRASHDUMP_NONE
|
||||
/* Flush previous SYSLOG data before possible long time coredump */
|
||||
|
||||
syslog_flush();
|
||||
|
||||
#ifdef CONFIG_BOARD_CRASHDUMP_CUSTOM
|
||||
board_crashdump(up_getsp(), rtcb, filename, linenum, msg, regs);
|
||||
#elif !defined(CONFIG_BOARD_CRASHDUMP_NONE)
|
||||
|
||||
/* Dump core information */
|
||||
|
||||
# ifdef CONFIG_BOARD_COREDUMP_FULL
|
||||
|
|
Loading…
Reference in a new issue