Enum probe_rs::flashing::FlashError
source · [−]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
Erasing the full chip flash failed.
EraseFailed
Fields
sector_address: u64
The address of the sector that should have been erased.
Erasing the given flash sector failed.
PageWrite
Fields
page_address: u64
The address of the page that should have been written.
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
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
sourceimpl Debug for FlashError
impl Debug for FlashError
sourceimpl Display for FlashError
impl Display for FlashError
sourceimpl Error for FlashError
impl Error for FlashError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<FlashError> for Error
impl From<FlashError> for Error
sourcefn from(err: FlashError) -> Self
fn from(err: FlashError) -> Self
Converts to this type from the input type.
sourceimpl From<FlashError> for FileDownloadError
impl From<FlashError> for FileDownloadError
sourcefn from(source: FlashError) -> Self
fn from(source: FlashError) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for FlashError
impl Send for FlashError
impl Sync for FlashError
impl Unpin for FlashError
impl !UnwindSafe for FlashError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more