YosysHQ / prjtrellis

Documenting the Lattice ECP5 bit-stream format.
Other
399 stars 87 forks source link

Missing openocd ecp5 configuration #183

Closed saahm closed 2 years ago

saahm commented 2 years ago

Hello,

I have followed the installation instructions for Trellis. I planned to use it with the ECP5 Evaluation Board from Lattice Semiconductor. I already use the IceStorm toolchain on my system for my HX8K Devboard, so it might be related to similar installed binaries.

When I follow the instructions and want to execute the example ecp5_evn yosys and nextpnr-ecp5 run fine. Once I try to configure the bitstream onto the board I get the following:

~/tools/prjtrellis/examples/ecp5_evn$ make prog 
openocd -f /usr/share/trellis/misc/openocd/ecp5-evn.cfg -c "transport select jtag; init; svf blinky.svf; exit"
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
embedded:startup.tcl:60: Error: Can't find /usr/share/trellis/misc/openocd/ecp5-evn.cfg
in procedure 'script' 
at file "embedded:startup.tcl", line 60
make: *** [Makefile:18: prog] Fehler 1

I wanted to redo the installation properly to make sure I have not missed anything. But I'm not sure how I can rollback to that, to make sure there is nothing left.

If anyone already has hints how I can fix that, and that my installation is fine otherwise I'd appreciate aswell.

saahm commented 2 years ago

Using ecpprog i was able to configure the bitstream onto the FPGA. But only by writing the SRAM directly. (I probably have the wrong configurtion on the DIP switches)

I see this as a workaround only tho.

saahm commented 2 years ago

When installing prjtrellis to a different directory than /usr/share/ the make needs to be passed the directory via the variable inside the makefile:

~/tools/prjtrellis/examples/ecp5_evn$ make prog TRELLIS=/home/sallar/tools/trellis-dist/share/trellis/
...
...
...
SIR 8   TDI  (FF);
RUNTEST IDLE    100 TCK 1.00E-02 SEC;
SIR 8   TDI  (C0);
RUNTEST IDLE    2 TCK   1.00E-03 SEC;
            MASK (FFFFFFFF);
SIR 8   TDI  (26);
RUNTEST IDLE    2 TCK   2.00E-01 SEC;
SIR 8   TDI  (FF);
RUNTEST IDLE    2 TCK   1.00E-03 SEC;
SIR 8   TDI  (3C);
            MASK (00002100);

Time used: 0m3s770ms 
svf file programmed successfully for 1963 commands with 0 errors