fpgaftdi

Unable to open ftdi device with vid 0403, pid 6010


I'm trying to build this example for my ECP5 evaluation board. It runs fine until the upload to the FPGA is supposed to start. It then gives me this error:

Error: libusb_open() failed with LIBUSB_ERROR_ACCESS
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description 'Lattice ECP5 Evaluation Board', serial '*' at bus location '*'

make: *** [Makefile:18: prog] Error 1

Output of lsusb, notice that the device with vid 0403 and pid 6010 is there:

0403:6010 (bus 1, device 4) path: 1
1d6b:0002 (bus 1, device 1)
80ee:0021 (bus 2, device 2) path: 1
1d6b:0001 (bus 2, device 1)

Output of dmesg after connecting the device:

[   99.954483] ftdi_sio 1-1:1.1: FTDI USB Serial Device converter detected
[   99.954564] usb 1-1: Detected FT2232H
[   99.962509] usb 1-1: FTDI USB Serial Device converter now attached to ttyUSB1

I don't understand how it cannot find the device while it is right there. I'm running Ubuntu 20.04.3 LTS inside a virtual machine. I have installed the expansion pack and passed the usb device to this machine.

I have installed the following packages through apt install: libftdi-dev libftdi1 libusb-dev.


Solution

  • I needed to add permissions to access the device for the non-root users. I did this by creating the file /etc/udev/rules.d/ecp5.rules with the following contents:

    SUBSYSTEM=="usb", ATTR{idVendor}=="0403", ATTR{idProduct}=="6010", MODE="0666"