I have used these boards and don't remember the details with OpenOCD, but I think it was a bit of a mess.
I use the following tool, which can both configure the FPGA and program its attached SPI flash. It requires a DAP adapter, which is exactly what these boards have actually (unless they have changed that), so it's compatible. It directly takes the .bit file.
https://github.com/adamgreig/ecpdapIf you're on Windows and don't want to bother compiling it (it's Rust-based), it has a Windows executable ready to use:
https://github.com/adamgreig/ecpdap/releases/tag/v0.2.0Quick guide:
- To scan the JTAG chain (that will check that ecpdap correctly sees the FPGA):
ecpdap scan
- To configure the FPGA SRAM:
ecpdap program <yourbistream.bit>
- To program the SPI Flash:
ecpdap flash write <yourbistream.bit>
Note that those boards usually come with a write-protected Flash. You need to unprotect it the first time you want to re-program it:
ecpdap flash unprotect