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

Flashing ProjectTrellis ECP5_evn multiboot example failes #44

Closed
feldim2425 opened this issue Aug 11, 2020 · 2 comments
Closed

Flashing ProjectTrellis ECP5_evn multiboot example failes #44

feldim2425 opened this issue Aug 11, 2020 · 2 comments

Comments

@feldim2425
Copy link

feldim2425 commented Aug 11, 2020

I recently tried to flash the ECP5 multiboot example in the ProjectTrellis Repo for the ECP5 evaluation board (LFE5UM5G-85F-EVN) but it failed during the "Refresh" step and the FPGA was not able to load the bitstream from th SPI flash (The Red LED D3 lit up and stayed on util I flashed a new program).
I used the following command:
openFPGALoader -c ft2232 -b ecp5_evn -f multiboot.mcs

Refresh: FAIL
displayReadReg
	Config Target Selection : 0
	SPIm Fail1
	Preamble ERR
	EXEC Error

I also tried flashing the blinky1.bit and blinky2.bit Bitstreams using the same command (to the onboard SPI Flash) which worked without problem.
I was also able to flash the multiboot.mcs file from ProjectTrellis with the official Lattice Diamond programmer util also without any problems.

@feldim2425
Copy link
Author

Ok. I figured it out. It seems like Lattice Diamond programmer ignores the preamble in the mcs file and adds it's own or does some error correction. The problem is that the ProjectTrellis Multiboot example removes all 0xFF bytes at the beginning and that messes up the preamble. Simply removing the -unfill 0xFF parameter in the Makefile fixes it.

@trabucayre
Copy link
Owner

Thanks for this information.
Maybe I need to check if this preample is present (or not) and adapt content accordingly.
I suppose it's the better approach to avoid this issue

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

No branches or pull requests

2 participants