From 03ba501405abf23021f36dfc67711567551b5036 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Tue, 18 May 2021 18:18:17 +0200 Subject: [PATCH] Update to probe-rs git --- Cargo.lock | 257 ++++++++++++++++++++++++++-------------------------- Cargo.toml | 4 + src/main.rs | 10 +- 3 files changed, 137 insertions(+), 134 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 74c683d8..7cc9d931 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,8 +10,8 @@ checksum = "a55f82cfe485775d02112886f4169bde0c5894d75e79ead7eafe7e40a25e45f7" dependencies = [ "cpp_demangle", "fallible-iterator", - "gimli", - "object", + "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" @@ -79,6 +75,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" @@ -91,6 +96,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" @@ -165,10 +204,10 @@ dependencies = [ "colored", "defmt-parser", "difference", - "gimli", + "gimli 0.23.0", "leb128", "log", - "object", + "object 0.22.0", "ryu", "semver", "serde", @@ -215,18 +254,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" @@ -239,6 +266,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" @@ -251,21 +284,20 @@ dependencies = [ ] [[package]] -name = "glob" -version = "0.3.0" +name = "gimli" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" +checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189" +dependencies = [ + "fallible-iterator", + "stable_deref_trait", +] [[package]] -name = "goblin" -version = "0.2.3" +name = "glob" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d20fd25aa456527ce4f544271ae4fea65d2eda4a6561ea56f39fb3ee4f7e3884" -dependencies = [ - "log", - "plain", - "scroll", -] +checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" [[package]] name = "hashbrown" @@ -318,6 +350,26 @@ dependencies = [ "hashbrown", ] +[[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" @@ -327,8 +379,7 @@ checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" [[package]] name = "jaylink" version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e04098e968466cf76f8e5f34f890a3dfde1571aa9df80a3b229c3b002425c859" +source = "git+https://github.com/jonas-schievink/jaylink#546331c3e8873630c1e73d9190c69dff5bec638f" dependencies = [ "bitflags", "byteorder", @@ -363,37 +414,15 @@ version = "0.2.94" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18794a8ad5b29321f790b55d93dfba91e125cb1a9edbd4f8e3150acc771c1a5e" -[[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", ] @@ -441,6 +470,12 @@ dependencies = [ "wasmparser", ] +[[package]] +name = "object" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5b3dd1c072ee7963717671d1ca129f1048fda25edea6b752bfc71ac8854170" + [[package]] name = "pest" version = "2.1.3" @@ -456,37 +491,34 @@ 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 = "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#0d72f8c247df422727fc8d3986455bf9890fdf94" 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", - "probe-rs-t2rust", + "object 0.24.0", + "probe-rs-target", "rusb", "scroll", "serde", "serde_yaml", + "static_assertions", "svg", "thiserror", ] @@ -494,8 +526,7 @@ dependencies = [ [[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", @@ -504,16 +535,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.1.0" +source = "git+https://github.com/probe-rs/probe-rs.git#0d72f8c247df422727fc8d3986455bf9890fdf94" dependencies = [ "base64", - "proc-macro2", - "quote", - "scroll", - "serde_yaml", + "jep106", + "serde", ] [[package]] @@ -528,10 +556,10 @@ dependencies = [ "defmt-decoder", "difference", "either", - "gimli", + "gimli 0.23.0", "hidapi", "log", - "object", + "object 0.22.0", "probe-rs", "probe-rs-rtt", "rustc-demangle", @@ -582,25 +610,16 @@ dependencies = [ ] [[package]] -name = "redox_syscall" -version = "0.2.8" +name = "radium" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "742739e41cd49414de871ea5e549afb7e2a3ac77b589bcbebe8c82fab37147fc" -dependencies = [ - "bitflags", -] - -[[package]] -name = "rle-decode-fast" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cabe4fa914dec5870285fa7f71f602645da47c486e68486d2b4ceb4a343e90ac" +checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8" [[package]] name = "rusb" -version = "0.6.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f32cd45962594f9f8cd4547b5757132715600e2c8840aa9ccd3d1a9ed6fdc6" +checksum = "12f3264859095257507e4c011ab420ff9b2d9cc3349c6c08a1d3a019260bb437" dependencies = [ "libc", "libusb1-sys", @@ -623,20 +642,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" @@ -730,6 +735,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" @@ -762,9 +773,9 @@ dependencies = [ [[package]] name = "svg" -version = "0.8.2" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bdb25a4593d6656239319426f4025f7a658157e25e89f0e0319d7516d46042d" +checksum = "a95656b5b37251de210aa2751d538b6f31ce375bacf725a32223bfa6344e0776" [[package]] name = "syn" @@ -778,15 +789,10 @@ dependencies = [ ] [[package]] -name = "tar" -version = "0.4.33" +name = "tap" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0bcfbd6a598361fda270d82469fff3d65089dc33e175c9a131f7b4cd395f228" -dependencies = [ - "filetime", - "libc", - "xattr", -] +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "textwrap" @@ -888,13 +894,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 a7b9034f..86d6d791 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,3 +29,7 @@ rustc-demangle = "0.1.19" signal-hook = "0.3.8" structopt = "0.3.21" hidapi = "1.2.6" + +[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"} diff --git a/src/main.rs b/src/main.rs index c3e2ef97..dfc1b8f3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -25,11 +25,7 @@ use object::{ read::{File as ElfFile, Object as _, ObjectSection as _}, ObjectSegment, ObjectSymbol, SymbolSection, }; -use probe_rs::{ - config::{registry, MemoryRegion}, - flashing::{self, Format}, - DebugProbeInfo, MemoryInterface, Probe, Session, -}; +use probe_rs::{DebugProbeInfo, MemoryInterface, Probe, Session, config::{MemoryRegion, families}, flashing::{self, Format}}; use probe_rs_rtt::{Rtt, ScanRegion, UpChannel}; use signal_hook::consts::signal; use structopt::{clap::AppSettings, StructOpt}; @@ -141,7 +137,7 @@ fn notmain() -> anyhow::Result { let bytes = fs::read(elf_path)?; let elf = ElfFile::parse(&bytes)?; - let target = probe_rs::config::registry::get_target_by_name(chip)?; + let target = probe_rs::config::get_target_by_name(chip)?; // find and report the RAM region let mut ram_region = None; @@ -680,7 +676,7 @@ fn probes_filter(probes: &[DebugProbeInfo], selector: &ProbeFilter) -> Vec