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§

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
The lower-level source of this error, if any. Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
Converts to this type from the input type.
Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Converts self into T using Into<T>. Read more
Causes self to use its Binary implementation when Debug-formatted.
Causes self to use its Display implementation when Debug-formatted.
Causes self to use its LowerExp implementation when Debug-formatted.
Causes self to use its LowerHex implementation when Debug-formatted.
Causes self to use its Octal implementation when Debug-formatted.
Causes self to use its Pointer implementation when Debug-formatted.
Causes self to use its UpperExp implementation when Debug-formatted.
Causes self to use its UpperHex implementation when Debug-formatted.
Formats each item in a sequence. Read more

Returns the argument unchanged.

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

Calls U::from(self).

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

Pipes by value. This is generally the method you want to use. Read more
Borrows self and passes that borrow into the pipe function. Read more
Mutably borrows self and passes that borrow into the pipe function. Read more
Borrows self, then passes self.borrow() into the pipe function. Read more
Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Borrows self, then passes self.as_ref() into the pipe function.
Mutably borrows self, then passes self.as_mut() into the pipe function.
Borrows self, then passes self.deref() into the pipe function.
Mutably borrows self, then passes self.deref_mut() into the pipe function.
🔬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
Immutable access to a value. Read more
Mutable access to a value. Read more
Immutable access to the Borrow<B> of a value. Read more
Mutable access to the BorrowMut<B> of a value. Read more
Immutable access to the AsRef<R> view of a value. Read more
Mutable access to the AsMut<R> view of a value. Read more
Immutable access to the Deref::Target of a value. Read more
Mutable access to the Deref::Target of a value. Read more
Calls .tap() only in debug builds, and is erased in release builds.
Calls .tap_mut() only in debug builds, and is erased in release builds.
Calls .tap_borrow() only in debug builds, and is erased in release builds.
Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Calls .tap_ref() only in debug builds, and is erased in release builds.
Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Calls .tap_deref() only in debug builds, and is erased in release builds.
Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Converts the given value to a String. Read more
Attempts to convert self into T using TryInto<T>. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more