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

Common options used when building artifacts with cargo.
Common options when flashing a target device.
Common options and logic when interfacing with a Probe.

Enums

Functions

Lists all connected debug probes.
Print all the available families and their contained chips to the commandline.
Print all the available families and their contained chips to the commandline.