Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for large SPI flashes when restoring. #34

Merged
merged 2 commits into from
Aug 22, 2023
Merged

Added support for large SPI flashes when restoring. #34

merged 2 commits into from
Aug 22, 2023

Conversation

BenjaminSoelberg
Copy link
Contributor

Added a device reset upon restore success.
Updated README.md to reflect the changes.

The changes makes it possible to restore the device to a stock configuration after the SPI flash has been replaced with a larger size (that uses 4 byte addresses).

Added a device reset upon restore success.
Updated README.md to reflect the changes.
# OCTOSPI1: memory-mapped 1-line read mode with 3-byte addresses
mww 0x52005100 0x01002101 ;# OCTOSPI_CCR: DMODE=0x1, ABMODE=0x0, ADSIZE=0x2, ADMODE=0x1, ISIZE=0x0, IMODE=0x1

if { [env LARGE_FLASH] == 0 } {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this branch taken when LARGE_FLASH is unset, i.e. not set to "0"? Just want to be sure :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be my understanding yes. But I could flip it to make it more clear and explicit and be inline with the check in ./5_restore.sh. I'll do that just so the check align.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked and double checked.

  • [env LARGE_FLASH] actually ONLY checks if LARGE_FLASH is present in the environment variables

I have updated the code to both test for presents and for the value.

So you did actually dodge a bullet here.
Thanks for the review.

@kbeckmann kbeckmann merged commit 7f402f4 into ghidraninja:main Aug 22, 2023
@kbeckmann
Copy link
Collaborator

Thanks for the PR! Looks good.

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.

2 participants