ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
exc_decoder.h File Reference

Panic / exception decoder for a live diagnostics panel (PROTOCORE_ENABLE_EXC_DECODER). More...

#include "protocore_config.h"

Go to the source code of this file.

Detailed Description

Panic / exception decoder for a live diagnostics panel (PROTOCORE_ENABLE_EXC_DECODER).

When the part panics it prints a dump: a cause ("LoadProhibited"), a per-core register dump (PC, EXCVADDR, ...), and a backtrace of PC:SP frame pairs. To resolve those PCs to file:line an addr2line-style panel needs the firmware ELF, which lives off-device - so the on-device job is to extract and present the raw decode: the cause, the faulting PC + data address, and the ordered backtrace PC list, served as JSON for a live "/exception" panel (the browser or a build server then resolves symbols). This is that extractor.

It parses the panic text an app captures (from the console, a saved crash line, or a text rendering of the core-dump partition) into a structured ExcInfo, and serializes it. Pure, zero heap, no stdlib (hand-rolled hex/decimal parsing), host-testable against a captured panic string.

Definition in file exc_decoder.h.