From ce68e0fbb5c8cc5fe9cf894c3e477c824e1f3995 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 28 Apr 2020 17:46:13 +1000 Subject: [PATCH] HAL_ChibiOS: fixed bootloader build --- libraries/AP_HAL_ChibiOS/hwdef/common/stm32_util.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/common/stm32_util.c b/libraries/AP_HAL_ChibiOS/hwdef/common/stm32_util.c index 442ed9c944..58e481426c 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/common/stm32_util.c +++ b/libraries/AP_HAL_ChibiOS/hwdef/common/stm32_util.c @@ -438,10 +438,14 @@ void system_halt_hook(void) // hook for stack overflow void stack_overflow(thread_t *tp) { +#if !defined(HAL_BOOTLOADER_BUILD) && !defined(IOMCU_FW) extern void AP_stack_overflow(const char *thread_name); AP_stack_overflow(tp->name); // if we get here then we are armed and got a stack overflow. We // will report an internal error and keep trying to fly. We are // quite likely to crash anyway due to memory corruption. The // watchdog data should record the thread name and fault type +#else + (void)tp; +#endif }