Struct probe_rs::flashing::DownloadOptions
source · [−]#[non_exhaustive]pub struct DownloadOptions<'progress> {
pub progress: Option<&'progress FlashProgress>,
pub keep_unwritten_bytes: bool,
pub dry_run: bool,
pub do_chip_erase: bool,
pub skip_erase: bool,
pub verify: bool,
pub disable_double_buffering: bool,
}
Expand description
Options for downloading a file onto a target chip.
This struct should be created using the DownloadOptions::default()
function, and can be configured by setting
the fields directly:
use probe_rs::flashing::DownloadOptions;
let mut options = DownloadOptions::default();
options.verify = true;
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.progress: Option<&'progress FlashProgress>
An optional progress reporter which is used if this argument is set to Some(...)
.
keep_unwritten_bytes: bool
If keep_unwritten_bytes
is true
, erased portions of the flash that are not overwritten by the ELF data
are restored afterwards, such that the old contents are untouched.
This is necessary because the flash can only be erased in sectors. If only parts of the erased sector are written thereafter, instead of the full sector, the excessively erased bytes wont match the contents before the erase which might not be intuitive to the user or even worse, result in unexpected behavior if those contents contain important data.
dry_run: bool
Perform a dry run. This prepares everything for flashing, but does not write anything to flash.
do_chip_erase: bool
If this flag is set to true, probe-rs will try to use the chips built in method to do a full chip erase if one is available. This is often faster than erasing a lot of single sectors. So if you do not need the old contents of the flash, this is a good option.
skip_erase: bool
If the chip was pre-erased with external erasers, this flag can set to true to skip erasing It may be useful for mass production.
verify: bool
After flashing, read back all the flashed data to verify it has been written correctly.
disable_double_buffering: bool
Disable double buffering when loading flash.
Implementations
sourceimpl<'progress> DownloadOptions<'progress>
impl<'progress> DownloadOptions<'progress>
Trait Implementations
sourceimpl<'progress> Default for DownloadOptions<'progress>
impl<'progress> Default for DownloadOptions<'progress>
sourcefn default() -> DownloadOptions<'progress>
fn default() -> DownloadOptions<'progress>
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl<'progress> !RefUnwindSafe for DownloadOptions<'progress>
impl<'progress> !Send for DownloadOptions<'progress>
impl<'progress> !Sync for DownloadOptions<'progress>
impl<'progress> Unpin for DownloadOptions<'progress>
impl<'progress> !UnwindSafe for DownloadOptions<'progress>
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