Expand description
Collection of #[derive(StructOpt)] structs common to programs that
extend then functionality of cargo-flash.
Example usage:
use clap::Parser;
use probe_rs_cli_util::common_options::FlashOptions;
#[derive(clap::Parser)]
struct Opts {
#[clap(long = "some-opt")]
opt: String,
#[clap(flatten)]
flash_options: FlashOptions,
}
fn main() {
let opts = Opts::parse();
opts.flash_options.probe_options.maybe_load_chip_desc().unwrap();
// handle --list-{chips,probes}
if opts.flash_options.early_exit(std::io::stdout()).unwrap() {
return;
}
let target_session = opts.flash_options.probe_options.simple_attach().unwrap();
// ...
}Structs§
- Cargo
Options - Common options used when building artifacts with cargo.
- Flash
Options - Common options when flashing a target device.
- Probe
Options - Common options and logic when interfacing with a Probe.
Enums§
Functions§
- list_
connected_ probes - Lists all connected debug probes.
- print_
chip_ info - Print all the available families and their contained chips to the commandline.
- print_
families - Print all the available families and their contained chips to the commandline.