Implement crash handler and diagnostics app (#119)
This commit is contained in:
committed by
GitHub
parent
74a53b2735
commit
51c6aaa428
@@ -0,0 +1,22 @@
|
||||
#ifdef ESP_PLATFORM
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#define CRASH_DATA_CALLSTACK_LIMIT 32 // bytes
|
||||
|
||||
struct CallstackFrame {
|
||||
uint32_t pc = 0;
|
||||
uint32_t sp = 0;
|
||||
};
|
||||
|
||||
struct CrashData {
|
||||
bool callstackCorrupted = false;
|
||||
uint8_t callstackLength = 0;
|
||||
CallstackFrame callstack[CRASH_DATA_CALLSTACK_LIMIT];
|
||||
};
|
||||
|
||||
const CrashData* getRtcCrashData();
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user