diff --git a/nuttx-configs/aerofc-v1/nsh/defconfig b/nuttx-configs/aerofc-v1/nsh/defconfig index f88a996b02..38b10fdcaa 100644 --- a/nuttx-configs/aerofc-v1/nsh/defconfig +++ b/nuttx-configs/aerofc-v1/nsh/defconfig @@ -631,7 +631,8 @@ CONFIG_ARCH_BOARD="aerofc-v1" # # Board-Specific Options # -# CONFIG_BOARD_CRASHDUMP is not set +CONFIG_BOARD_CRASHDUMP=y +CONFIG_BOARD_RESET_ON_CRASH=y CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set diff --git a/src/drivers/boards/aerofc-v1/aerofc_init.c b/src/drivers/boards/aerofc-v1/aerofc_init.c index 6f912497b1..15deb23c19 100644 --- a/src/drivers/boards/aerofc-v1/aerofc_init.c +++ b/src/drivers/boards/aerofc-v1/aerofc_init.c @@ -366,3 +366,9 @@ __EXPORT int board_app_initialize(uintptr_t arg) return OK; } +__EXPORT void board_crashdump(uintptr_t currentsp, FAR void *tcb, FAR const uint8_t *filename, int lineno) +{ +#if defined(CONFIG_BOARD_RESET_ON_CRASH) + px4_systemreset(false); +#endif +}