pub fn download_file<P: AsRef<Path>>(
    session: &mut Session,
    path: P,
    format: Format
) -> 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 bounderies are honored and does unlocking, erasing and programming of the flash for you.

If you are looking for more options, have a look at download_file_with_options.