#[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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional 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

DownloadOptions with default values.

Trait Implementations

Returns the “default value” for a type. Read more

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.

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.