diff --git a/Cargo.lock b/Cargo.lock index 59489830..2c5f16c3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,5 +1,7 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +version = 3 + [[package]] name = "addr2line" version = "0.14.1" @@ -8,7 +10,7 @@ checksum = "a55f82cfe485775d02112886f4169bde0c5894d75e79ead7eafe7e40a25e45f7" dependencies = [ "cpp_demangle", "fallible-iterator", - "gimli", + "gimli 0.23.0", "object 0.22.0", "rustc-demangle", "smallvec", @@ -20,12 +22,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "adler32" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" - [[package]] name = "ansi_term" version = "0.11.0" @@ -73,6 +69,15 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + [[package]] name = "bitfield" version = "0.13.2" @@ -85,6 +90,40 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +[[package]] +name = "bitmatch" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a53e105d41966c9b4594b8e3b7cf8e81ae63cc83664880b049af8a11381a3ad" +dependencies = [ + "boolean_expression", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "bitvec" +version = "0.19.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8942c8d352ae1838c9dda0b0ca2ab657696ef2232a20147cf1b30ae1a9cb4321" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "boolean_expression" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c33ef624481a2d2252fd352266c050e83203343d0884622f7ba09782abbfa83" +dependencies = [ + "itertools", + "smallvec", +] + [[package]] name = "byteorder" version = "1.4.3" @@ -183,7 +222,7 @@ dependencies = [ "colored", "defmt-parser", "difference", - "gimli", + "gimli 0.23.0", "leb128", "log", "object 0.23.0", @@ -246,18 +285,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" -[[package]] -name = "filetime" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d34cfa13a63ae058bfa601fe9e313bbdb3746427c1459185464ce0fcf62e1e8" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "winapi", -] - [[package]] name = "flate2" version = "1.0.20" @@ -270,6 +297,12 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "funty" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" + [[package]] name = "gimli" version = "0.23.0" @@ -281,6 +314,16 @@ dependencies = [ "stable_deref_trait", ] +[[package]] +name = "gimli" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189" +dependencies = [ + "fallible-iterator", + "stable_deref_trait", +] + [[package]] name = "git-version" version = "0.3.4" @@ -309,17 +352,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" -[[package]] -name = "goblin" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d20fd25aa456527ce4f544271ae4fea65d2eda4a6561ea56f39fb3ee4f7e3884" -dependencies = [ - "log", - "plain", - "scroll", -] - [[package]] name = "hashbrown" version = "0.9.1" @@ -386,6 +418,26 @@ dependencies = [ "uuid", ] +[[package]] +name = "itertools" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" +dependencies = [ + "either", +] + +[[package]] +name = "itm-decode" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd02c370de5bcaf5f1206dda960c8ec6425c4f3862d7c654a1b4f75f6678300f" +dependencies = [ + "bitmatch", + "bitvec", + "funty", +] + [[package]] name = "itoa" version = "0.4.7" @@ -394,9 +446,9 @@ checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" [[package]] name = "jaylink" -version = "0.1.5" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e04098e968466cf76f8e5f34f890a3dfde1571aa9df80a3b229c3b002425c859" +checksum = "3f58b72b6aa9d25083b8c19d292fe015a936185fa200d15e225e1524a18222e9" dependencies = [ "bitflags", "byteorder", @@ -431,37 +483,15 @@ version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12b8adadd720df158f4d70dfe7ccc6adb0472d7c55ca83445f6a5ab3e36f8fb6" -[[package]] -name = "libflate" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d87eae36b3f680f7f01645121b782798b56ef33c53f83d1c66ba3a22b60bfe3" -dependencies = [ - "adler32", - "crc32fast", - "libflate_lz77", -] - -[[package]] -name = "libflate_lz77" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39a734c0493409afcd49deee13c006a04e3586b9761a03543c6272c9c51f2f5a" -dependencies = [ - "rle-decode-fast", -] - [[package]] name = "libusb1-sys" -version = "0.4.4" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be241693102a24766d0b8526c8988771edac2842630d7e730f8e9fbc014f3703" +checksum = "e22e89d08bbe6816c6c5d446203b859eba35b8fa94bf1b7edb2f6d25d43f023f" dependencies = [ "cc", "libc", - "libflate", "pkg-config", - "tar", "vcpkg", ] @@ -480,6 +510,12 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "memchr" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b16bd47d9e329435e309c58469fe0791c2d0d1ba96ec0954152a5ae2b04387dc" + [[package]] name = "miniz_oxide" version = "0.4.4" @@ -515,6 +551,21 @@ version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9a7ab5d64814df0fe4a4b5ead45ed6c5f181ee3ff04ba344313a6c80446c5d4" +[[package]] +name = "object" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a38f2be3697a57b4060074ff41b44c16870d916ad7877c17696e063257482bc7" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" + [[package]] name = "os_pipe" version = "0.9.2" @@ -549,12 +600,6 @@ version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" -[[package]] -name = "plain" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" - [[package]] name = "pretty_assertions" version = "0.7.2" @@ -570,37 +615,40 @@ dependencies = [ [[package]] name = "probe-rs" version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f86f2646785d3d52887b1212ce05e5b58be9a02a5fd8690c1a24042899c30c0" +source = "git+https://github.com/probe-rs/probe-rs.git#09c52d782f65f90c081de35fe9281cb275aa6d53" dependencies = [ "anyhow", "base64", + "bincode", "bitfield", + "bitvec", "enum-primitive-derive", - "gimli", - "goblin", + "funty", + "gimli 0.24.0", "hidapi", "ihex", + "itm-decode", "jaylink", "jep106", - "lazy_static", "log", "num-traits", - "object 0.22.0", - "probe-rs-t2rust", + "object 0.25.3", + "once_cell", + "probe-rs-target", "rusb", "scroll", "serde", "serde_yaml", + "static_assertions", "svg", "thiserror", + "thousands", ] [[package]] name = "probe-rs-rtt" version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da12a3631895bd7c6266be38ee71937c7b3fbbe83d8e6caf88718220088909d2" +source = "git+https://github.com/probe-rs/probe-rs-rtt.git#35b51734dcf209bcaa6a30522d9dbce84e5187b2" dependencies = [ "log", "probe-rs", @@ -609,16 +657,13 @@ dependencies = [ ] [[package]] -name = "probe-rs-t2rust" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "856b6a25368ebfc253dbd0be8deb666a8a6e1d90eb630560d5f5cdcf8dc35b7f" +name = "probe-rs-target" +version = "0.10.1" +source = "git+https://github.com/probe-rs/probe-rs.git#09c52d782f65f90c081de35fe9281cb275aa6d53" dependencies = [ "base64", - "proc-macro2", - "quote", - "scroll", - "serde_yaml", + "jep106", + "serde", ] [[package]] @@ -632,7 +677,7 @@ dependencies = [ "defmt-decoder", "difference", "either", - "gimli", + "gimli 0.23.0", "git-version", "hidapi", "insta", @@ -697,19 +742,10 @@ dependencies = [ ] [[package]] -name = "redox_syscall" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab49abadf3f9e1c4bc499e8845e152ad87d2ad2d30371841171169e9d75feee" -dependencies = [ - "bitflags", -] - -[[package]] -name = "rle-decode-fast" -version = "1.0.1" +name = "radium" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cabe4fa914dec5870285fa7f71f602645da47c486e68486d2b4ceb4a343e90ac" +checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8" [[package]] name = "rstest" @@ -726,9 +762,9 @@ dependencies = [ [[package]] name = "rusb" -version = "0.6.5" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f32cd45962594f9f8cd4547b5757132715600e2c8840aa9ccd3d1a9ed6fdc6" +checksum = "d9a5084628cc5be77b1c750b3e5ee0cc519d2f2491b3f06b78b3aac3328b00ad" dependencies = [ "libc", "libusb1-sys", @@ -760,20 +796,6 @@ name = "scroll" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fda28d4b4830b807a8b43f7b0e6b5df875311b3e7621d84577188c175b6ec1ec" -dependencies = [ - "scroll_derive", -] - -[[package]] -name = "scroll_derive" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaaae8f38bb311444cfb7f1979af0bc9240d95795f75f9ceddf6a59b79ceffa0" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] [[package]] name = "semver" @@ -879,6 +901,12 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + [[package]] name = "strsim" version = "0.8.0" @@ -911,9 +939,9 @@ dependencies = [ [[package]] name = "svg" -version = "0.8.2" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bdb25a4593d6656239319426f4025f7a658157e25e89f0e0319d7516d46042d" +checksum = "fa661b18f861c4511c2f2d9665838e367f6dcefda65e0ade2384b7915344a832" [[package]] name = "syn" @@ -927,15 +955,10 @@ dependencies = [ ] [[package]] -name = "tar" -version = "0.4.35" +name = "tap" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d779dc6aeff029314570f666ec83f19df7280bb36ef338442cfa8c604021b80" -dependencies = [ - "filetime", - "libc", - "xattr", -] +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "terminal_size" @@ -976,6 +999,12 @@ dependencies = [ "syn", ] +[[package]] +name = "thousands" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bf63baf9f5039dadc247375c29eb13706706cfde997d0330d05aa63a77d8820" + [[package]] name = "ucd-trie" version = "0.1.3" @@ -1053,13 +1082,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "xattr" -version = "0.2.2" +name = "wyz" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c" -dependencies = [ - "libc", -] +checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" [[package]] name = "yaml-rust" diff --git a/Cargo.toml b/Cargo.toml index b00ae703..bc0deb64 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,3 +35,7 @@ insta = "1.7" os_pipe = "0.9" pretty_assertions = "0.7" rstest = "0.10" + +[patch.crates-io] +probe-rs-rtt = { git = "https://github.com/probe-rs/probe-rs-rtt.git" } +probe-rs = { git = "https://github.com/probe-rs/probe-rs.git"} \ No newline at end of file diff --git a/src/cli.rs b/src/cli.rs index ac410bf8..dec38708 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -3,7 +3,7 @@ use std::path::PathBuf; use defmt_decoder::DEFMT_VERSION; use git_version::git_version; use log::Level; -use probe_rs::{config::registry, Probe}; +use probe_rs::{config, Probe}; use structopt::{clap::AppSettings, StructOpt}; use crate::probe; @@ -111,7 +111,7 @@ pub(crate) fn handle_arguments() -> anyhow::Result { } fn print_chips() { - let registry = registry::families().expect("Could not retrieve chip family registry"); + let registry = config::families().expect("Could not retrieve chip family registry"); for chip_family in registry { println!("{}\n Variants:", chip_family.name); for variant in chip_family.variants.iter() { diff --git a/src/target_info.rs b/src/target_info.rs index 5e695fc0..6b3ac00a 100644 --- a/src/target_info.rs +++ b/src/target_info.rs @@ -14,7 +14,7 @@ pub(crate) struct TargetInfo { impl TargetInfo { pub(crate) fn new(chip: &str, elf: &Elf) -> anyhow::Result { - let probe_target = probe_rs::config::registry::get_target_by_name(chip)?; + let probe_target = probe_rs::config::get_target_by_name(chip)?; let active_ram_region = extract_active_ram_region(&probe_target, elf.vector_table.initial_stack_pointer); let highest_static_var_address =