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

Megaflash CRC check fix for attic-less boards; a minor fix and an addition for the Wukong board #839

Open
wants to merge 4 commits into
base: development
Choose a base branch
from

Conversation

0xa000
Copy link
Contributor

@0xa000 0xa000 commented Oct 11, 2024

This pull request contains:

  • A fix for the CRC check in megaflash for all boards without attic RAM.
  • A fix for the generated Vivado project file for the Wukong board to include the correct shadow ram file.
  • Support for using the second user button on the Wukong board as an alternative Restore key.
  • Remove file static (internal) function from header file.

@lydon42
Copy link
Member

lydon42 commented Jan 3, 2025

I am not sure why the CRC logic needs to be changed here. I thought it already does check CRC on boards without attic... Need to understand the changes still, on the first look it does confuse me :)

@lydon42 lydon42 self-assigned this Jan 3, 2025
@0xa000
Copy link
Contributor Author

0xa000 commented Jan 3, 2025

It's been a while... I think the CRC fix for no-attic mainly consists of testing for the right status code, as mentioned in the DM below:

... for no attic, megaflash sets mfhf_core_file_state to MFHF_LC_FROMDISK if the CRC check passed, but then on the next lines (416,417) it checks for MFHF_LC_ATTICOK.

Then I found I could simplify the logic around that test such that it works for both the attic and no-attic case. For the attic case, it should be functionally equivalent to the code as it existed before this commit.

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