app-module events & callstack config, crash diagnostics (#630)
- Apps can specify task stack depth and preferred memory placement in their manifests. - App identifiers are validated against length and character requirements. - Crash diagnostics now show the crash cause, reason, fault address, call stack, and program-counter details, with logs saved for review. - App closing is more consistent across built-in screens. There's now a dedicated function, and the old _emit() function is made private. - Crash diagnostics no longer display a QR code without a call stack. - Improved memory allocation for unrestricted requests.
This commit is contained in:
committed by
GitHub
parent
c656ee9ffd
commit
92ca046681
@@ -6,6 +6,7 @@
|
||||
|
||||
#define CRASH_DATA_CALLSTACK_LIMIT 64
|
||||
#define CRASH_DATA_INCLUDES_SP false
|
||||
#define CRASH_DATA_REASON_LENGTH 128
|
||||
|
||||
/** Represents a single frame on the callstack. */
|
||||
struct CallstackFrame {
|
||||
@@ -15,11 +16,25 @@ struct CallstackFrame {
|
||||
#endif
|
||||
};
|
||||
|
||||
/** Broad category of what caused the panic (mirrors ESP-IDF's panic_exception_t). */
|
||||
enum class CrashCause : uint8_t {
|
||||
Unknown,
|
||||
Debug,
|
||||
WatchdogInterrupt,
|
||||
WatchdogTask,
|
||||
Abort,
|
||||
Fault,
|
||||
};
|
||||
|
||||
/** Callstack-related crash data. */
|
||||
struct CrashData {
|
||||
bool callstackCorrupted = false;
|
||||
uint8_t callstackLength = 0;
|
||||
CallstackFrame callstack[CRASH_DATA_CALLSTACK_LIMIT];
|
||||
|
||||
CrashCause cause = CrashCause::Unknown;
|
||||
uint32_t faultAddress = 0;
|
||||
char reason[CRASH_DATA_REASON_LENGTH] = { 0 };
|
||||
};
|
||||
|
||||
/** @return the crash data */
|
||||
|
||||
Reference in New Issue
Block a user