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

Add a "flash" target to ECP5 EVN makefiles #162

Open
shreekumar3d opened this issue Feb 4, 2021 · 1 comment
Open

Add a "flash" target to ECP5 EVN makefiles #162

shreekumar3d opened this issue Feb 4, 2021 · 1 comment

Comments

@shreekumar3d
Copy link

shreekumar3d commented Feb 4, 2021

blinky example's Makefile has the "make prog" target. This doesn't program the flash. When power is removed & reconnected, the bitstream that was flashed earlier gets loaded. This is confusing - for beginners at-least.

The openFPGALoader tool works with the EVN. Adding this as an optional flashing step in the makefile would help those starting off. e.g., the "flash" target would look like:

flash: ${PROJ}.bit
    openFPGALoader -f $<
@shuckc
Copy link

shuckc commented Jun 16, 2021

You can also accomplish the same using Greg Davill's ECPprog tool https://github.com/gregdavill/ecpprog

Lattice Deployment tool can also generate an SVF file to do background programming per
Programming External SPI Flash through JTAG for ECP5/ECP5-5G Technical Note FPGA-TN-02050
https://latticesemi.com/view_document?document_id=52228

Many years ago I added PLD support to OpenOCD for programming & reconfiguring ECP3 without needing to generate SVF, maybe I should get the patch up to date and add a flashing mode https://github.com/shuckc/urjtag/pull/4/files . The benefit of doing this 'within' OpenOCD is you get support for all the flash models for free.

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