mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
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
|
#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
|
void Util::last_crash_dump(ExpandingString &str) const
|
||||||
{
|
{
|
||||||
|
#if HAL_GCS_ENABLED
|
||||||
// get dump size
|
// get dump size
|
||||||
uint32_t size = stm32_crash_dump_size();
|
uint32_t size = stm32_crash_dump_size();
|
||||||
char* dump_start = (char*)stm32_flash_getpageaddr(HAL_CRASH_DUMP_FLASHPAGE);
|
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);
|
size = stm32_flash_getpagesize(HAL_CRASH_DUMP_FLASHPAGE);
|
||||||
}
|
}
|
||||||
str.append(dump_start, size);
|
str.append(dump_start, size);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -136,7 +136,7 @@ private:
|
|||||||
// log info on stack usage
|
// log info on stack usage
|
||||||
void log_stack_info(void) override;
|
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
|
// get last crash dump
|
||||||
void last_crash_dump(ExpandingString &str) const override;
|
void last_crash_dump(ExpandingString &str) const override;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user