My notes flashing LiteX-CNC on a Colorlight 5A-75E (solved)

More
4 years 3 weeks ago #253719 by DePrutser
Now I don't get an error anymore, but I don't know if it actually works yet:
$ cat myopenocd.cfg
adapter driver usb_blaster
jtag newtap auto0 tap -irlen 8 -expected-id 0x41111043

$ openocd -f ./myopenocd.cfg
Open On-Chip Debugger 0.11.0
Licensed under GNU GPL v2
For bug reports, read
openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : No lowlevel driver configured, using ftdi
Info : usb blaster interface using libftdi
Info : This adapter doesn't support configurable speed
Info : JTAG tap: auto0.tap tap/device found: 0x41111043 (mfg: 0x021 (Lattice Semi.), part: 0x1111, ver: 0x4)
Warn : gdb services need one or more targets defined

Please Log in or Create an account to join the conversation.

More
4 years 3 weeks ago #254000 by DePrutser
I tried to flash the .lpf file I made using this guide [1] I can't get it to work yet:

[cedric@cedric ~]$ cat myopenocd.cfg
adapter driver usb_blaster
jtag newtap auto0 tap -irlen 8 -expected-id 0x41111043

[cedric@cedric ~]$ cat colorlight_5a_75e.cfg
init
scan_chain
svf -progress colorlight_5a_75e.lpf
shutdown

[cedric@cedric ~]$ openocd -f ./myopenocd.cfg -f ./colorlight_5a_75e.cfg
Open On-Chip Debugger 0.11.0
Licensed under GNU GPL v2
For bug reports, read
openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
Info : No lowlevel driver configured, using ftdi
Info : usb blaster interface using libftdi
Info : This adapter doesn't support configurable speed
Info : JTAG tap: auto0.tap tap/device found: 0x41111043 (mfg: 0x021 (Lattice Semi.), part: 0x1111, ver: 0x4)
Warn : gdb services need one or more targets defined
svf processing file: "colorlight_5a_75e.lpf"
0% BLOCK RESETPATHS;
Error: invalid svf command: BLOCK
Error: fail to run command at line 1
Time used: 0m0s0ms
svf file programmed failed

[1] forum.linuxcnc.org/27-driver-boards/4692...itex-cnc-on-linuxcnc

Please Log in or Create an account to join the conversation.

More
4 years 2 weeks ago #254032 by DePrutser
It turns out the .lpf was not the actual FPGA bitstream. After generating the bitstream (see [1]), I still get an error, but I got a lot further:

$ cat myopenocd.cfg
adapter driver usb_blaster
jtag newtap auto0 tap -irlen 8 -expected-id 0x41111043

$ cat colorlight_5a_75e.cfg
init
scan_chain
svf -progress colorlight_5a_75e.svf
shutdown

$ openocd -f ./myopenocd.cfg -f ./colorlight_5a_75e.cfg
Open On-Chip Debugger 0.11.0
Licensed under GNU GPL v2
For bug reports, read
openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
Info : No lowlevel driver configured, using ftdi
Info : usb blaster interface using libftdi
Info : This adapter doesn't support configurable speed
Info : JTAG tap: auto0.tap tap/device found: 0x41111043 (mfg: 0x021 (Lattice Semi.), part: 0x1111, ver: 0x4)
Warn : gdb services need one or more targets defined
svf processing file: "colorlight_5a_75e.svf"
0% HDR 0;
0% HIR 0;
0% TDR 0;
0% TIR 0;
0% ENDDR DRPAUSE;
0% ENDIR IRPAUSE;
0% STATE IDLE;
0% SIR 8 TDI (E0);
0% MASK (FFFFFFFF);
0% SIR 8 TDI (1C);
0% FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);
0% SIR 8 TDI (C6);
0% SDR 8 TDI (00);
0% RUNTEST IDLE 2 TCK 1.00E-02 SEC;
0% SIR 8 TDI (0E);
0% SDR 8 TDI (01);
0% RUNTEST IDLE 2 TCK 1.00E-02 SEC;
0% SIR 8 TDI (3C);
0% MASK (0000B000);
0% SIR 8 TDI (46);
0% SDR 8 TDI (01);
0% RUNTEST IDLE 2 TCK 1.00E-02 SEC;
0% SIR 8 TDI (7A);
0% RUNTEST IDLE 2 TCK 1.00E-02 SEC;
0% 0000DCFFFFFFFFCDBDFFFFFF006CAC4C82E24282C26CB462AC4CB4AAACA26232045C2E4E860A00FF);
0% 0000000000FF173300000000000000000000FF173300000000000000000000FF1733000000000000);
0% 0000FF173300000000000000000000FF173300000000000000000000FF1733000000000000000000);
<snip>
95% 00000000000000000000000000000000000000000000000000000000000000000000000000000000);
95% 00000000000000000000000000000000000000000000000000000000000000000000000000000000);
95% SIR 8 TDI (FF);
95% RUNTEST IDLE 100 TCK 1.00E-02 SEC;
95% SIR 8 TDI (C0);
95% RUNTEST IDLE 2 TCK 1.00E-03 SEC;
95% MASK (FFFFFFFF);
95% SIR 8 TDI (26);
95% RUNTEST IDLE 2 TCK 2.00E-01 SEC;
95% SIR 8 TDI (FF);
95% RUNTEST IDLE 2 TCK 1.00E-03 SEC;
95% SIR 8 TDI (3C);
95% MASK (00002100);
Error: tdo check error at line 28
Error: READ = 0x0201f10
Error: WANT = 0x0000000
Error: MASK = 0x000b000
Time used: 0m1s761ms
svf file programmed failed


[1] forum.linuxcnc.org/27-driver-boards/4692...on-linuxcnc?start=20

Please Log in or Create an account to join the conversation.

More
4 years 2 weeks ago #254260 by benitoss
I recommend to use OpenFPGALoader to program the ColorLight 5A-75E board. --> github.com/trabucayre/openFPGALoader
The reason is because you only need to work with bit files

The command line for usb-blaster is:
$ openFPGALoader -c usb-blaster -m my_bitstream.bit

For PI PICO board you need to use the DirtyJTAG proyect for PI PICO
github.com/phdussud/pico-dirtyJtag/

And the command line for OpenFPGALoader is :
$ openFPGALoader -c dirtyJtag -m my_bitstream.bit

Please Log in or Create an account to join the conversation.

More
4 years 2 weeks ago - 4 years 2 weeks ago #254359 by DePrutser
That works:
[root@cedric cedric]# pacman -S openfpgaloader
[cedric@cedric ~]$ openFPGALoader -c usb-blaster -m LiteX-CNC/5a-75e/gateware/colorlight_5a_75e.bit
write to ram
Open file: DONE
Parse file: DONE
Enable configuration: DONE
SRAM erase: DONE
Loading: 100.00%
Done
Disable configuration: DONE
[cedric@cedric ~]$
Last edit: 4 years 2 weeks ago by DePrutser.
The following user(s) said Thank You: MartijnD

Please Log in or Create an account to join the conversation.

More
3 years 5 months ago - 3 years 5 months ago #270796 by MartijnD
@DePrutser, Thanks for making these logs. they helped me a lot.
As an addition I can tell that a "ESP-prog" worked for well for me.

Can you tell me how you loaded the LiteX-CNC driver in LinuxCNC?
Last edit: 3 years 5 months ago by MartijnD.

Please Log in or Create an account to join the conversation.

Moderators: PCW, jmelson
Time to create page: 0.325 seconds
Powered by Kunena Forum