Skip to main content

DebugFunction

Enum DebugFunction 

Source
pub enum DebugFunction {
Show 37 variants Read8 { addr: Expression, }, Read16 { addr: Expression, }, Read32 { addr: Expression, }, Read64 { addr: Expression, }, Write8 { addr: Expression, val: Expression, }, Write16 { addr: Expression, val: Expression, }, Write32 { addr: Expression, val: Expression, }, Write64 { addr: Expression, val: Expression, }, ReadAP { addr: Expression, }, WriteAP { addr: Expression, val: Expression, }, ReadDP { addr: Expression, }, WriteDP { addr: Expression, val: Expression, }, ReadAccessAP { addr: Expression, }, WriteAccessAP { addr: Expression, val: Expression, }, DapDelay { delay: Expression, }, DapWriteAbort { value: Expression, }, DapSwjPins { pinout: Expression, pinselect: Expression, pinwait: Expression, }, DapSwjClock { val: Expression, }, DapSwjSequence { cnt: Expression, val: Expression, }, DapJtagSequence { cnt: Expression, tms: Expression, tdi: Expression, }, Sequence { name: Expression, }, Query { query_type: Expression, message: Expression, default: Expression, }, QueryValue { message: Expression, default: Expression, }, Message { msg_type: Expression, format: Expression, args: Vec<Expression>, }, FlashWriteBuffer { addr: Expression, offs: Expression, len: Expression, mode: Expression, }, FlashLoadAlgorithm { algo_path: Expression, ram_start: Expression, ram_size: Expression, }, BufferSet { buff_id: Expression, buff_offset: Expression, count: Expression, size: Expression, value: Expression, }, BufferGet { buff_id: Expression, buff_offset: Expression, size: Expression, }, BufferSize { buff_id: Expression, }, BufferRead { buff_id: Expression, buff_offset: Expression, addr: Expression, length: Expression, mode: Expression, }, BufferWrite { buff_id: Expression, buff_offset: Expression, addr: Expression, length: Expression, mode: Expression, }, BufferStreamIn { buff_id: Expression, buff_offset: Expression, length: Expression, path: Expression, mode: Expression, timeout: Expression, }, BufferStreamOut { buff_id: Expression, buff_offset: Expression, length: Expression, dest_path: Expression, dest_mode: Expression, timeout: Expression, }, RunApplication { app_path: Expression, arguments: Expression, work_directory: Expression, timeout: Expression, }, RunPythonScript { script_path: Expression, arguments: Expression, work_directory: Expression, timeout: Expression, }, FilePathExists { path: Expression, timeout: Expression, }, LoadDebugInfo { file: Expression, },
}
Expand description

A predefined PDSC debug access function.

Unknown function names are a parse error — if the spec adds new functions they will surface as panics.

Variants§

§

Read8

Read 8-bit value from target memory

Fields

§

Read16

Read 16-bit value from target memory

Fields

§

Read32

Read 32-bit value from target memory

Fields

§

Read64

Read 64-bit value from target memory

Fields

§

Write8

Write 8-bit value to target memory

Fields

§

Write16

Write 16-bit value to target memory

Fields

§

Write32

Write 32-bit value to target memory

Fields

§

Write64

Write 64-bit value to target memory

Fields

§

ReadAP

Read access port register

Fields

§

WriteAP

Write access port register

Fields

§

ReadDP

Read debug port register

Fields

§

WriteDP

Write debug port register

Fields

§

ReadAccessAP

APv2/ADIv6 access port read

Fields

§

WriteAccessAP

APv2/ADIv6 access port write

Fields

§

DapDelay

Wait for a specific delay (microseconds)

Fields

§

DapWriteAbort

Write abort request to CoreSight register

Fields

§

DapSwjPins

Monitor and control debugger I/O pins

Fields

§pinout: Expression
§pinselect: Expression
§pinwait: Expression
§

DapSwjClock

Set JTAG/SWD clock frequency (Hz)

Fields

§

DapSwjSequence

Generate SWJ sequences

Fields

§

DapJtagSequence

Generate JTAG sequences

§

Sequence

Execute a debug access sequence by name

Fields

§

Query

Prompt user for confirmation or selection

Fields

§query_type: Expression
§message: Expression
§default: Expression
§

QueryValue

Query an input value from the user

Fields

§message: Expression
§default: Expression
§

Message

Output a formatted message to the debug log (variadic: msg_type, format, then optional extra args)

Fields

§msg_type: Expression
§format: Expression
§

FlashWriteBuffer

Write flash buffer contents into target memory

§

FlashLoadAlgorithm

Select FLM flash algorithm for operations

Fields

§algo_path: Expression
§ram_start: Expression
§ram_size: Expression
§

BufferSet

Fill buffer with a value pattern

Fields

§buff_id: Expression
§buff_offset: Expression
§

BufferGet

Retrieve an item from a buffer

Fields

§buff_id: Expression
§buff_offset: Expression
§

BufferSize

Get current buffer size in bytes

Fields

§buff_id: Expression
§

BufferRead

Read target data into a buffer

Fields

§buff_id: Expression
§buff_offset: Expression
§length: Expression
§

BufferWrite

Transfer buffer data to target

Fields

§buff_id: Expression
§buff_offset: Expression
§length: Expression
§

BufferStreamIn

Stream data from an external source into a buffer

Fields

§buff_id: Expression
§buff_offset: Expression
§length: Expression
§timeout: Expression
§

BufferStreamOut

Transfer buffer data to an external sink

Fields

§buff_id: Expression
§buff_offset: Expression
§length: Expression
§dest_path: Expression
§dest_mode: Expression
§timeout: Expression
§

RunApplication

Execute an external application

Fields

§app_path: Expression
§arguments: Expression
§work_directory: Expression
§timeout: Expression
§

RunPythonScript

Run a Python script on the host system

Fields

§script_path: Expression
§arguments: Expression
§work_directory: Expression
§timeout: Expression
§

FilePathExists

Check if a path exists on the host filesystem

Fields

§timeout: Expression
§

LoadDebugInfo

Load DWARF debug information

Fields

Trait Implementations§

Source§

impl Clone for DebugFunction

Source§

fn clone(&self) -> DebugFunction

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DebugFunction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for DebugFunction

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for DebugFunction

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for DebugFunction

Source§

impl PartialEq for DebugFunction

Source§

fn eq(&self, other: &DebugFunction) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for DebugFunction

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for DebugFunction

Source§

impl TryFrom<(String, Vec<Expression>)> for DebugFunction

Source§

fn try_from( (name, args): (String, Vec<Expression>), ) -> Result<Self, Self::Error>

Parses a debug access function by name and argument list.

Returns Err if the function name is not in the CMSIS-Pack spec or the argument count is wrong.

Source§

type Error = DebugAccessParseError

The type returned in the event of a conversion error.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.