cargo-embed icon indicating copy to clipboard operation
cargo-embed copied to clipboard

Graphing POC

Open jacobrosenthal opened this issue 5 years ago • 5 comments

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

Screenshot from 2020-07-20 13-48-20

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?

jacobrosenthal avatar Jul 20 '20 20:07 jacobrosenthal

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 :))

Yatekii avatar Jul 20 '20 21:07 Yatekii

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?

jacobrosenthal avatar Jul 23 '20 21:07 jacobrosenthal

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.

jacobrosenthal avatar Jul 23 '20 21:07 jacobrosenthal

I guess cortex-debug in vscode has graphing support via itm and json configuration https://github.com/Marus/cortex-debug/wiki/SWO-Output

jacobrosenthal avatar Jul 24 '20 18:07 jacobrosenthal

Try to merge: https://github.com/probe-rs/cargo-embed/compare/master...burrbull:graphing

burrbull avatar Dec 08 '20 20:12 burrbull

Thanks for working on this. We've moved the cargo-embed code into the main probe-rs repo, please post future PRs there.

Tiwalun avatar Jan 14 '23 11:01 Tiwalun