diff --git a/libraries/AP_HAL/AP_HAL_Boards.h b/libraries/AP_HAL/AP_HAL_Boards.h index 5ae4318755..ac44226c08 100644 --- a/libraries/AP_HAL/AP_HAL_Boards.h +++ b/libraries/AP_HAL/AP_HAL_Boards.h @@ -277,6 +277,10 @@ #define HAL_WITH_MCU_MONITORING 0 #endif +#ifndef AP_CRASHDUMP_ENABLED +#define AP_CRASHDUMP_ENABLED 0 +#endif + #ifndef HAL_HNF_MAX_FILTERS // On an F7 The difference in CPU load between 1 notch and 24 notches is about 2% // The difference in CPU load between 1Khz backend and 2Khz backend is about 10% diff --git a/libraries/AP_HAL/Util.h b/libraries/AP_HAL/Util.h index b730acb1d5..f8241558e7 100644 --- a/libraries/AP_HAL/Util.h +++ b/libraries/AP_HAL/Util.h @@ -196,8 +196,11 @@ public: // log info on stack usage virtual void log_stack_info(void) {} +#if AP_CRASHDUMP_ENABLED virtual size_t last_crash_dump_size() const { return 0; } virtual void* last_crash_dump_ptr() const { return nullptr; } +#endif + protected: // we start soft_armed false, so that actuators don't send any // values until the vehicle code has fully started