Implement crash handler and diagnostics app (#119)

This commit is contained in:
Ken Van Hoeylandt
2024-12-12 22:38:48 +01:00
committed by GitHub
parent 74a53b2735
commit 51c6aaa428
38 changed files with 3717 additions and 24 deletions
@@ -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