libtrellis/tools/ecpmulti.cpp: Added the dual-boot/multi-boot jump table just before the end of the SPI flash #244
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.
ecpmulti
allows users to store multiple bitstreams in the samebin
/mcs
files. By pressingPROGRAMN
, 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:
0x00
,ddtcmd
, only the golden bitstream address is present in the jump table.Testing:
Successfully tested with ecp5_evn and other ECP5-based boards.