Skip to main content
The two workflows embedded developers usually evaluate first: driving a debug probe (flash / erase / reset / memory reads / RTT) and streaming UART. Both are fully supported by the crate.

Flashing and memory access

DebugNet drives a J-Link/OpenOCD debug probe through the box’s debug service (port 8765, published on the box host):
flash_bin(path, address) places a raw binary at an explicit address, and flash_bytes uploads an in-memory image — useful when your test builds firmware variants on the fly. info() and status() report probe and target state.

RTT log streaming

rtt() returns a blocking byte stream implementing std::io::Read, so asserting on target output is plain std I/O:

Tunneled debug service

If the debug service is reached through an SSH tunnel rather than directly, point the crate at it:
or set the LAGER_DEBUG_SERVICE_URL environment variable.

Streaming UART

Enable the uart feature:
A Uart session streams over the box’s Socket.IO /uart namespace. wait_for accumulates output until a needle appears (bytes after the needle stay buffered for the next read), which makes boot assertions one-liners:
The session reports adapter re-enumeration (hub power-cycle, DUT reflash) via last_status()"reconnecting" / "reconnected" — and keeps streaming across it, so power-cycling tests don’t need to reopen the port.