flashing Colorlight i9-v7.2 with diamond programmer

425 views
Skip to first unread message

Usama Abdelhamid

unread,
Jun 6, 2023, 12:22:05 PM6/6/23
to FPGAwars: explorando el lado libre
hi all, 
i am relative new to the FPGA and VHDL world
i just bought the Colorlight i9-v7.2 board with it's developing board. i connected to my laptop the red LED is always on.
as a first step i want to flash it with the Blink demo with Diamond Programmer but it doesn't work
i tried with JTAG 1532 mode and with SPI Flash Background programming both are not working 
i install all drivers from "install & uninstall cables drivers"
any idea to help?
"ERROR - Programming failed.

ERROR - Failed to Open FTDI USB port. Make sure to select the right cable type.

If you have not installed the FTDI Windows USB Driver, follow the instructions in the Programmer Help topic:

"Installing/Uninstalling Parallel Port Driver and USB Driver".

If you have installed the driver, if you recently plugged in the cable, please wait a few seconds and try again.

This will give the operating system time to recognize the cable."


beni...@gmail.com

unread,
Jun 6, 2023, 7:06:29 PM6/6/23
to FPGAwars: explorando el lado libre
Hello

The quick answer is:  If you want to use the Diamond Programmer to program any Lattice board you need to have a JTAG FT2232H with the drivers installed in Windows.

The Colorlight i9-v7.2 board doesn't have a FTDI JTAG, however It has 2 ways to program:

1) Directly through USB using the CMSIS-DAP system.  Examples of programing the board are here --> 
https://github.com/kazkojima/colorlight-i5-tips#quick-start
2) With Diammond programmer or ICeStudio --> The board has 4 JTAG pins called TCK, TMS, TDI, and TDO. You can connect a board FT2232H  (don't forget to connect additional Ground line )


You can get the FT2232H board from here --> https://www.aliexpress.com/item/1005002448969402.html
To work with IceStudio and FT2232H in Windows you can follow the instructions from here --> https://github.com/benitoss/ColorLight_FPGA_boards#install-libusbk-to-work-in-windows-linux-user-dont-need-this-part

I hope this information helps you

Regards

Fernando Mosquera (benitoss)
beni...@gmail.com

Jo mo

unread,
Jun 6, 2023, 7:46:28 PM6/6/23
to FPGAwars: explorando el lado libre
hi Usama and Benito,

As Benito just wrote, using the development board as it is, you need to program your board with ecpdap software.
These dev board has a stm32 chip which uses the CMSIS-dap system for communicates with the computer to get the fpga programmed!
I suggest you, as a starting point, to follow the tutorial of tom verbeure.
You need to do it at least for unlocking the spi flash rom.
Without that, you can only program your fpga sram. (means the hardware config is automatically erased at each powering cycle of your board)
remark: anyways , actually in icestudio, we only have the option to write to the sram . so if you want to permanently load a .bit file, you will have to do it outside of icestudio (eg with ecpdap software)

Than if you want to use another (faster) programmer. you can modify a bit the hardware of your setup .
See also what was written, in this group, for all colorligth boards (i5 , i9) and colorligth which doesn't need the development board (as you have).

have a nice day, or night ;-)

Usama Abdelhamid

unread,
Jun 7, 2023, 11:37:20 AM6/7/23
to FPGAwars: explorando el lado libre
thank you very much for your answers 
i successfully was able to flash it with Lattice HW-USBN-2B (which i already have it ) it has a  FTDI JTAG, just connect the the 4 JTAG signals TCK, TMS, TDI, and TDO to the pogo pins (development board) and/or the vias in Colorlight i9-v7.2, must connect also GND and in my case 3.3V
is there a way to unlock the SPI flash rom with Windows  or diamond programmer or it must be in Linux as mentioned before?
 have a nice day,

Jo mo

unread,
Jun 7, 2023, 1:23:35 PM6/7/23
to FPGAwars: explorando el lado libre
I think i used a linux in a virtual machine !

But it should be doable to use ecpdap in the cmd of window.
at least it is mentioned in the two readme files of this  source zip file. (see also in subfolder driver)

Tell us if you manage to do it with windows!

have a nice evening!

Usama Abdelhamid

unread,
Jun 13, 2023, 10:16:52 AM6/13/23
to fpga-wars-explora...@googlegroups.com
Well, i tried first with Windows as it is much easier environment, unfortunately I could not be able to do it, for me there are no clear steps what / how to do it.
so, I was able to do it with Linux/Ubuntu. It works fine. very important not to forget  his step
Copy the 99-cmsis-dap.rules file in this directory to your udev configuration directory and restart udev:
sudo cp 99-cmsis-dap.rules /etc/udev/rules.d
sudo udevadm control --reload

but now i have an error, which is (see picture)
when i am flashing without certain freq. it works

so what could be the problem here?
BR,

--
Has recibido este mensaje porque estás suscrito al grupo "FPGAwars: explorando el lado libre" de Grupos de Google.
Para cancelar la suscripción a este grupo y dejar de recibir sus mensajes, envía un correo electrónico a fpga-wars-explorando-el...@googlegroups.com.
Para ver esta conversación en el sitio web, visita https://groups.google.com/d/msgid/fpga-wars-explorando-el-lado-libre/d8b7e45e-5620-4ba5-8246-5236ab33f3cen%40googlegroups.com.
Untitled.xcf

