devis does for visualization what defmt does for logging.
It works by sreaming a subset of Rerun to the host using
RTT
where the devis-rerun-bridge tool forwards the data.
Optionally devis implements compatability with defmt. Log messages will be decoded and sent to Rerun as a text log.
On the target (see examples/stm32g4 for a full example):
devis_rtt::init();
loop {
devis::scalar!("motor/current_amps", current);
defmt::info!("still running");
}[dependencies]
defmt = "1"
devis = "0.1"
devis-rtt = { version = "0.1", features = ["defmt"] }Add the linker scripts to your build (.cargo/config.toml):
rustflags = ["-C", "link-arg=-Tdevis.x", "-C", "link-arg=-Tdefmt.x"]On the host, with a probe attached and the firmware already running:
cargo run --bin devis -- \
--chip STM32G474VETx \
target/thumbv7em-none-eabihf/release/stm32g4This spawns a rerun viewer and streams data points (and defmt logs, if
present) into it. Pass --connect rerun+http://127.0.0.1:9876/proxy to
stream into an already-running viewer instead, --save recording.rrd to
write an .rrd file, or --no-defmt to skip defmt decoding.