2021-06-08 13:28:02 +00:00
|
|
|
// XFLASH dumper
|
|
|
|
#pragma once
|
|
|
|
#include "xflash_layout.h"
|
|
|
|
#ifdef XFLASH_DUMP
|
|
|
|
|
|
|
|
void xfdump_reset(); // reset XFLASH dump state
|
|
|
|
void xfdump_dump(); // create a new SRAM memory dump
|
|
|
|
|
2021-06-10 15:35:49 +00:00
|
|
|
enum class dump_crash_reason : uint8_t
|
2021-06-09 10:59:26 +00:00
|
|
|
{
|
|
|
|
manual = 0,
|
|
|
|
stack_error,
|
|
|
|
watchdog,
|
|
|
|
};
|
|
|
|
|
2021-06-11 17:21:51 +00:00
|
|
|
// return true if a dump is present, save type in "reason" if provided
|
|
|
|
bool xfdump_check_state(dump_crash_reason* reason = NULL);
|
|
|
|
|
2021-06-08 13:28:02 +00:00
|
|
|
// create a new dump containing registers and SRAM, then reset
|
2021-06-10 15:35:49 +00:00
|
|
|
void xfdump_full_dump_and_reset(dump_crash_reason crash = dump_crash_reason::manual);
|
2021-06-08 13:28:02 +00:00
|
|
|
|
|
|
|
#endif
|