pub struct AsyncDebugNet<'a> { /* private fields */ }Expand description
Handle for a debug-probe net (async).
The net’s saved record is cached after first use exactly like the
blocking DebugNet (invalidated when an operation fails).
RTT streaming is not provided on the async client yet; use the blocking
DebugNet::rtt for log streaming.
Implementations§
Source§impl AsyncDebugNet<'_>
impl AsyncDebugNet<'_>
Sourcepub async fn connect(&self) -> Result<DebugConnection>
pub async fn connect(&self) -> Result<DebugConnection>
Connect to the probe with default options (starts a GDB server).
Sourcepub async fn connect_with(
&self,
opts: &ConnectOptions,
) -> Result<DebugConnection>
pub async fn connect_with( &self, opts: &ConnectOptions, ) -> Result<DebugConnection>
Connect to the probe with explicit options.
Sourcepub async fn disconnect(&self, keep_running: bool) -> Result<()>
pub async fn disconnect(&self, keep_running: bool) -> Result<()>
Disconnect. If keep_running is true the gdbserver is left running.
Sourcepub async fn reset(&self, halt: bool) -> Result<()>
pub async fn reset(&self, halt: bool) -> Result<()>
Reset the target, optionally halting at the reset vector.
Sourcepub async fn flash(&self, firmware_path: impl AsRef<Path>) -> Result<()>
pub async fn flash(&self, firmware_path: impl AsRef<Path>) -> Result<()>
Flash a firmware file, inferring type from extension.
Sourcepub async fn flash_bin(
&self,
firmware_path: impl AsRef<Path>,
address: u32,
) -> Result<()>
pub async fn flash_bin( &self, firmware_path: impl AsRef<Path>, address: u32, ) -> Result<()>
Flash a raw binary at an explicit base address.
Sourcepub async fn flash_bytes(
&self,
contents: &[u8],
kind: FirmwareKind,
address: Option<u32>,
) -> Result<()>
pub async fn flash_bytes( &self, contents: &[u8], kind: FirmwareKind, address: Option<u32>, ) -> Result<()>
Flash raw firmware bytes of a known kind.
Sourcepub async fn read_memory(&self, address: u64, length: usize) -> Result<Vec<u8>>
pub async fn read_memory(&self, address: u64, length: usize) -> Result<Vec<u8>>
Read length bytes of target memory starting at address.
Sourcepub async fn status(&self) -> Result<DebugStatus>
pub async fn status(&self) -> Result<DebugStatus>
Whether a gdbserver/daemon is currently running for this probe.
Trait Implementations§
Source§impl<'a> Clone for AsyncDebugNet<'a>
impl<'a> Clone for AsyncDebugNet<'a>
Source§fn clone(&self) -> AsyncDebugNet<'a>
fn clone(&self) -> AsyncDebugNet<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more