pub enum FlashError {
Show 31 variants
AlgorithmNotFound {
name: String,
algo_name: String,
},
NoSuitableNvm {
range: Range<u64>,
description_source: TargetDescriptionSource,
},
ChipEraseFailed {
source: Box<dyn Error + Send + Sync + 'static>,
},
FlashReadFailed {
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,
},
UnableToReadCoreStatus(Error),
UnexpectedCoreStatus {
status: CoreStatus,
},
AddressNotInRegion {
address: u32,
region: NvmRegion,
},
Core(Error),
ResetAndHalt(Error),
Run(Error),
FlashAlgorithmNotLoaded,
InvalidFlashAlgorithmLoadAddress {
address: u64,
},
InvalidFlashAlgorithmStackSize {
size: u64,
},
InvalidDataAddress {
data_load_addr: u64,
data_ram: Range<u64>,
},
NoFlashLoaderAlgorithmAttached {
name: String,
range: Range<u64>,
},
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),
StackOverflowDetected {
operation: &'static str,
},
}
Expand description
Describes any error that happened during the or in preparation for the flashing procedure.
Variants§
AlgorithmNotFound
No flash algorithm was found by the given name.
Fields
NoSuitableNvm
No flash memory contains the entire requested memory range.
Fields
description_source: TargetDescriptionSource
The source of this target description (was it a built in target or one loaded externally and from what file path?).
ChipEraseFailed
Erasing the full chip flash failed.
FlashReadFailed
Failed to read data from flash.
EraseFailed
Erasing the given flash sector failed.
Fields
PageWrite
Writing the given page failed.
Fields
Init(Box<dyn Error + Send + Sync + 'static>)
Initializing the flash algorithm failed.
Uninit(Box<dyn Error + Send + Sync + 'static>)
Uninitializing the flash algorithm failed.
ChipEraseNotSupported
This target does not support full chip flash erases.
RoutineCallFailed
Calling the given routine returned the given error code.
Fields
UnableToReadCoreStatus(Error)
Failed to read the core status.
UnexpectedCoreStatus
The core entered an unexpected status while executing a flashing operation.
Fields
status: CoreStatus
The status that the core entered.
AddressNotInRegion
The given address was not contained in the given NVM region.
Fields
Core(Error)
An error occurred during the interaction with the core.
ResetAndHalt(Error)
Failed to reset, and then halt the CPU.
Run(Error)
Failed to start running code on the CPU.
FlashAlgorithmNotLoaded
The RAM contents did not match the flash algorithm.
InvalidFlashAlgorithmLoadAddress
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.
InvalidFlashAlgorithmStackSize
Failed to configure a valid stack size for the flash algorithm.
InvalidDataAddress
Failed to configure the data region of a flash algorithm.
Fields
NoFlashLoaderAlgorithmAttached
No flash algorithm was linked to this target.
Fields
MultipleDefaultFlashLoaderAlgorithms
More than one matching flash algorithm was found for the given memory range and all of them is marked as default.
MultipleFlashLoaderAlgorithmsNoDefault
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
The given chip has no RAM defined.
InvalidFlashAlgorithmLength
The given flash algorithm did not have a length multiple of 4 bytes.
This means that the flash algorithm that was loaded is broken.
Fields
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?).
DataOverlaps
Two blocks of data overlap each other which means the loaded binary is broken.
Please check your data and try again.
Fields
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.
StackOverflowDetected
Stack overflow while flashing.
Trait Implementations§
Source§impl Debug for FlashError
impl Debug for FlashError
Source§impl Display for FlashError
impl Display for FlashError
Source§impl Error for FlashError
impl Error for FlashError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<FlashError> for FileDownloadError
impl From<FlashError> for FileDownloadError
Source§fn from(source: FlashError) -> Self
fn from(source: FlashError) -> Self
Auto Trait Implementations§
impl Freeze for FlashError
impl !RefUnwindSafe for FlashError
impl Send for FlashError
impl Sync for FlashError
impl Unpin for FlashError
impl !UnwindSafe for FlashError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.