pub enum FlashError {
Show 23 variants NoSuitableNvm { start: u64, end: u64, description_source: TargetDescriptionSource, }, ChipEraseFailed { source: Box<dyn Error + Send + Sync + 'static>, }, EraseFailed { sector_address: u64, source: Box<dyn Error + Send + Sync + 'static>, }, PageWrite { page_address: u64, source: Box<dyn Error + Send + Sync + 'static>, }, Init(Box<dyn Error + Send + Sync + 'static>), Uninit(Box<dyn Error + Send + Sync + 'static>), ChipEraseNotSupported, RoutineCallFailed { name: &'static str, error_code: u32, }, AddressNotInRegion { address: u32, region: NvmRegion, }, Core(Error), FlashAlgorithmNotLoaded, InvalidFlashAlgorithmLoadAddress { address: u64, }, InvalidPageSize { size: u32, }, NoFlashLoaderAlgorithmAttached { name: String, }, MultipleDefaultFlashLoaderAlgorithms { region: NvmRegion, }, MultipleFlashLoaderAlgorithmsNoDefault { region: NvmRegion, }, Verify, NoRamDefined { name: String, }, InvalidFlashAlgorithmLength { name: String, algorithm_source: Option<TargetDescriptionSource>, }, DataOverlaps { added_addresses: Range<u64>, existing_addresses: Range<u64>, }, NoNvmCoreAccess(NvmRegion), NoRamCoreAccess(RamRegion), RegisterValueNotSupported(u64),
}
Expand description

Describes any error that happened during the or in preparation for the flashing procedure.

Variants§

§

NoSuitableNvm

Fields

§start: u64

The start of the requested memory range.

§end: u64

The end of the requested memory range.

§description_source: TargetDescriptionSource

The source of this target description (was it a built in target or one loaded externally and from what file path?).

No flash memory contains the entire requested memory range.

§

ChipEraseFailed

Fields

§source: Box<dyn Error + Send + Sync + 'static>

The source error of this error.

Erasing the full chip flash failed.

§

EraseFailed

Fields

§sector_address: u64

The address of the sector that should have been erased.

§source: Box<dyn Error + Send + Sync + 'static>

The source error of this error.

Erasing the given flash sector failed.

§

PageWrite

Fields

§page_address: u64

The address of the page that should have been written.

§source: Box<dyn Error + Send + Sync + 'static>

The source error of this error.

Writing the given page failed.

§

Init(Box<dyn Error + Send + Sync + 'static>)

Initializing the flash algorithm failed.

§

Uninit(Box<dyn Error + Send + Sync + 'static>)

Uninizializing the flash algorithm failed.

§

ChipEraseNotSupported

This target does not support full chip flash erases.

§

RoutineCallFailed

Fields

§name: &'static str

The name of the routine that was called.

§error_code: u32

The error code the called routine returned.

Calling the given routine returned the given error code.

§

AddressNotInRegion

Fields

§address: u32

The address which was not contained in region.

§region: NvmRegion

The region which did not contain address.

The given address was not contained in the given NVM region.

§

Core(Error)

An error occurred during the interaction with the core.

§

FlashAlgorithmNotLoaded

The RAM contents did not match the flash algorithm.

§

InvalidFlashAlgorithmLoadAddress

Fields

§address: u64

The address where the algorithm was supposed to be loaded to.

Failed to load the flash algorithm into RAM at given address. This can happen if there is not enough space.

Check the algorithm code and settings before you try again.

§

InvalidPageSize

Fields

§size: u32

The size of the page in bytes.

The given page size is not valid. Only page sizes multiples of 4 bytes are allowed.

§

NoFlashLoaderAlgorithmAttached

Fields

§name: String

The name of the chip.

No flash algorithm was linked to this target.

§

MultipleDefaultFlashLoaderAlgorithms

Fields

§region: NvmRegion

The region which matched more than one flash algorithm.

More than one matching flash algorithm was found for the given memory range and all of them is marked as default.

§

MultipleFlashLoaderAlgorithmsNoDefault

Fields

§region: NvmRegion

The region which matched more than one flash algorithm.

More than one matching flash algorithm was found for the given memory range and none of them is marked as default.

§

Verify

Flash content verification failed.

§

NoRamDefined

Fields

§name: String

The name of the chip.

The given chip has no RAM defined.

§

InvalidFlashAlgorithmLength

Fields

§name: String

The name of the flash algorithm.

§algorithm_source: Option<TargetDescriptionSource>

The source of the flash algorithm (was it a built in target or one loaded externally and from what file path?).

The given flash algorithm did not have a leng multiple of 4 bytes.

This means that the flash algorithm that was loaded is broken.

§

DataOverlaps

Fields

§added_addresses: Range<u64>

The address range that was tried to be added.

§existing_addresses: Range<u64>

The address range that was already present.

Two blocks of data overlap each other which means the loaded binary is broken.

Please check your data and try again.

§

NoNvmCoreAccess(NvmRegion)

No core can access this NVM region.

§

NoRamCoreAccess(RamRegion)

No core can access this RAM region.

§

RegisterValueNotSupported(u64)

The register value supplied for this flash algorithm is out of the supported range.

Trait Implementations§

source§

impl Debug for FlashError

source§

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

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

impl Display for FlashError

source§

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

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

impl Error for FlashError

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<Error> for FlashError

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<FlashError> for FileDownloadError

source§

fn from(source: FlashError) -> 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