Loading...
 
Location : Colin O'Flynn - Electronics, Programming, RF, and More » Using JTAG over USB

Programming Xilinx FPGAs with FT2232D Based JTAG Through Impact


The SASEBO-GII does have a USB interface, the FT2232D chip provides this. But how to program the board? The standard programming tool for Xilinx won't work with general programmers such as the FT2232D.

Under Linux you can use use http://rmdir.de/~michael/xilinx/(external link) to interface to FTDI-2232 based cables. It's a little slower than most cables but at least it works!

yum install libftdi
yum install libftdi-devel
cd /usr/src
git clone git://git.zerfleddert.de/usb-driver
cd usb-driver
make
./setup_pcusb /opt/Xilinx/13.2/DS_ISE/ISE
cp libusb-driverrc ~/.libusb-driverrc

OR if you had lab-tools only in that 2nd last step:

./setup_pcusb /opt/Xilinx/13.2/LabTools/LabTools


Edit ~/.libusb-driverrc to look like this:

# Amontec Jtagkey
#LPT2 = FTDI:0403:cff8
# Dangerous Prototypes Bus Blaster v2
#LPT3 = FTDI:0403:6010:2
# SASEBO-G2
LPT4 = FTDI:0403:6010


That is, comment out everything but the SASEBO-G2 option. The Bus Blaster v2 line seems to screw up the SASEBO configuration.


This should have made a udev rule in /etc/udev/rules.d/99-libftdi.rules . The contents should look like:

#allow users to claim the device
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="0664", GROUP="plugdev"


Add yourself to the plugdev group or change mode from 664 to 666. If you have the SASEBO plugged in right now, replug it.

cd /opt/Xilinx/13.2/ISE_DS
sh settings64.sh
export LD_PRELOAD=/usr/src/usb-driver/libusb-driver.so
ISE/bin/lin64/./impact


Plug the "JTAG" header into the "CONFIG" header, and try auto-detecting your cable.

If things don't work:
  • If you get "Can not find cable, check cable setup!" messages, check you have the .libusb-driverrc file in your home directory and it's correct. Check you are running impact as yourself too. Check VID and PID (see below).
  • If you keep getting errors about windrv6 not loaded, did you export the variable "LD_PRELOAD=/usr/src/usb-driver/libusb-driver.so"? You might need different commands depending on your shell, see README. Also watch out for setting the variables then running command as different user (e.g. sudo)
  • If Impact exits and you see a message about permissions, check you have the correct VID and PID in the udev rule. Use lsusb to view all attached ones.
  • Check dmesg for errors (segfaults etc)... I had to rename /usr/local/lib64/digilent/adept to /usr/local/lib64/digilent/~adept to stop libdpcomm.so from segfaulting (e.g. stop it loading)
  • Have you run ./setup_pcusb? Are you trying to run 32-bit impact when you built 64? Are permissions correct?
  • Force setup to use "Parallel-III" cable, and the port # you specified in ~/.libusb-driverrc . This gives more useful error messages sometimes (e.g.: cable is locked, indicating another session didn't shut down cleanly, in which case see http://www.xilinx.com/support/answers/21931.htm)(external link)

Be sure to read the README in the software distribution too for more details on all this.



Newest Blog Posts

Videos on YouTube