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

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. 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

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

Returns the argument unchanged.

Calls U::from(self).

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

Converts the given value to a String. 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.