Struct probe_rs_target::Chip

source ·
pub struct Chip {
    pub name: String,
    pub part: Option<u16>,
    pub svd: Option<String>,
    pub cores: Vec<Core>,
    pub memory_map: Vec<MemoryRegion>,
    pub flash_algorithms: Vec<String>,
    pub rtt_scan_ranges: Option<Vec<Range<u64>>>,
    pub jtag: Option<Jtag>,
    pub default_binary_format: Option<BinaryFormat>,
}
Expand description

A single chip variant.

This describes an exact chip variant, including the cores, flash and memory size. For example, the nRF52832 chip has two variants, nRF52832_xxAA and nRF52832_xxBB. For this case, the struct will correspond to one of the variants, e.g. nRF52832_xxAA.

Fields§

§name: String

This is the name of the chip in base form. E.g. nRF52832.

§part: Option<u16>

The PART register of the chip. This value can be determined via the cli info command.

§svd: Option<String>

An URL to the SVD file for this chip.

§cores: Vec<Core>

The cores available on the chip.

§memory_map: Vec<MemoryRegion>

The memory regions available on the chip.

§flash_algorithms: Vec<String>

Names of all flash algorithms available for this chip.

This can be used to look up the flash algorithm in the ChipFamily::flash_algorithms field.

§rtt_scan_ranges: Option<Vec<Range<u64>>>

Specific memory ranges to search for a dynamic RTT header for code running on this chip.

This need not be specified for most chips because the default is to search all RAM regions specified in memory_map. However, that behavior isn’t appropriate for some chips, such as those which have a very large amount of RAM that would be time-consuming to scan exhaustively.

If specified then this is a list of zero or more address ranges to scan. Each address range must be enclosed in exactly one RAM region from memory_map. An empty list disables automatic scanning altogether, in which case RTT will be enabled only when using an executable image that includes the _SEGGER_RTT symbol pointing to the exact address of the RTT header.

§jtag: Option<Jtag>

JTAG-specific options

§default_binary_format: Option<BinaryFormat>

The default binary format for this chip

Implementations§

source§

impl Chip

source

pub fn generic_arm(name: &str, core_type: CoreType) -> Self

Create a generic chip with the given name, a single core, and no flash algorithm or memory map. Used to create generic targets.

Trait Implementations§

source§

impl Clone for Chip

source§

fn clone(&self) -> Chip

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 Chip

source§

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

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

impl<'de> Deserialize<'de> for Chip

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 Serialize for Chip

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

Auto Trait Implementations§

§

impl RefUnwindSafe for Chip

§

impl Send for Chip

§

impl Sync for Chip

§

impl Unpin for Chip

§

impl UnwindSafe for Chip

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