cargo-embed
cargo-embed copied to clipboard
Graphing POC
This is heavily tied to my use case and not mergable as is. But since we have the tui widgets I hacked this in for my application and to start a conversation.
In this case I'm printing accelerometer data as le bytes of f32 to channel 1 and the usual text to channel 0

Not sure how to accommodate all the needs people might have for graphing in say a configuration toml file. Maybe it needs like a wasm interpreter or something for people to design their own graphing to hand off to embed?
This is so cool! I love it! I'll see through it once I got ITM etc up :) I think we can merge sth like this if it is configurable enough (not always on etc :))
Instead of onerous and impossible configuration, presumably we could do something like japaric's zero cost deferred formatting for logging thing (only link I could find) https://github.com/rtic-rs/rfcs/issues/31. We could configure the graph at some small cost on the device when we set up the rtt or itm channels -- chart style enum, bounds, number of datasets and data format (interleaved or one after the other), then grab that data out of dwarf symbols?
Obviously the naive and maybe even a good initial solution would be to just deserialize some graphing config struct over the wire first that explains all that configuration.
I guess cortex-debug in vscode has graphing support via itm and json configuration https://github.com/Marus/cortex-debug/wiki/SWO-Output
Try to merge: https://github.com/probe-rs/cargo-embed/compare/master...burrbull:graphing
Thanks for working on this. We've moved the cargo-embed code into the main probe-rs repo, please post future PRs there.