From 24f9a53f606ada967ba0abab2725cd1d03b2b683 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= Date: Fri, 20 Jan 2017 13:29:04 -0800 Subject: [PATCH] drivers: common: stm32: Do not call stm32_bbsram_savepanic() if not implemented --- src/drivers/boards/common/stm32/board_crashdump.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/drivers/boards/common/stm32/board_crashdump.c b/src/drivers/boards/common/stm32/board_crashdump.c index cdaa4a793c..206fd8871d 100644 --- a/src/drivers/boards/common/stm32/board_crashdump.c +++ b/src/drivers/boards/common/stm32/board_crashdump.c @@ -10,15 +10,18 @@ #include +#if defined(CONFIG_STM32_SAVE_CRASHDUMP) || defined(CONFIG_STM32F7_SAVE_CRASHDUMP) static void copy_reverse(stack_word_t *dest, stack_word_t *src, int size) { while (size--) { *dest++ = *src--; } } +#endif __EXPORT void board_crashdump(uintptr_t currentsp, FAR void *tcb, FAR const uint8_t *filename, int lineno) { +#if defined(CONFIG_STM32_SAVE_CRASHDUMP) || defined(CONFIG_STM32F7_SAVE_CRASHDUMP) /* We need a chunk of ram to save the complete context in. * Since we are going to reboot we will use &_sdata * which is the lowest memory and the amount we will save @@ -157,7 +160,7 @@ __EXPORT void board_crashdump(uintptr_t currentsp, FAR void *tcb, FAR const uint up_lowputc('!'); } - +#endif #if defined(CONFIG_BOARD_RESET_ON_CRASH) px4_systemreset(false);