pub struct RawFlashAlgorithm {
Show 17 fields pub name: String, pub description: String, pub default: bool, pub instructions: Vec<u8>, pub load_address: Option<u64>, pub data_load_address: Option<u64>, pub pc_init: Option<u64>, pub pc_uninit: Option<u64>, pub pc_program_page: u64, pub pc_erase_sector: u64, pub pc_erase_all: Option<u64>, pub data_section_offset: u64, pub rtt_location: Option<u64>, pub flash_properties: FlashProperties, pub cores: Vec<String>, pub stack_size: Option<u32>, pub transfer_encoding: Option<TransferEncoding>,
}
Expand description

The raw flash algorithm is the description of a flash algorithm, and is usually read from a target description file.

Before it can be used for flashing, it has to be assembled for a specific chip, by determining the RAM addresses which are used when flashing. This process is done in the main probe-rs library.

Fields§

§name: String

The name of the flash algorithm.

§description: String

The description of the algorithm.

§default: bool

Whether this flash algorithm is the default one or not.

§instructions: Vec<u8>

List of 32-bit words containing the code for the algo. If load_address is not specified, the code must be position independent (PIC).

§load_address: Option<u64>

Address to load algo into RAM. Optional.

§data_load_address: Option<u64>

Address to load data into RAM. Optional.

§pc_init: Option<u64>

Address of the Init() entry point. Optional.

§pc_uninit: Option<u64>

Address of the UnInit() entry point. Optional.

§pc_program_page: u64

Address of the ProgramPage() entry point.

§pc_erase_sector: u64

Address of the EraseSector() entry point.

§pc_erase_all: Option<u64>

Address of the EraseAll() entry point. Optional.

§data_section_offset: u64

The offset from the start of RAM to the data section.

§rtt_location: Option<u64>

Location of the RTT control block in RAM.

If this is set, the flash algorithm supports RTT output and debug messages will be read over RTT.

§flash_properties: FlashProperties

The properties of the flash on the device.

§cores: Vec<String>

List of cores that can use this algorithm

§stack_size: Option<u32>

The flash algorithm’s stack size, in bytes.

If not set, probe-rs selects a default value. Increase this value if you’re concerned about stack overruns during flashing.

§transfer_encoding: Option<TransferEncoding>

The encoding format accepted by the flash algorithm.

Trait Implementations§

source§

impl Clone for RawFlashAlgorithm

source§

fn clone(&self) -> RawFlashAlgorithm

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for RawFlashAlgorithm

source§

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

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

impl Default for RawFlashAlgorithm

source§

fn default() -> RawFlashAlgorithm

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

impl<'de> Deserialize<'de> for RawFlashAlgorithm

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 Hash for RawFlashAlgorithm

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for RawFlashAlgorithm

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for RawFlashAlgorithm

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 Eq for RawFlashAlgorithm

source§

impl StructuralPartialEq for RawFlashAlgorithm

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> 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,

§

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>,

§

type Error = Infallible

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>,

§

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.
source§

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