From 26fb4f5f566fb8afca4247c542f262819b34e779 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Fri, 28 Aug 2020 16:04:07 +0200 Subject: [PATCH] Document CLI --- src/main.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index e1e889e4..e3eab171 100644 --- a/src/main.rs +++ b/src/main.rs @@ -36,20 +36,29 @@ fn main() -> Result<(), anyhow::Error> { notmain().map(|code| process::exit(code)) } +/// A Cargo runner for microcontrollers. #[derive(StructOpt)] #[structopt(name = "probe-run")] struct Opts { + /// List supported chips and exit. #[structopt(long)] list_chips: bool, + + /// Enable defmt decoding. #[cfg(feature = "defmt")] #[structopt(long, conflicts_with = "no_flash")] defmt: bool, + + /// The chip to program. #[structopt(long, required_unless("list-chips"))] chip: Option, + + /// Path to an ELF firmware file. #[structopt(name = "ELF", parse(from_os_str), required_unless("list-chips"))] elf: Option, + + /// Skip writing the application binary to flash. #[structopt(long, conflicts_with = "defmt")] - /// Skip writing the application binary to flash no_flash: bool, }