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

libtrellis/tools/ecpmulti.cpp: Added the dual-boot/multi-boot jump table just before the end of the SPI flash #244

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

trabucayre
Copy link
Contributor

@trabucayre trabucayre commented Mar 21, 2025

ecpmulti allows users to store multiple bitstreams in the same bin/mcs files. By pressing PROGRAMN, the next bitstream is loaded in a specific order.

However, the jump table is missing, meaning the golden bitstream is not automatically used if the primary bitstream is corrupted.

The code to generate the jump table already exists but was never added at flashsize & 0xff.

This PR adds the missing jump table, enabling behavior similar to Lattice's ddtcmd. It also adds two new arguments:

  • --golden to pass golden bitstream file name
  • --goldenaddr to pass golden bitstream address.

Notes:

  • according to FPGA-TN-02203-1.8:
    • first bitstream is placed at offset 0x00,
    • second bitstream is the golden bitstream and placed at a address depending on the target FPGA
    • subsequent bitstreams are considered as alternate and placed to upper addresses.
  • According to ddtcmd, only the golden bitstream address is present in the jump table.

Testing:

Successfully tested with ecp5_evn and other ECP5-based boards.

@trabucayre
Copy link
Contributor Author

CI error is unrelated to the PR but to a missing dependency in arch-pkg: Fixed by PR #245.

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