From c265d84c20e53b2836506bad5eef1d8bc1a450d8 Mon Sep 17 00:00:00 2001 From: George Cosma Date: Wed, 18 Jan 2023 19:35:36 +0200 Subject: [PATCH 1/5] Imported clap package, and added it as a depedency --- rust/Cargo.lock | 224 ++++++++++++++++++++++++++++++++++++++++++++++++ rust/Cargo.toml | 1 + 2 files changed, 225 insertions(+) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index a5eec72..defa5df 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -2,6 +2,230 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "cc" +version = "1.0.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" + +[[package]] +name = "clap" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec7a4128863c188deefe750ac1d1dfe66c236909f845af04beed823638dc1b2" +dependencies = [ + "bitflags", + "clap_lex", + "is-terminal", + "strsim", + "termcolor", +] + +[[package]] +name = "clap_lex" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "783fe232adfca04f90f56201b26d79682d4cd2625e0bc7290b95123afe558ade" +dependencies = [ + "os_str_bytes", +] + +[[package]] +name = "errno" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +dependencies = [ + "errno-dragonfly", + "libc", + "winapi", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" +dependencies = [ + "libc", +] + +[[package]] +name = "io-lifetimes" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7d6c6f8c91b4b9ed43484ad1a938e393caf35960fce7f82a040497207bd8e9e" +dependencies = [ + "libc", + "windows-sys", +] + +[[package]] +name = "is-terminal" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dfb6c8100ccc63462345b67d1bbc3679177c75ee4bf59bf29c8b1d110b8189" +dependencies = [ + "hermit-abi", + "io-lifetimes", + "rustix", + "windows-sys", +] + +[[package]] +name = "libc" +version = "0.2.139" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" + +[[package]] +name = "linux-raw-sys" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" + +[[package]] +name = "os_str_bytes" +version = "6.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" + +[[package]] +name = "rustix" +version = "0.36.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4feacf7db682c6c329c4ede12649cd36ecab0f3be5b7d74e6a20304725db4549" +dependencies = [ + "bitflags", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys", + "windows-sys", +] + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "termcolor" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +dependencies = [ + "winapi-util", +] + [[package]] name = "tockloader" version = "0.1.0" +dependencies = [ + "clap", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 9c93b89..7ef1af1 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -6,3 +6,4 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +clap = "4.1.1" From 32ebb6a1129e940a09927641e92ef7a55c82ffe6 Mon Sep 17 00:00:00 2001 From: George Cosma Date: Tue, 24 Jan 2023 11:49:15 +0200 Subject: [PATCH 2/5] added clap, and some of the arguments. Of course, none of them do anything. --- rust/Cargo.lock | 7 +++++ rust/Cargo.toml | 2 +- rust/src/cli.rs | 67 ++++++++++++++++++++++++++++++++++++++++++++++++ rust/src/main.rs | 26 ++++++++++++++++++- 4 files changed, 100 insertions(+), 2 deletions(-) create mode 100644 rust/src/cli.rs diff --git a/rust/Cargo.lock b/rust/Cargo.lock index defa5df..306db9d 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -23,6 +23,7 @@ dependencies = [ "bitflags", "clap_lex", "is-terminal", + "once_cell", "strsim", "termcolor", ] @@ -100,6 +101,12 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +[[package]] +name = "once_cell" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" + [[package]] name = "os_str_bytes" version = "6.4.1" diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 7ef1af1..59905e5 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -6,4 +6,4 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -clap = "4.1.1" +clap = { version = "4.1.1", features = ["cargo"] } diff --git a/rust/src/cli.rs b/rust/src/cli.rs new file mode 100644 index 0000000..efe2186 --- /dev/null +++ b/rust/src/cli.rs @@ -0,0 +1,67 @@ +use clap::{arg, crate_version, Command}; + +pub fn make_cli() -> Command { + Command::new("tockloader") + .about("This is a sample description.") + .version(crate_version!()) + .arg_required_else_help(true) + .subcommands(get_subcommands()) + .args([ + arg!(--debug "Print additional debugging information").action(clap::ArgAction::SetTrue) + ]) +} + +fn get_subcommands() -> Vec { + vec![Command::new("listen") + .about("Open a terminal to receive UART data") + .args(get_app_args()) + .args(get_channel_args()) + .arg_required_else_help(true)] +} + +fn get_app_args() -> Vec { + vec![ + arg!(-a --"app-address"
"Address where apps are located"), + arg!(--force "Allow apps on boards that are not listed as compatible") + .action(clap::ArgAction::SetTrue), + arg!(--"bundle-apps" "Concatenate apps and flash all together, re-flashing apps as needed") + .action(clap::ArgAction::SetTrue), + ] +} + +fn get_channel_args() -> Vec { + vec![ + arg!(-p --port "The serial port or device name to use"), + arg!(--serial "Use the serial bootloader to flash") + .action(clap::ArgAction::SetTrue), + // Should we include depracated functionality? + // Other deprecated arguments are not included here, just this one. + /* arg!(--jtag "Use JTAG and JLinkExe to flash. Deprecated. Use --jlink instead") + .action(clap::ArgAction::SetTrue), */ + arg!(--jlink "Use JLinkExe to flash") + .action(clap::ArgAction::SetTrue), + arg!(--openocd "Use OpenOCD to flash") + .action(clap::ArgAction::SetTrue), + arg!(--"jlink-device" "The device type to pass to JLinkExe. Useful for initial commissioning.") + .default_value("cortex-m0"), + arg!(--"jlink-cmd" "The JLinkExe binary to invoke"), + arg!(--"jlink-speed" "The JLink speed to pass to JLinkExe"), + arg!(--"jlink-if" "The interface type to pass to JLinkExe"), + arg!(--"openocd-board" "The cfg file in OpenOCD `board` folder"), + arg!(--"openocd-cmd" "The openocd binary to invoke") + .default_value("openocd"), + // These may not work out of the box + arg!(--"openocd-options" "Tockloader-specific flags to direct how Tockloader uses OpenOCD"), + arg!(--"openocd-commands" "Directly specify which OpenOCD commands to use for \"program\", \"read\", or \"erase\" actions"), + arg!(--"flash-file" "Operate on a binary flash file instead of a proper board") + .action(clap::ArgAction::SetTrue), + arg!(--board "Explicitly specify the board that is being targeted"), + arg!(--arch "Explicitly specify the architecture of the board that is being targeted"), + arg!(--"page-size" "Explicitly specify how many bytes in a flash page") + .default_value("0"), + arg!(--"baud-rate" "If using serial, set the target baud rate") + .default_value("115200"), + arg!(--"no-bootloader-entry" "Tell Tockloader to assume the bootloader is already active") + .action(clap::ArgAction::SetTrue), + ] +} diff --git a/rust/src/main.rs b/rust/src/main.rs index e7a11a9..8048d20 100644 --- a/rust/src/main.rs +++ b/rust/src/main.rs @@ -1,3 +1,27 @@ +mod cli; +use cli::make_cli; + fn main() { - println!("Hello, world!"); + let matches = make_cli().get_matches(); + + if matches.get_flag("debug") { + println!("Debug mode enabled"); + } + + match matches.subcommand() { + Some(("listen", sub_matches)) => { + println!("Got the listen subcommand"); + let default_adr = "NONE".to_string(); + let adr = sub_matches + .get_one::("app-address") + .unwrap_or(&default_adr); + println!("{}", format!("With App Address {adr}")); + } + // If only the "--debug" flag is set, then this branch is executed + // Or, more likely at this stage, a subcommand hasn't been implemented yet. + _ => { + println!("Could not run the provided subcommand."); + _ = make_cli().print_help(); + } + } } From 2cd254ae79a360e3691c8bd92ce0da3c466ff3e8 Mon Sep 17 00:00:00 2001 From: George Cosma Date: Tue, 24 Jan 2023 12:09:37 +0200 Subject: [PATCH 3/5] Added some comments to cli.rs --- rust/src/cli.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rust/src/cli.rs b/rust/src/cli.rs index efe2186..a95d27b 100644 --- a/rust/src/cli.rs +++ b/rust/src/cli.rs @@ -1,5 +1,6 @@ use clap::{arg, crate_version, Command}; +/// Create the [command](clap::Command) object which will handle all of the command line arguments. pub fn make_cli() -> Command { Command::new("tockloader") .about("This is a sample description.") @@ -9,8 +10,11 @@ pub fn make_cli() -> Command { .args([ arg!(--debug "Print additional debugging information").action(clap::ArgAction::SetTrue) ]) + // Note: arg_require_else_help will trigger the help command if no argument/subcommand is given. + // This means that the --debug flag will not trigger the help menu, even if alone it does nothing. } +/// Generate all of the [subcommands](clap::Command) used by the program. fn get_subcommands() -> Vec { vec![Command::new("listen") .about("Open a terminal to receive UART data") @@ -19,6 +23,7 @@ fn get_subcommands() -> Vec { .arg_required_else_help(true)] } +/// Generate all of the [arguments](clap::Arg) that are required by subcommands which work with apps. fn get_app_args() -> Vec { vec![ arg!(-a --"app-address"
"Address where apps are located"), @@ -27,8 +32,11 @@ fn get_app_args() -> Vec { arg!(--"bundle-apps" "Concatenate apps and flash all together, re-flashing apps as needed") .action(clap::ArgAction::SetTrue), ] + // Note: the .action(clap::ArgAction::SetTrue) doesn't seem to be necessary, though in clap documentation it is used. } +/// Generate all of the [arguments](clap::Arg) that are required by subcommands which work +/// with channels and computer-board communication. fn get_channel_args() -> Vec { vec![ arg!(-p --port "The serial port or device name to use"), @@ -53,6 +61,7 @@ fn get_channel_args() -> Vec { // These may not work out of the box arg!(--"openocd-options" "Tockloader-specific flags to direct how Tockloader uses OpenOCD"), arg!(--"openocd-commands" "Directly specify which OpenOCD commands to use for \"program\", \"read\", or \"erase\" actions"), + // ----- arg!(--"flash-file" "Operate on a binary flash file instead of a proper board") .action(clap::ArgAction::SetTrue), arg!(--board "Explicitly specify the board that is being targeted"), From f045337fd663405587a3839cc4ecf0f6eac0d3b1 Mon Sep 17 00:00:00 2001 From: George Cosma Date: Tue, 24 Jan 2023 19:27:07 +0200 Subject: [PATCH 4/5] removed Cargo.lock and added it to .gitignore --- rust/.gitignore | 3 +- rust/Cargo.lock | 238 ------------------------------------------------ 2 files changed, 2 insertions(+), 239 deletions(-) delete mode 100644 rust/Cargo.lock diff --git a/rust/.gitignore b/rust/.gitignore index c41cc9e..9437db6 100644 --- a/rust/.gitignore +++ b/rust/.gitignore @@ -1 +1,2 @@ -/target \ No newline at end of file +/target +/Cargo.lock \ No newline at end of file diff --git a/rust/Cargo.lock b/rust/Cargo.lock deleted file mode 100644 index 306db9d..0000000 --- a/rust/Cargo.lock +++ /dev/null @@ -1,238 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "cc" -version = "1.0.78" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" - -[[package]] -name = "clap" -version = "4.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec7a4128863c188deefe750ac1d1dfe66c236909f845af04beed823638dc1b2" -dependencies = [ - "bitflags", - "clap_lex", - "is-terminal", - "once_cell", - "strsim", - "termcolor", -] - -[[package]] -name = "clap_lex" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "783fe232adfca04f90f56201b26d79682d4cd2625e0bc7290b95123afe558ade" -dependencies = [ - "os_str_bytes", -] - -[[package]] -name = "errno" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" -dependencies = [ - "errno-dragonfly", - "libc", - "winapi", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d6c6f8c91b4b9ed43484ad1a938e393caf35960fce7f82a040497207bd8e9e" -dependencies = [ - "libc", - "windows-sys", -] - -[[package]] -name = "is-terminal" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28dfb6c8100ccc63462345b67d1bbc3679177c75ee4bf59bf29c8b1d110b8189" -dependencies = [ - "hermit-abi", - "io-lifetimes", - "rustix", - "windows-sys", -] - -[[package]] -name = "libc" -version = "0.2.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" - -[[package]] -name = "linux-raw-sys" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" - -[[package]] -name = "once_cell" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" - -[[package]] -name = "os_str_bytes" -version = "6.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" - -[[package]] -name = "rustix" -version = "0.36.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4feacf7db682c6c329c4ede12649cd36ecab0f3be5b7d74e6a20304725db4549" -dependencies = [ - "bitflags", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys", - "windows-sys", -] - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "termcolor" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "tockloader" -version = "0.1.0" -dependencies = [ - "clap", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" - -[[package]] -name = "windows_i686_msvc" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" From 0e504abb685306a2afdd0c91b7fcaab18a44aec7 Mon Sep 17 00:00:00 2001 From: George Cosma Date: Tue, 24 Jan 2023 19:28:07 +0200 Subject: [PATCH 5/5] removed deprecated argument --- rust/src/cli.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/rust/src/cli.rs b/rust/src/cli.rs index a95d27b..51d4fa3 100644 --- a/rust/src/cli.rs +++ b/rust/src/cli.rs @@ -42,10 +42,6 @@ fn get_channel_args() -> Vec { arg!(-p --port "The serial port or device name to use"), arg!(--serial "Use the serial bootloader to flash") .action(clap::ArgAction::SetTrue), - // Should we include depracated functionality? - // Other deprecated arguments are not included here, just this one. - /* arg!(--jtag "Use JTAG and JLinkExe to flash. Deprecated. Use --jlink instead") - .action(clap::ArgAction::SetTrue), */ arg!(--jlink "Use JLinkExe to flash") .action(clap::ArgAction::SetTrue), arg!(--openocd "Use OpenOCD to flash")