Expand description
The runtime’s debug-log seam.
Shared code needs to emit the same diagnostic lines the firmwares
already print, but each board owns its own sink: the nRF images
multiplex a USB-serial debug channel, the ESP32 image writes to its
UART. Rather than thread a logger through every signature — most of
which are static-backed tasks with no place to put one — a board
installs its sink once at boot and the shared modules call
debug_log freely.
Before set_debug_log runs, logging is a no-op. That is the
correct behavior for the earliest boot code, which runs before the
transport that would carry a log line exists.
Functions§
- debug_
log - Emit one debug line through the board’s sink, or drop it if no sink is installed yet.
- set_
debug_ log - Install the board’s debug-log sink. Call once, as early in boot as the sink itself is usable; a later call replaces the previous sink.