probe_rs::flashing

Function download_file_with_options

Source
pub fn download_file_with_options(
    session: &mut Session,
    path: impl AsRef<Path>,
    format: impl Into<Format>,
    options: DownloadOptions,
) -> Result<(), FileDownloadError>
Expand description

Downloads a file of given format at path to the flash of the target given in session.

This will ensure that memory boundaries are honored and does unlocking, erasing and programming of the flash for you.

If you are looking for a simple version without many options, have a look at download_file.