pub enum ArmError {
Show 24 variants ArchitectureRequired(&'static [&'static str]), Timeout, AddressOutOf32BitAddressSpace, NoArmTarget, AccessPort { address: ApAddress, source: AccessPortError, }, DebugPort(DebugPortError), CoreNotHalted, ReAttachRequired, MissingPermissions(String), Dap(DapError), Probe(DebugProbeError), MemoryNotAligned { address: u64, alignment: usize, }, OutOfBounds, UnsupportedTransferWidth(usize), ApDoesNotExist(ApAddress), WrongApType, UnsupportedBreakpointAddress(u32), Armv8a(Armv8aError), Armv7a(Armv7aError), DebugSequence(ArmDebugSequenceError), TracingUnconfigured, RegisterParse(RegisterParseError), RomTable(RomTableError), ChipEraseFailed,
}
Expand description

ARM-specific errors

Variants§

§

ArchitectureRequired(&'static [&'static str])

The operation requires a specific architecture.

§

Timeout

A timeout occured during an operation

§

AddressOutOf32BitAddressSpace

The address is too large for the 32 bit address space.

§

NoArmTarget

The current target device is not an ARM device.

§

AccessPort

Fields

§address: ApAddress

Address of the access port

§source: AccessPortError

Source of the error.

Error using a specific AP.

§

DebugPort(DebugPortError)

An error occured while using a debug port.

§

CoreNotHalted

The core has to be halted for the operation, but was not.

§

ReAttachRequired

Performing certain operations (e.g device unlock or Chip-Erase) can leave the device in a state that requires a probe re-attach to resolve.

§

MissingPermissions(String)

An operation was not performed because the required permissions were not given.

This can for example happen when the core is locked and needs to be erased to be unlocked. Then the correct permission needs to be given to automatically unlock the core to prevent accidental erases.

§

Dap(DapError)

An error occured in the communication with an access port or debug port.

§

Probe(DebugProbeError)

The debug probe encountered an error.

§

MemoryNotAligned

Fields

§address: u64

The address of the register.

§alignment: usize

The required alignment in bytes (address increments).

The given register address to perform an access on was not memory aligned. Make sure it is aligned to the size of the access (address & access_size == 0).

§

OutOfBounds

A region ouside of the AP address space was accessed.

§

UnsupportedTransferWidth(usize)

The requested memory transfer width is not supported on the current core.

§

ApDoesNotExist(ApAddress)

The AP with the specified address does not exist.

§

WrongApType

The AP has the wrong type for the operation.

§

UnsupportedBreakpointAddress(u32)

It is not possible to create a breakpoint a the given address.

§

Armv8a(Armv8aError)

ARMv8a specifc erorr occured.

§

Armv7a(Armv7aError)

ARMv7a specifc erorr occured.

§

DebugSequence(ArmDebugSequenceError)

Error occured in a debug sequence.

§

TracingUnconfigured

Tracing has not been configured.

§

RegisterParse(RegisterParseError)

Error parsing a register.

§

RomTable(RomTableError)

Error reading ROM table.

§

ChipEraseFailed

Failed to erase chip

Implementations§

source§

impl ArmError

source

pub fn from_access_port(err: AccessPortError, ap: impl AccessPort) -> Self

Constructs ArmError::MemoryNotAligned from the address and the required alignment.

source

pub fn alignment_error(address: u64, alignment: usize) -> Self

Constructs a ArmError::MemoryNotAligned from the address and the required alignment.

Trait Implementations§

source§

impl Debug for ArmError

source§

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

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

impl Display for ArmError

source§

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

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

impl Error for ArmError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<ArmDebugSequenceError> for ArmError

source§

fn from(source: ArmDebugSequenceError) -> Self

Converts to this type from the input type.
source§

impl From<ArmError> for Error

source§

fn from(value: ArmError) -> Self

Converts to this type from the input type.
source§

impl From<Armv7aError> for ArmError

source§

fn from(source: Armv7aError) -> Self

Converts to this type from the input type.
source§

impl From<Armv8aError> for ArmError

source§

fn from(source: Armv8aError) -> Self

Converts to this type from the input type.
source§

impl From<ComponentError> for ArmError

source§

fn from(value: ComponentError) -> ArmError

Converts to this type from the input type.
source§

impl From<DapError> for ArmError

source§

fn from(source: DapError) -> Self

Converts to this type from the input type.
source§

impl From<DebugPortError> for ArmError

source§

fn from(source: DebugPortError) -> Self

Converts to this type from the input type.
source§

impl From<DebugProbeError> for ArmError

source§

fn from(source: DebugProbeError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

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

const: unstable · 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<E> Provider for Ewhere E: Error + ?Sized,

source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more