pub fn download_file_with_options<P: AsRef<Path>>(
    session: &mut Session,
    path: P,
    format: 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.