diff --git a/probe-plotter-tools/Cargo.lock b/probe-plotter-tools/Cargo.lock index cc15199..fc98ee3 100644 --- a/probe-plotter-tools/Cargo.lock +++ b/probe-plotter-tools/Cargo.lock @@ -922,6 +922,18 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "base64" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" + +[[package]] +name = "basic-udev" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a45f9771ced8a774de5e5ebffbe520f52e3943bf5a9a6baa3a5d14a5de1afe6" + [[package]] name = "bigdecimal" version = "0.4.10" @@ -1417,7 +1429,7 @@ dependencies = [ "anstream 1.0.0", "anstyle", "clap_lex", - "strsim 0.11.1", + "strsim", ] [[package]] @@ -1453,6 +1465,16 @@ dependencies = [ "error-code", ] +[[package]] +name = "cobs" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd93fd2c1b27acd030440c9dbd9d14c1122aad622374fe05a670b67a4bc034be" +dependencies = [ + "heapless", + "thiserror 2.0.18", +] + [[package]] name = "codespan-reporting" version = "0.12.0" @@ -1461,7 +1483,7 @@ checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81" dependencies = [ "serde", "termcolor", - "unicode-width 0.2.2", + "unicode-width", ] [[package]] @@ -1504,7 +1526,7 @@ checksum = "958c5d6ecf1f214b4c2bbbbf6ab9523a864bd136dcf71a7e8904799acfe1ad47" dependencies = [ "crossterm", "unicode-segmentation", - "unicode-width 0.2.2", + "unicode-width", ] [[package]] @@ -1546,7 +1568,7 @@ checksum = "d64e8af5551369d19cf50138de61f1c42074ab970f74e99be916646777f8fc87" dependencies = [ "encode_unicode", "libc", - "unicode-width 0.2.2", + "unicode-width", "windows-sys 0.61.2", ] @@ -1842,38 +1864,14 @@ dependencies = [ "ref-cast", ] -[[package]] -name = "darling" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" -dependencies = [ - "darling_core 0.14.4", - "darling_macro 0.14.4", -] - [[package]] name = "darling" version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" dependencies = [ - "darling_core 0.21.3", - "darling_macro 0.21.3", -] - -[[package]] -name = "darling_core" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn 1.0.109", + "darling_core", + "darling_macro", ] [[package]] @@ -1889,24 +1887,13 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "darling_macro" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" -dependencies = [ - "darling_core 0.14.4", - "quote", - "syn 1.0.109", -] - [[package]] name = "darling_macro" version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ - "darling_core 0.21.3", + "darling_core", "quote", "syn 2.0.117", ] @@ -2547,16 +2534,6 @@ dependencies = [ "sqlparser", ] -[[package]] -name = "defmt" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "548d977b6da32fa1d1fda2876453da1e7df63ad0304c8b3dae4dbe7b96f39b78" -dependencies = [ - "bitflags 1.3.2", - "defmt-macros", -] - [[package]] name = "defmt-decoder" version = "1.1.0" @@ -2592,19 +2569,6 @@ dependencies = [ "serde", ] -[[package]] -name = "defmt-macros" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d4fc12a85bcf441cfe44344c4b72d58493178ce635338a3f3b78943aceb258e" -dependencies = [ - "defmt-parser", - "proc-macro-error2", - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "defmt-parser" version = "1.0.0" @@ -2614,29 +2578,6 @@ dependencies = [ "thiserror 2.0.18", ] -[[package]] -name = "deku" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819b87cc7a05b3abe3fc38e59b3980a5fd3162f25a247116441a9171d3e84481" -dependencies = [ - "bitvec", - "deku_derive", -] - -[[package]] -name = "deku_derive" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e2ca12572239215a352a74ad7c776d7e8a914f8a23511c6cbedddd887e5009e" -dependencies = [ - "darling 0.14.4", - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "deranged" version = "0.5.8" @@ -3136,7 +3077,7 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f43e744e4ea338060faee68ed933e46e722fb7f3617e722a5772d7e856d8b3ce" dependencies = [ - "darling 0.21.3", + "darling", "proc-macro2", "quote", "syn 2.0.117", @@ -3221,45 +3162,6 @@ version = "3.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dea2df4cf52843e0452895c455a1a2cfbb842a1e7329671acf418fdc53ed4c59" -[[package]] -name = "esp-idf-part" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59f50b6c32370067087b46087cd5333f2dfe678f0b01223fa70fde6f15449844" -dependencies = [ - "csv", - "deku", - "heapless", - "md5", - "parse_int", - "regex", - "serde", - "serde_plain", - "strum", - "thiserror 1.0.69", -] - -[[package]] -name = "espflash" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75ee2834a4000ab046f7a2a439ac1c54366a2f6b91db92a147ca7fbaf7c2e1eb" -dependencies = [ - "base64 0.22.1", - "bytemuck", - "esp-idf-part", - "flate2", - "libc", - "log", - "md-5", - "miette", - "serde", - "sha2", - "strum", - "thiserror 2.0.18", - "xmas-elf", -] - [[package]] name = "euclid" version = "0.22.13" @@ -3801,17 +3703,6 @@ dependencies = [ "gl_generator", ] -[[package]] -name = "goblin" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "983a6aafb3b12d4c41ea78d39e189af4298ce747353945ff5105b54a056e5cd9" -dependencies = [ - "log", - "plain", - "scroll 0.13.0", -] - [[package]] name = "gpu-alloc" version = "0.6.0" @@ -3947,12 +3838,11 @@ dependencies = [ [[package]] name = "heapless" -version = "0.8.0" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" +checksum = "25ba4bd83f9415b58b4ed8dc5714c76e626a105be4646c02630ad730ad3b5aa4" dependencies = [ "hash32", - "serde", "stable_deref_trait", ] @@ -3972,12 +3862,6 @@ dependencies = [ "egui", ] -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - [[package]] name = "hermit-abi" version = "0.5.2" @@ -4025,12 +3909,12 @@ version = "2.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d1b71e1f4791fb9e93b9d7ee03d70b501ab48f6151432fbcadeabc30fe15396e" dependencies = [ + "basic-udev", "cc", "cfg-if", "libc", "nix 0.30.1", "pkg-config", - "udev", "windows-sys 0.61.2", ] @@ -4354,7 +4238,7 @@ checksum = "25470f23803092da7d239834776d653104d551bc4d7eacaf31e6837854b8e9eb" dependencies = [ "console 0.16.3", "portable-atomic", - "unicode-width 0.2.2", + "unicode-width", "unit-prefix", "web-time", ] @@ -4407,18 +4291,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617ee6cf8e3f66f3b4ea67a4058564628cde41901316e19f559e14c7c72c5e7b" dependencies = [ "core-foundation-sys", - "mach2", + "mach2 0.4.3", ] [[package]] -name = "io-lifetimes" -version = "1.0.11" +name = "io-kit-sys" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +checksum = "06d3a048d09fbb6597dbf7c69f40d14df4a49487db1487191618c893fc3b1c26" dependencies = [ - "hermit-abi 0.3.9", - "libc", - "windows-sys 0.48.0", + "core-foundation-sys", + "mach2 0.5.0", ] [[package]] @@ -4461,6 +4344,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b4baf93f58d4425749ca49a51c50ebab072c5df6994d08fed93541c331481dc" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.17" @@ -4797,14 +4689,10 @@ dependencies = [ ] [[package]] -name = "libudev-sys" -version = "0.1.4" +name = "libyaml-rs" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c8469b4a23b962c1396b9b451dda50ef5b283e8dd309d69033475fa9b334324" -dependencies = [ - "libc", - "pkg-config", -] +checksum = "2e126dda6f34391ab7b444f9922055facc83c07a910da3eb16f1e4d9c45dc777" [[package]] name = "linked-hash-map" @@ -4921,6 +4809,15 @@ dependencies = [ "libc", ] +[[package]] +name = "mach2" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a1b95cd5421ec55b445b5ae102f5ea0e768de1f82bd3001e11f426c269c3aea" +dependencies = [ + "libc", +] + [[package]] name = "malloc_buf" version = "0.0.6" @@ -4985,12 +4882,6 @@ dependencies = [ "digest", ] -[[package]] -name = "md5" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" - [[package]] name = "memchr" version = "2.8.0" @@ -5040,28 +4931,6 @@ dependencies = [ "paste", ] -[[package]] -name = "miette" -version = "7.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f98efec8807c63c752b5bd61f862c165c115b0a35685bdcfd9238c7aeb592b7" -dependencies = [ - "cfg-if", - "miette-derive", - "unicode-width 0.1.14", -] - -[[package]] -name = "miette-derive" -version = "7.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db5b29714e950dbb20d5e6f74f9dcec4edbcc1067bb7f8ed198c097b8c1a818b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "mimalloc" version = "0.1.48" @@ -5267,6 +5136,18 @@ dependencies = [ "libc", ] +[[package]] +name = "nix" +version = "0.31.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6d0705320c1e6ba1d912b5e37cf18071b6c2e9b7fa8215a1e8a7651966f5d3" +dependencies = [ + "bitflags 2.11.0", + "cfg-if", + "cfg_aliases", + "libc", +] + [[package]] name = "nohash-hasher" version = "0.2.0" @@ -5427,7 +5308,7 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" dependencies = [ - "hermit-abi 0.5.2", + "hermit-abi", "libc", ] @@ -5447,7 +5328,7 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" dependencies = [ - "proc-macro-crate 3.5.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.117", @@ -5455,21 +5336,24 @@ dependencies = [ [[package]] name = "nusb" -version = "0.1.14" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f861541f15de120eae5982923d073bfc0c1a65466561988c82d6e197734c19e" +checksum = "18ef13beb3b3a8fc16fd7aea912ebd3d45dde00a9a5b968d0742297468065845" dependencies = [ - "atomic-waker", - "core-foundation 0.9.4", + "core-foundation 0.10.1", "core-foundation-sys", "futures-core", - "io-kit-sys", - "libc", + "io-kit-sys 0.5.0", + "js-sys", + "linux-raw-sys 0.12.1", "log", "once_cell", - "rustix 0.38.44", + "rustix 1.1.4", "slab", - "windows-sys 0.48.0", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "windows-sys 0.60.2", ] [[package]] @@ -5848,6 +5732,15 @@ dependencies = [ "ruzstd", ] +[[package]] +name = "object" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd229a0361b9d0d4396176e02d65897f487eebeab7caa6d443855ee152ca0b9c" +dependencies = [ + "memchr", +] + [[package]] name = "object_store" version = "0.12.5" @@ -6095,15 +5988,6 @@ dependencies = [ "twox-hash", ] -[[package]] -name = "parse_int" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d695b79916a2c08bcff7be7647ab60d1402885265005a6658ffe6d763553c5a" -dependencies = [ - "num-traits", -] - [[package]] name = "paste" version = "1.0.15" @@ -6342,7 +6226,7 @@ checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" dependencies = [ "cfg-if", "concurrent-queue", - "hermit-abi 0.5.2", + "hermit-abi", "pin-project-lite", "rustix 1.1.4", "windows-sys 0.61.2", @@ -6423,11 +6307,9 @@ dependencies = [ name = "probe-plotter-tools" version = "0.1.0" dependencies = [ - "defmt", "defmt-decoder", "defmt-parser", "gimli 0.32.3", - "goblin", "mimalloc", "object 0.37.3", "probe-plotter-common", @@ -6441,61 +6323,49 @@ dependencies = [ [[package]] name = "probe-rs" -version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbe3ebd35648720efb8ae8ac516d2e4b01ae599e4852b7c4e58cad57faa98a9c" +version = "0.32.0" +source = "git+https://github.com/probe-rs/probe-rs#e19b6a52400e2f90eb466c436c69bb558a339a9a" dependencies = [ "anyhow", - "async-io", "bincode 2.0.1", "bitfield", "bitvec", + "cobs", "docsplay", "dunce", - "espflash", "flate2", - "futures-lite", "hidapi", "ihex", - "itertools 0.14.0", + "itertools 0.15.0", "jep106", + "nix 0.31.2", "nusb", - "object 0.36.7", + "object 0.40.0", "parking_lot", "probe-rs-target", "rmp-serde", - "scroll 0.12.0", + "scroll", "serde", - "serde_yaml", "serialport", "thiserror 2.0.18", "tracing", "uf2-decode", + "yaml_serde", "zerocopy 0.8.42", ] [[package]] name = "probe-rs-target" -version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2e8b139e00c1616dc404fa9b7c9ad8bd62616982cf769846ed7be2c18bfa576" +version = "0.32.0" +source = "git+https://github.com/probe-rs/probe-rs#e19b6a52400e2f90eb466c436c69bb558a339a9a" dependencies = [ - "base64 0.22.1", + "base64 0.23.1", + "bincode 2.0.1", "indexmap", "jep106", "serde", "serde_with", - "url", -] - -[[package]] -name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit 0.19.15", + "yaml_serde", ] [[package]] @@ -6504,29 +6374,7 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" dependencies = [ - "toml_edit 0.25.4+spec-1.1.0", -] - -[[package]] -name = "proc-macro-error-attr2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" -dependencies = [ - "proc-macro2", - "quote", -] - -[[package]] -name = "proc-macro-error2" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" -dependencies = [ - "proc-macro-error-attr2", - "proc-macro2", - "quote", - "syn 2.0.117", + "toml_edit", ] [[package]] @@ -9325,31 +9173,11 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "scroll" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ab8598aa408498679922eff7fa985c25d58a90771bd6be794434c5277eab1a6" - [[package]] name = "scroll" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1257cd4248b4132760d6524d6dda4e053bc648c9070b960929bf50cfb1e7add" -dependencies = [ - "scroll_derive", -] - -[[package]] -name = "scroll_derive" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed76efe62313ab6610570951494bdaa81568026e0318eaa55f167de70eeea67d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] [[package]] name = "scuffle-av1" @@ -9507,15 +9335,6 @@ dependencies = [ "serde_core", ] -[[package]] -name = "serde_plain" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1fc6db65a611022b23a0dec6975d63fb80a302cb3388835ff02c097258d50" -dependencies = [ - "serde", -] - [[package]] name = "serde_repr" version = "0.1.20" @@ -9554,19 +9373,6 @@ dependencies = [ "time", ] -[[package]] -name = "serde_yaml" -version = "0.9.34+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" -dependencies = [ - "indexmap", - "itoa", - "ryu", - "serde", - "unsafe-libyaml", -] - [[package]] name = "serialport" version = "4.9.0" @@ -9577,8 +9383,8 @@ dependencies = [ "cfg-if", "core-foundation 0.10.1", "core-foundation-sys", - "io-kit-sys", - "mach2", + "io-kit-sys 0.4.1", + "mach2 0.4.3", "nix 0.26.4", "scopeguard", "unescaper", @@ -9878,12 +9684,6 @@ dependencies = [ "float-cmp", ] -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - [[package]] name = "strsim" version = "0.11.1" @@ -10283,12 +10083,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "toml_datetime" -version = "0.6.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" - [[package]] name = "toml_datetime" version = "1.0.0+spec-1.1.0" @@ -10298,17 +10092,6 @@ dependencies = [ "serde_core", ] -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap", - "toml_datetime 0.6.11", - "winnow 0.5.40", -] - [[package]] name = "toml_edit" version = "0.25.4+spec-1.1.0" @@ -10316,9 +10099,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7193cbd0ce53dc966037f54351dbbcf0d5a642c7f0038c382ef9e677ce8c13f2" dependencies = [ "indexmap", - "toml_datetime 1.0.0+spec-1.1.0", + "toml_datetime", "toml_parser", - "winnow 0.7.15", + "winnow", ] [[package]] @@ -10327,7 +10110,7 @@ version = "1.0.9+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "702d4415e08923e7e1ef96cd5727c0dfed80b4d2fa25db9647fe5eb6f7c5a4c4" dependencies = [ - "winnow 0.7.15", + "winnow", ] [[package]] @@ -10590,18 +10373,6 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" -[[package]] -name = "udev" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af4e37e9ea4401fc841ff54b9ddfc9be1079b1e89434c1a6a865dd68980f7e9f" -dependencies = [ - "io-lifetimes", - "libc", - "libudev-sys", - "pkg-config", -] - [[package]] name = "uds_windows" version = "1.2.1" @@ -10646,12 +10417,6 @@ version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" -[[package]] -name = "unicode-width" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" - [[package]] name = "unicode-width" version = "0.2.2" @@ -10676,12 +10441,6 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81e544489bf3d8ef66c953931f56617f423cd4b5494be343d9b9d3dda037b9a3" -[[package]] -name = "unsafe-libyaml" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" - [[package]] name = "untrusted" version = "0.9.0" @@ -11596,15 +11355,6 @@ dependencies = [ "windows-targets 0.42.2", ] -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows-sys" version = "0.52.0" @@ -11656,21 +11406,6 @@ dependencies = [ "windows_x86_64_msvc 0.42.2", ] -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - [[package]] name = "windows-targets" version = "0.52.6" @@ -11719,12 +11454,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" @@ -11743,12 +11472,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" @@ -11767,12 +11490,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -11803,12 +11520,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" @@ -11827,12 +11538,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" @@ -11851,12 +11556,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" @@ -11875,12 +11574,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -11944,15 +11637,6 @@ dependencies = [ "xkbcommon-dl", ] -[[package]] -name = "winnow" -version = "0.5.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - [[package]] name = "winnow" version = "0.7.15" @@ -12122,15 +11806,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" -[[package]] -name = "xmas-elf" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42c49817e78342f7f30a181573d82ff55b88a35f86ccaf07fc64b3008f56d1c6" -dependencies = [ - "zero", -] - [[package]] name = "xml-rs" version = "0.8.28" @@ -12149,6 +11824,19 @@ version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdd20c5420375476fbd4394763288da7eb0cc0b8c11deed431a91562af7335d3" +[[package]] +name = "yaml_serde" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33b729a08a9a6be689bbad3e2bf8015926db54b6622cc89c3a5f7dc174b9e918" +dependencies = [ + "indexmap", + "itoa", + "libyaml-rs", + "ryu", + "serde", +] + [[package]] name = "yoke" version = "0.8.1" @@ -12201,7 +11889,7 @@ dependencies = [ "uds_windows", "uuid", "windows-sys 0.61.2", - "winnow 0.7.15", + "winnow", "zbus_macros", "zbus_names", "zvariant", @@ -12237,7 +11925,7 @@ version = "5.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897e79616e84aac4b2c46e9132a4f63b93105d54fe8c0e8f6bffc21fa8d49222" dependencies = [ - "proc-macro-crate 3.5.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.117", @@ -12253,7 +11941,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffd8af6d5b78619bab301ff3c560a5bd22426150253db278f164d6cf3b72c50f" dependencies = [ "serde", - "winnow 0.7.15", + "winnow", "zvariant", ] @@ -12269,12 +11957,6 @@ dependencies = [ "zvariant", ] -[[package]] -name = "zero" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fe21bcc34ca7fe6dd56cc2cb1261ea59d6b93620215aefb5ea6032265527784" - [[package]] name = "zerocopy" version = "0.7.35" @@ -12434,7 +12116,7 @@ dependencies = [ "endi", "enumflags2", "serde", - "winnow 0.7.15", + "winnow", "zvariant_derive", "zvariant_utils", ] @@ -12445,7 +12127,7 @@ version = "5.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b59b012ebe9c46656f9cc08d8da8b4c726510aef12559da3e5f1bf72780752c" dependencies = [ - "proc-macro-crate 3.5.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.117", @@ -12462,5 +12144,5 @@ dependencies = [ "quote", "serde", "syn 2.0.117", - "winnow 0.7.15", + "winnow", ] diff --git a/probe-plotter-tools/Cargo.toml b/probe-plotter-tools/Cargo.toml index 26e36b8..817d599 100644 --- a/probe-plotter-tools/Cargo.toml +++ b/probe-plotter-tools/Cargo.toml @@ -5,10 +5,8 @@ edition = "2024" publish = ["gitea"] [dependencies] -defmt = "1.0.1" -goblin = "0.10.0" object = "0.37.1" -probe-rs = "0.29.1" +probe-rs = { git = "https://github.com/probe-rs/probe-rs" } rerun = { version = "0.30.0", default-features = false, features = [ "native_viewer", "sdk", diff --git a/probe-plotter-tools/src/bin/custom-viewer.rs b/probe-plotter-tools/src/bin/custom-viewer.rs index ced1741..c48c4bb 100644 --- a/probe-plotter-tools/src/bin/custom-viewer.rs +++ b/probe-plotter-tools/src/bin/custom-viewer.rs @@ -1,8 +1,18 @@ // A custom rerun viewer capable of showing and editing settings -use probe_plotter_tools::{gui::MyApp, parse, probe_background_thread, setting::Setting}; -use rerun::external::{eframe, re_crash_handler, re_grpc_server, re_viewer, tokio}; -use std::{env, io::Read, sync::mpsc, thread, time::Duration}; +use probe_plotter_tools::{gui::{FlashProgress, MyApp}, parse, probe_background_thread, setting::Setting}; +use probe_rs::flashing::{self, DownloadOptions}; +use rerun::{ + RecordingStreamBuilder, + external::{eframe, re_crash_handler, re_grpc_server, re_viewer, tokio}, +}; +use std::{ + env, io::Read, sync::{ + Arc, Mutex, + atomic::{AtomicBool, Ordering}, + mpsc, + }, thread, time::Duration, +}; #[tokio::main] async fn main() -> Result<(), Box> { @@ -34,14 +44,6 @@ async fn main() -> Result<(), Box> { _ => panic!("Invalid channel_mode. Select one of\n* NoBlockSkip\n* NoBlockTrim\n* BlockIfFull\n\n{help}"), }); - let mut elf_bytes = Vec::new(); - std::fs::File::open(elf_path) - .unwrap() - .read_to_end(&mut elf_bytes) - .unwrap(); - - let (metrics, settings, scan_region) = parse(&elf_bytes); - let main_thread_token = rerun::MainThreadToken::i_promise_i_am_on_the_main_thread(); // Direct calls using the `log` crate to stderr. Control with `RUST_LOG=debug` etc. @@ -54,12 +56,12 @@ async fn main() -> Result<(), Box> { // There are other ways of "feeding" the viewer though - all you need is a `re_smart_channel::Receiver`. let server_options = Default::default(); let rx = re_grpc_server::spawn_with_recv( - "0.0.0.0:9876".parse().unwrap(), + "0.0.0.0:9875".parse()?, // Avoid the default port of 9876 server_options, re_grpc_server::shutdown::never(), ); - let (settings_update_sender, settings_update_receiver) = mpsc::channel::(); + let (settings_update_sender, mut settings_update_receiver) = mpsc::channel::(); let mut native_options = re_viewer::native::eframe_options(None); native_options.viewport = native_options.viewport.with_app_id("probe-plotter"); @@ -69,26 +71,69 @@ async fn main() -> Result<(), Box> { // This is used for analytics, if the `analytics` feature is on in `Cargo.toml` let app_env = re_viewer::AppEnvironment::Custom("probe-plotter-tools".to_owned()); - let (initial_settings_sender, initial_settings_receiver) = mpsc::channel(); + let rec = RecordingStreamBuilder::new("probe-plotter") + .connect_grpc_opts("rerun+http://0.0.0.0:9875/proxy")?; + + let settings = Arc::new(Mutex::new(Vec::new())); + let settings_ = Arc::clone(&settings); + + let is_time_to_flash = Arc::new(AtomicBool::new(false)); + let is_time_to_flash_ = Arc::clone(&is_time_to_flash); + let flash_progress = Arc::new(Mutex::new(FlashProgress::new())); + let flash_progress_ = Arc::clone(&flash_progress); // probe-thread thread::spawn(move || { - probe_background_thread( - update_rate, - channel_mode, - &target, - &elf_bytes, - settings, - metrics, - scan_region, - settings_update_receiver, - initial_settings_sender, - ) + loop { + let mut elf_bytes = Vec::new(); + std::fs::File::open(&elf_path) + .unwrap() + .read_to_end(&mut elf_bytes) + .unwrap(); + let (metrics, parsed_settings, scan_region) = parse(&elf_bytes); + dbg!(&scan_region); + *settings_.lock().unwrap() = parsed_settings; + + let mut session = probe_rs::Session::auto_attach(&target, Default::default()).unwrap(); + { + let mut core = session.core(0).unwrap(); + thread::sleep(Duration::from_secs(1)); + + probe_background_thread( + &mut core, + update_rate, + channel_mode, + &elf_bytes, + Arc::clone(&settings_), + metrics, + scan_region, + &mut settings_update_receiver, + rec.clone(), + &is_time_to_flash, + ); + } + + if is_time_to_flash.load(Ordering::SeqCst) { + flash_progress.lock().unwrap().reset(); + + let mut opts = DownloadOptions::new(); + opts.progress = flashing::FlashProgress::new(|e| flash_progress.lock().unwrap().update(e)); + let _ = flashing::download_file_with_options( + &mut session, + &elf_path, + flashing::ElfLoader(Default::default()), + opts + ); + let mut core = session.core(0).unwrap(); + core.reset().unwrap(); + + is_time_to_flash.store(false, Ordering::SeqCst); + } else { + thread::sleep(Duration::from_secs(1)); + } + } }); - // Receive initial settings from to probe-thread thread - let settings = initial_settings_receiver.recv().unwrap(); - let window_title = "probe-plotter"; eframe::run_native( window_title, @@ -110,6 +155,8 @@ async fn main() -> Result<(), Box> { rerun_app, settings, settings_update_sender, + flash_progress_, + is_time_to_flash_ ))) }), )?; diff --git a/probe-plotter-tools/src/gui.rs b/probe-plotter-tools/src/gui.rs index 00cf44a..a73c873 100644 --- a/probe-plotter-tools/src/gui.rs +++ b/probe-plotter-tools/src/gui.rs @@ -1,8 +1,20 @@ //! This example shows how to wrap the Rerun Viewer in your own GUI. -use std::sync::mpsc; +use std::{ + collections::HashMap, + sync::{ + Arc, Mutex, + atomic::{AtomicBool, Ordering}, + mpsc, + }, +}; -use rerun::external::{eframe, egui, re_memory, re_viewer}; +use probe_rs::flashing::{ProgressEvent, ProgressOperation}; +use rerun::external::{ + eframe, + egui::{self, ProgressBar}, + re_memory, re_viewer, +}; use crate::setting::Setting; @@ -15,22 +27,28 @@ static GLOBAL: re_memory::AccountingAllocator = pub struct MyApp { rerun_app: re_viewer::App, - settings: Vec, + settings: Arc>>, /// Send settigns here to apply them settings_channel: mpsc::Sender, + flash_progress: Arc>, + is_time_to_flash: Arc, } impl MyApp { pub fn new( rerun_app: re_viewer::App, - settings: Vec, + settings: Arc>>, settings_channel: mpsc::Sender, + flash_progress: Arc>, + is_time_to_flash: Arc, ) -> Self { Self { rerun_app, settings, settings_channel, + flash_progress, + is_time_to_flash, } } } @@ -63,7 +81,7 @@ impl MyApp { }); ui.separator(); - for setting in &mut self.settings { + for setting in &mut *self.settings.lock().unwrap() { if ui .add( egui::Slider::new(&mut setting.value, setting.range.clone()) @@ -75,5 +93,121 @@ impl MyApp { self.settings_channel.send(setting.clone()).unwrap(); } } + + if !self.is_time_to_flash.load(Ordering::SeqCst) && ui.button("Flash").clicked() { + self.is_time_to_flash.store(true, Ordering::SeqCst); + } + + let flash_progress = self.flash_progress.lock().unwrap(); + + for op in [ + FlashOperation::Fill, + FlashOperation::Erase, + FlashOperation::Program, + FlashOperation::Verify, + ] { + if let Some(x) = flash_progress.ops.get(&op) + && x.started + { + ui.label(format!("{op:?}: ")); + ui.add(ProgressBar::new( + x.total.map(|t| x.progress as f32 / t as f32).unwrap_or(0.0), + )); + } + } + } +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] +pub enum FlashOperation { + /// Reading back flash contents to restore erased regions that should be kept unchanged. + Fill, + + /// Erasing flash sectors. + Erase, + + /// Writing data to flash. + Program, + + /// Checking flash contents. + Verify, + + /// Writing data directly to RAM. + Ram, +} + +impl From for FlashOperation { + fn from(value: probe_rs::flashing::ProgressOperation) -> Self { + match value { + ProgressOperation::Fill => FlashOperation::Fill, + ProgressOperation::Erase => FlashOperation::Erase, + ProgressOperation::Program => FlashOperation::Program, + ProgressOperation::Verify => FlashOperation::Verify, + ProgressOperation::Ram => FlashOperation::Ram, + } + } +} + +pub struct FlashOperationProgress { + total: Option, + progress: u64, + started: bool, +} + +impl FlashOperationProgress { + fn new(total: Option) -> Self { + Self { + total, + progress: 0, + started: false, + } + } +} + +#[derive(Default)] +pub struct FlashProgress { + ops: HashMap, + err: Option, +} + +impl FlashProgress { + pub fn new() -> Self { + Self::default() + } + + pub fn reset(&mut self) { + self.ops.clear(); + self.err = None; + } + + pub fn update(&mut self, evnt: ProgressEvent) { + match evnt { + ProgressEvent::FlashLayoutReady { .. } => (), + + ProgressEvent::AddProgressBar { operation, total } => { + let _ = self + .ops + .insert(operation.into(), FlashOperationProgress::new(total)); + } + ProgressEvent::Started(operation) => { + self.ops.get_mut(&operation.into()).unwrap().started = true + } + ProgressEvent::Progress { + operation, + size, + time: _, + } => { + self.ops.get_mut(&operation.into()).unwrap().progress = size; + } + + ProgressEvent::Failed(e) => { + self.err = Some(format!("Flash failed: {e:?}")); + } + ProgressEvent::Finished(operation) => { + let op = self.ops.get_mut(&operation.into()).unwrap(); + op.progress = op.total.unwrap_or(1); + } + ProgressEvent::DiagnosticMessage { .. } => (), + } } } diff --git a/probe-plotter-tools/src/lib.rs b/probe-plotter-tools/src/lib.rs index afd2a41..faacb47 100644 --- a/probe-plotter-tools/src/lib.rs +++ b/probe-plotter-tools/src/lib.rs @@ -2,7 +2,15 @@ pub mod gui; pub mod metric; pub mod setting; -use std::{io::Read, sync::mpsc, time::Duration}; +use std::{ + io::Read, + sync::{ + Arc, Mutex, + atomic::{AtomicBool, Ordering}, + mpsc, + }, + time::Duration, +}; use defmt_decoder::DecodeError; use defmt_parser::Level; @@ -15,7 +23,7 @@ use probe_rs::{ Core, MemoryInterface, rtt::{self, ChannelMode, Rtt}, }; -use rerun::TextLogLevel; +use rerun::{RecordingStream, TextLogLevel}; use shunting::{MathContext, RPNExpr, ShuntingParser}; use crate::{metric::Metric, setting::Setting}; @@ -138,7 +146,7 @@ pub fn parse(elf_bytes: &[u8]) -> (Vec, Vec, rtt::ScanRegion) { let name = rustc_demangle::demangle(name).to_string(); - eprintln!(" {name}"); + //eprintln!(" {name}"); //eprintln!("symbol: {name:?}: {entry:?}"); @@ -252,19 +260,24 @@ pub fn parse_elf_file(elf_path: &str) -> (Vec, Vec, rtt::ScanRe /// * writing updated settings #[allow(clippy::too_many_arguments)] pub fn probe_background_thread( + core: &mut Core<'_>, update_rate: Duration, channel_mode: Option, - target: &str, elf_bytes: &[u8], - mut settings: Vec, + settings: Arc>>, mut metrics: Vec, scan_region: rtt::ScanRegion, - settings_update_receiver: mpsc::Receiver, - initial_settings_sender: mpsc::Sender>, + settings_update_receiver: &mut mpsc::Receiver, + rec: RecordingStream, + done: &AtomicBool, ) { - let mut session = probe_rs::Session::auto_attach(target, Default::default()).unwrap(); - let mut core = session.core(0).unwrap(); - let mut rtt = Rtt::attach_region(&mut core, &scan_region).unwrap(); + let mut rtt = match Rtt::attach_region(core, &scan_region) { + Ok(rtt) => rtt, + Err(e) => { + eprintln!("RTT failed to attach: {e:?}"); + return; + } + }; let table = defmt_decoder::Table::parse(elf_bytes).unwrap().unwrap(); // TODO: Get this to work @@ -294,10 +307,6 @@ pub fn probe_background_thread( is_timestamp_available: has_timestamp && show_timestamps, });*/ - let rec = rerun::RecordingStreamBuilder::new("probe-plotter") - .spawn() - .unwrap(); - let locs = match table.get_locations(elf_bytes) { Ok(locs) if locs.is_empty() => { rec.log( @@ -333,7 +342,7 @@ pub fn probe_background_thread( if let Some(channel_mode) = channel_mode { for ch in &mut rtt.up_channels { - ch.set_mode(&mut core, channel_mode).unwrap(); + ch.set_mode(core, channel_mode).unwrap(); } } @@ -344,24 +353,21 @@ pub fn probe_background_thread( .collect(); // Load initial values from device - for setting in &mut settings { - setting.read(&mut core).unwrap(); + for setting in &mut *settings.lock().unwrap() { + setting.read(core).unwrap(); } - // Send initial settings back to main thread - initial_settings_sender.send(settings).unwrap(); - let mut math_ctx = MathContext::new(); - loop { + while !done.load(Ordering::SeqCst) { for mut setting in settings_update_receiver.try_iter() { - setting.write(setting.value, &mut core).unwrap(); + setting.write(setting.value, core).unwrap(); } - receive_defmt_messages(&mut rtt, &mut core, &mut decoders); + receive_defmt_messages(&mut rtt, core, &mut decoders); log_defmt_messages(&rec, &locs, &mut decoders); for m in &mut metrics { - m.read(&mut core, &mut math_ctx).unwrap(); + m.read(core, &mut math_ctx).unwrap(); if let Some((x, _s)) = m.compute(&mut math_ctx) { rec.log(m.name.clone(), &rerun::Scalars::single(x)).unwrap(); } @@ -402,7 +408,7 @@ pub fn log_defmt_messages<'a>( ) { loop { let mut has_decoded = false; - for decoder in &mut *decoders { + for (ch, decoder) in decoders.iter_mut().enumerate() { let frame = match decoder.decode() { Ok(f) => f, Err(DecodeError::UnexpectedEof) => continue, @@ -446,7 +452,10 @@ pub fn log_defmt_messages<'a>( }; //let msg = formatter.format_frame(frame, Some(&file), line, module); - let msg = format!("{module} :: {} {file}:{line}", frame.display(false)); + let msg = format!( + "[ch{ch}] {module} :: {} {file}:{line}", + frame.display(false) + ); rec.log("log", &rerun::TextLog::new(msg).with_level(level)) .unwrap();