Skip to content

Add spi flash download sub cmd - #411

Open
BenReed161 wants to merge 2 commits into
Microsemi:masterfrom
BenReed161:add-spi-flash-download-sub-cmd
Open

Add spi flash download sub cmd#411
BenReed161 wants to merge 2 commits into
Microsemi:masterfrom
BenReed161:add-spi-flash-download-sub-cmd

Conversation

@BenReed161

Copy link
Copy Markdown
Collaborator

No description provided.

Add a new library files for the SPI download function.

SPI download combines the spi read/write/verify functions into a single
function, providing the raw firmware image the function will handle the
chunking of the data for the user.

The switchtec_spi_flash_download function is split into 3 phases:
Erase - Erases the sectors defined by user starting at the offset. This
is optional if the user has already erased the sector it can skipped.
Write - Will write starting at the offset, chunking the file at the
1012 byte max per MRPC call.
Verify - If the uses wishes to they can also verify the download by
reading the spi flash back and byte comparing it to the file provided.
Adds the SPI download subcommand to the SPI CLI command group

User provides a file path, offset in the SPI to download to, and
whether or not to erase the SPI first, and whether to verify the file
is downloaded into the SPI flash by reading back and comparing.
Uses progress bar and yes/no prompt similar to the other firmware
download functions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant