-
Notifications
You must be signed in to change notification settings - Fork 71
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
Add writable SPI flash and XMODEM xfer support #370
Open
cr1901
wants to merge
33
commits into
timvideos:master
Choose a base branch
from
cr1901:xfer-fw
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…nly single build directory.
cr1901
force-pushed
the
xfer-fw
branch
2 times, most recently
from
December 14, 2017 15:05
da0d616
to
5495ae8
Compare
cr1901
force-pushed
the
xfer-fw
branch
3 times, most recently
from
December 14, 2017 17:04
65d1c0d
to
f551cbd
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request re-enables SPI flash write support and adds support to the firmware to transfer a firmware image using the XMODEM protocol.
To use the feature, at the
H2U
prompt, type:The XMODEM functionality is provided by libmodem, a known-to-work full implementation of XMODEM (and possibly other serial protocols) designed to run anywhere a C89 compiler is present. Building
libmodem
as a submodule has been integrated into the Makefile, and requires meson to compile. I hope to be able to add more targets forlibmodem
with HDMI2USB to facilitate code reuse.I have included a small Python script called
getcrc32.py
to calculate the crc and length for you, which can either be used in a script or copy/pasted to theH2U
prompt. I have also created a small shell script to automate firmware upload, provided you know the flash address. In theory, the entire flash, including bitstream, BIOS, and firmware could be rewritten from theH2U
prompt, but I have not tested this (and would need to extend the buffer size from 128kB to accommodate this).I have confirmed that loading a firmware image works on both the Mimasv2 and Opsis boards. I have not currently had luck getting firmware upload to work on
qemu-litex
, but I can add it as a patch. Other than that, please let me know any changes you'd like me to make and we can discuss on IRC.