Usama Abdelhamid

unread,
Jun 13, 2023, 10:16:57 AM6/13/23
to fpga-wars-explora...@googlegroups.com
i am trying to do it in Windows as well but i got this error after trying to install ecpdap

image.png
i installed Libusd with Zadig and also virtual studio --- libusb-1.0.26\msvc\ libusb_2019.sln
something is missing here?
in the ICEstudio the Colorlight i9-v7.2 is not exist, can i use Colorlight i5-v7.0 (FT232H)? or can i add the i9 board to icestudio?

beni...@gmail.com

unread,
Jun 13, 2023, 10:40:45 AM6/13/23
to FPGAwars: explorando el lado libre
The last WIP IceStudio  0.10.1w202305260905 has included the Colorligh i9-V7.2 board. However, you need one of these JTAG programmers: FT2232H, FT232H, or USB-Blaster.

In Windows you have to install the LIBUSBK in the USB port of the programmer you use. More information here --> https://github.com/benitoss/ColorLight_FPGA_boards#install-libusbk-to-work-in-windows-linux-user-dont-need-this-part


Regards

Fernando Mosquera (Benitoss) 
https://github.com/benitoss

Usama Abdelhamid

unread,
Jun 13, 2023, 12:18:07 PM6/13/23
to fpga-wars-explora...@googlegroups.com
Hi Benito,
many thanks for your support
i have Lattice Programmer HW-USBN-2B which already include JTAG Programmer FT2232HL 
i installed the LIBUSBK in the USB port of the programmer
2023-06-13_17h36_46.png

flashing the SPI flash with Lattice Programmer is giving this error, but works fine with JTAG 1532 mode 
image.png
 i am also getting an error in Linux when flashing
$ ecpdap program --freq 5000 blink.bit
it said Error: JTAG error
caused by 
0: DAO error
1: invalid response from probe

do i still missing something here ?

Usama Abdelhamid

unread,
Jun 15, 2023, 10:30:20 AM6/15/23
to fpga-wars-explora...@googlegroups.com
sorry for disturbing, but now i am really lost.
i have this setup in the pib below 
the signal CLK.TDI,TDO, TMS, GND and 3.3v are connected via wires 
20230615_160021.jpg
  • Lattice Programmer HW-USBN-2B has 2x USB driver 
USB<-> Serial Converter (Interface 0) and USB<-> Serial Converter (Interface 1)
should i replace the driver with libusbk for both of them ?

image.png

  •  Colorlight i9-v7.2 board has 4x USb driver 
Which driver should I replace for every one? in order to be able to program it with JTAG and SPI Flash.

image.png

image.png

image.png

image.png
should i use USB Driver Tool?
thanks for helping,

Fernando Mosquera

unread,
Jun 16, 2023, 10:50:26 AM6/16/23
to fpga-wars-explora...@googlegroups.com

Be careful using ZADIG and installing LibUSBK driver for all programmers. That is not working in that way.

In general you have to install the LibUSBK driver in windows for the next open source applications: 
    - OpenOCD
    - OpenFPGALoader
    - IceStudio (because it uses other open source programmer software

However in the original IDEs you have to use the original driver of the programmer,
      - in case of the FT232H or FT2232H you have to use the FTDI Driver in the IDEs  Vivado, ISE and  Lattice Diamond 
      - In case of the USAB Blaster you need to use the USB Blaster driver in the Quartus IDE

In summary and in your case the Lattice Programmer HW-USBN-2B has a FT232H chip inside and 2 interfaces (0 and 1) .
If you want to program the board with the Diamond software You only need to install the FTDI Driver Software (Never LibUSBK)
But if you want to program the board with IceStudio (that uses OpenFPGALoader software) you need to install the LibUSBK in the interface 0. (Attention ONLY Interface 0)

I recommend to follow this instructions to install LibUSBK in interface 0 and revert the changes to FTDI driver using USB Driver Tools

Now, in case you have installed already the LibUSBK driver and you want to revert to FTDI driver , and USB Driver doesn't allow to do it, go to Device Manager and in the  LibUSB device uninstall the LibUSBK device and disconnect and connect again the usb cable of the Programmer to allow to windows to detect again the device. Maybe it is detected as a FTDI driver.

For CMSIS-DAC , I mean using ecpdap software program I don't think you need to install LibUSBK drivers, but I am not sure, check first to program the board in the DOS command line without installing the LibUSBK drivers. 

I hope these instructions help you to program your board in all cases.

Regards

Fernando Mosquera





Virus-free.www.avast.com

Jo mo

unread,
Jun 17, 2023, 6:08:33 PM6/17/23
to FPGAwars: explorando el lado libre
also, you are tryng to connect the jtag pins to the ethernet chip of the colorligth (port p1)  .

the right place iscolor ligth.png

my (Jo mo ) posts of 13 avr. 2021, 16:21:51
Reply all
Reply to author
Forward
0 new messages