Struct probe_rs_cli_util::common_options::ProbeOptions
source · [−]pub struct ProbeOptions {
pub chip: Option<String>,
pub chip_description_path: Option<PathBuf>,
pub protocol: Option<WireProtocol>,
pub probe_selector: Option<DebugProbeSelector>,
pub speed: Option<u32>,
pub connect_under_reset: bool,
pub dry_run: bool,
pub allow_erase_all: bool,
}Expand description
Common options and logic when interfacing with a Probe.
Fields
chip: Option<String>chip_description_path: Option<PathBuf>protocol: Option<WireProtocol>Protocol used to connect to chip. Possible options: [swd, jtag]
probe_selector: Option<DebugProbeSelector>Use this flag to select a specific probe in the list.
Use ‘–probe VID:PID’ or ‘–probe VID:PID:Serial’ if you have more than one probe with the same VID:PID.“,
speed: Option<u32>connect_under_reset: booldry_run: boolallow_erase_all: boolImplementations
sourceimpl ProbeOptions
impl ProbeOptions
sourcepub fn maybe_load_chip_desc(&self) -> Result<(), OperationError>
pub fn maybe_load_chip_desc(&self) -> Result<(), OperationError>
Add targets contained in file given by –chip-description-path to probe-rs registery.
Note: should be called before FlashOptions::early_exit and any other functions in ProbeOptions.
sourcepub fn get_target_selector(&self) -> Result<TargetSelector, OperationError>
pub fn get_target_selector(&self) -> Result<TargetSelector, OperationError>
Resolves a resultant target selector from passed ProbeOptions.
sourcepub fn attach_probe(&self) -> Result<Probe, OperationError>
pub fn attach_probe(&self) -> Result<Probe, OperationError>
Attaches to specified probe and configures it.
sourcepub fn attach_session(
&self,
probe: Probe,
target: TargetSelector
) -> Result<Session, OperationError>
pub fn attach_session(
&self,
probe: Probe,
target: TargetSelector
) -> Result<Session, OperationError>
Attaches to target device session. Attaches under reset if specified by ProbeOptions::connect_under_reset.
sourcepub fn simple_attach(&self) -> Result<Session, OperationError>
pub fn simple_attach(&self) -> Result<Session, OperationError>
Convenience method that attaches to the specified probe, target, and target session.
sourcepub fn build_flashloader(
&self,
session: &mut Session,
elf_path: &Path
) -> Result<FlashLoader, OperationError>
pub fn build_flashloader(
&self,
session: &mut Session,
elf_path: &Path
) -> Result<FlashLoader, OperationError>
Builds a new flash loader for the given target and ELF. This will check the ELF for validity and check what pages have to be flashed etc.
Trait Implementations
sourceimpl Args for ProbeOptions
impl Args for ProbeOptions
sourceimpl CommandFactory for ProbeOptions
impl CommandFactory for ProbeOptions
sourcefn into_app_for_update<'b>() -> Command<'b>
fn into_app_for_update<'b>() -> Command<'b>
Deprecated, replaced with CommandFactory::command_for_update
sourcefn command_for_update<'help>() -> App<'help>
fn command_for_update<'help>() -> App<'help>
sourceimpl Debug for ProbeOptions
impl Debug for ProbeOptions
sourceimpl FromArgMatches for ProbeOptions
impl FromArgMatches for ProbeOptions
sourcefn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
sourcefn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<Self, Error>
fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<Self, Error>
Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
sourcefn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
Assign values from ArgMatches to self.
sourcefn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error>
Assign values from ArgMatches to self.
sourceimpl Parser for ProbeOptions
impl Parser for ProbeOptions
sourcefn parse_from<I, T>(itr: I) -> Self where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn parse_from<I, T>(itr: I) -> Self where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
Parse from iterator, exit on error
sourcefn try_parse_from<I, T>(itr: I) -> Result<Self, Error> where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error> where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
Parse from iterator, return Err on error.
sourcefn update_from<I, T>(&mut self, itr: I) where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn update_from<I, T>(&mut self, itr: I) where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
Update from iterator, exit on error
sourcefn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error> where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error> where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
Update from iterator, return Err on error.
Auto Trait Implementations
impl RefUnwindSafe for ProbeOptions
impl Send for ProbeOptions
impl Sync for ProbeOptions
impl Unpin for ProbeOptions
impl UnwindSafe for ProbeOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more