mirror of https://github.com/ArduPilot/ardupilot
HAL_ChibiOS: skip compiling last_crash_dump if bootloader and GCS disabled
This commit is contained in:
parent
8651d99de6
commit
a28bf358d1
|
@ -699,9 +699,10 @@ void Util::log_stack_info(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
#if defined(HAL_CRASH_DUMP_FLASHPAGE)
|
||||
#if defined(HAL_CRASH_DUMP_FLASHPAGE) && !defined(HAL_BOOTLOADER_BUILD)
|
||||
void Util::last_crash_dump(ExpandingString &str) const
|
||||
{
|
||||
#if HAL_GCS_ENABLED
|
||||
// get dump size
|
||||
uint32_t size = stm32_crash_dump_size();
|
||||
char* dump_start = (char*)stm32_flash_getpageaddr(HAL_CRASH_DUMP_FLASHPAGE);
|
||||
|
@ -715,5 +716,6 @@ void Util::last_crash_dump(ExpandingString &str) const
|
|||
size = stm32_flash_getpagesize(HAL_CRASH_DUMP_FLASHPAGE);
|
||||
}
|
||||
str.append(dump_start, size);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -136,7 +136,7 @@ private:
|
|||
// log info on stack usage
|
||||
void log_stack_info(void) override;
|
||||
|
||||
#if defined(HAL_CRASH_DUMP_FLASHPAGE)
|
||||
#if defined(HAL_CRASH_DUMP_FLASHPAGE) && !defined(HAL_BOOTLOADER_BUILD)
|
||||
// get last crash dump
|
||||
void last_crash_dump(ExpandingString &str) const override;
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue