Skip to main content

Module trace

Module trace 

Source
Expand description

Rivet Debugger wire protocol encoder — emits the binary trace frames rivet-debugger-app (a separate, sibling project — see its own SRS/ PLAN at ../rivet-debugger) decodes live over a UART.

Mirrors rivet-trace-protocol’s frame layout (SYNC0/SYNC1, CRC-16/ CCITT-FALSE, EventKind/Payload encoding) by hand, not by sharing a crate: that project lives in a separate repository, and depending on it directly from this kernel crate would mean rivet no longer builds standalone from a fresh clone — the same reasoning rivet already applies to every board-specific crate (nothing outside this repo, nothing MMIO-shaped, in the kernel itself). If the two drift, rivet-trace-protocol’s own decoder is the ground truth; re-derive this module’s byte layout from rivet-trace-protocol/src/frame.rs and event.rs, not from memory.

Gated behind the trace feature (off by default, same discipline as crate::latency): every call in this module is a no-op unless a board crate both enables the feature and implements [crate::port::board::trace_write]’s extern symbol.