CryptoURANUS Economics: Xilinx JTAG-XC3SPROG-LibUSB Linux: Cryptocurrency

Anti-AdBlocker

Monday, July 22, 2019

Xilinx JTAG-XC3SPROG-LibUSB Linux: Cryptocurrency



Xilinx JTAG-XC3SPROG-LibUSB Linux

OLD: Xilinx JTAG Linux

My poor Server can’t cope!
If you make copies of this page or rehost it, please host your own images. My poor Server can’t cope!
FiXED!!! 

Introduction


This is Xilinx JTAG-XC3SPROG-LibUSB Linux as a basic howto on installing the cable drivers for the Xilinx ISE (specifically iMPACT) under Linux/Unix.

This page was modified to include the ISE installation.

This method I have tested on Ubuntu 8.04, 10.04_beta and Mint Gloria.

It should certainly be valid for any Debian based system, and probably any system where it is possible to do what I have suggested.


A Short Guide to Installing Xilinx ISE

This Install Guide refers to Ubuntu 9.10 (Karmic Koala) 64-bit Desktop Edition.

Installing Xilinx ISE, and the installer needs to have write permissions to the setup files. Burning the files to DVD has been reported to create problems.

Download Xilinx ISE from Xilinx website.

This guide assumes you have Xilinx_11-14_ISE_DS_SFD, which is the full version, and not the webpack.

To do this, change into the folder with the installer files are located and issue the command
sudo chmod a+x xsetup
Then you are ready to install the ISE suite. I suggest you do this as root. To start the installer, enter the following command:
sudo ./xsetup
Go though the menus, as they are fairly obvious. Here are my suggested responses:
    • Next the welcome screen.
    • Accept the License Agreement.
    • Accept the License Agreement, once again.
    • Except the default install path of /opt/Xilinx/11.1 – Feel free to change this, but the rest of this guide assumes you have left this.
: Also note, when working and referring to this path, that Xilinx begins with a capitalised X. This tricked me for some time
  • Select what you wish to be installed. I chose ISE Design Suite Product including the Design Tools, PlanAhead, DSP Tools, Embedded Dev Kit, ChipScope Pro. Next when you are ready.
  • Select the ISE Design Tools. I left everything checked: Design Enviroment Tools, WebPack Devices, Foundation/Edition Devices.
  • Keep all the suggested paths.
  • You next have to select the last few installation options. Check Aquire/Manage a License Key. Uncheck Install cable drivers (does not work, use the method outlined below) and Launch XilinxUpdate – This is a minor detail, and can be done later.
  • Review the options summary. Here is mine. Yours will look different based on Distro, and your options.
Install Location : /opt/Xilinx/11.1
Acquire or Manage a License Key
Launch XilinxUpdate
ISE Design Tools
Install Location : /opt/Xilinx/11.1/ISE
XILINX = /opt/Xilinx/11.1/ISE
PATH = ${XILINX}/bin/${PLATFORM}
LMC_HOME = ${XILINX}/smartmodel/${PLATFORM}/installed_${PLATFORM}
LD_LIBRARY_PATH = ${XILINX}/lib/${PLATFORM}
Design Environment Tools
WebPack Devices
Foundation/Edition Devices
Enable WebTalk
Set Xilinx Registry
PlanAhead Analysis Tool
Install Location : /opt/Xilinx/11.1/PlanAhead
XILINX_PLANAHEAD = /opt/Xilinx/11.1/PlanAhead
PATH = ${XILINX_PLANAHEAD}/bin
PlanAhead Common Files
Setup Environment
Embedded Development Kit (EDK)
Install Location : /opt/Xilinx/11.1/EDK
XILINX_EDK = /opt/Xilinx/11.1/EDK
LD_LIBRARY_PATH = ${XILINX_EDK}/lib/${PLATFORM}
PATH = ${XILINX_EDK}/bin/${PLATFORM}:${XILINX_EDK}/lib/${PLATFORM}
Platform Studio Tool and Processor IP
ChipScope Pro
Install Location : /opt/Xilinx/11.1/ChipScope
CHIPSCOPE = /opt/Xilinx/11.1/ChipScope
PATH = ${CHIPSCOPE}/bin/${PLATFORM}
LD_LIBRARY_PATH = ${CHIPSCOPE}/lib/${PLATFORM}:${CHIPSCOPE}/xilinx/lib/${PLATFORM}
ChipScope Pro Common Files and Serial I/O Toolkit option support
DSP Tools (System Generator, AccelDSP)
Install Location : /opt/Xilinx/11.1/DSP_Tools
XILINX_DSP = /opt/Xilinx/11.1/DSP_Tools/lin64
LD_LIBRARY_PATH = ${XILINX_DSP}/sysgen/lib
PATH = ${XILINX_DSP}/common/bin
TEMP = /tmp
TMP = /tmp
System Generator for DSP
Unix/Linux Post-installation script
    • Wait for a small eternity.
    • The Xilinx License Configuration Manager should appear:
Select what best describes what you need. The “Start ISE WebPack” gives you unlimited access to fundamental applications, but not to everything.

For help, check out the Xilinx Software Matrix, here.

At this point, I select “Get my Purchased Licenses”. This opens Firefox (or your default web browser), and asks you to log into their system. You can download your licenses file from them, and browse to it using the “Copy License” button under the “Manage Xilinx License” tab. Either way, get a license from Xilinx. Once you have done so, close the License Config Manager.
  • You should be told Installation is complete;  Press Okay.
  • Move onto the next steps of installing cable drivers.

Using Xilinx USB JTAG Programmers under Linux (Installing Cable Drivers)

Assuming you have followed the above installation howto, this next section should follow on.

If you jumped straight here to this section the next section on installing Cable Drivers should standalone. If you have problems, please check that you have similar options set in your ISE install to those I outline in the previous section.

Getting what’s needed

First of all, this guide assumes you have installed Xilinx ISE (version 11.1 is used here) into the default path of /opt/Xilinx
Next, you will need to have GIT installed to get the required libraries. This approach does not use the official Xilinx libraries but a replica of them. You will also need libusb-dev which is required in the compiling of the drivers. You will also need build-essential metapackage for the compiler. On a 64-bit host, you will need to get the 32-bit version of libc6-dev-i386.
On 32-bit
sudo apt-get install gitk git-gui libusb-dev build-essential libc6-dev fxload
On 64-bit
sudo apt-get install gitk git-gui libusb-dev build-essential libc6-dev-i386 fxload
Philipp HÃrauf reports there is a need to install ia32-libs-dev on some 64-bit systems, though I didn’t require this.

Download the driver source

You should firstly change to the installation directory. You need (assuming default install path) to change directory to /opt/Xilinx. Then you will be required to use git to download the source.
cd /opt/Xilinx
sudo git clone git://git.zerfleddert.de/usb-driver

Compiling the Driver

This step is once simple command, but the most important. Firstly change into the source directory created in the previous step. Then you need to issue the make command.
cd usb-driver/
On 32-bit
sudo make
On 64-bit
sudo make lib32

Linking in the Compiled Driver

This step is not needed for versions of Xilinx ISE newer than 10.1: LD_PRELOAD instructs the loader to load additional libraries into a program, beyond what was specified when it was compiled. It allows us to load the USB CableDriver into iMPACT without recompiling it (which we clearly cannot do).
export LD_PRELOAD=/opt/Xilinx/usb-driver/libusb-driver.so

Satisfying udev

udev is the device manager for the Linux 2.6 kernel series. Primarily, it manages device nodes and hotpluging, which means that it handles the adding/removing devices, including firmware loading. This is what we are required to do. The Xilinx Programmer doesn’t have any firmware, and so we need to tell the computer that when we plug in the programmer, that it should attempt to load the correct firmware to it. fxload should do this for us. Fortunately all of the complex stuff comes with the driver source downloaded previously. All we need to do is put it in the places the computer expects it. Then we need to restart udev, so it sees the new configurations.
In Ubuntu 9.10/10.04 (or if udev doesn’t appear to notice a plug-in):
sudo sed /opt/Xilinx/11.1/ISE/bin/lin/xusbdfwu.rules -e ‘s:TEMPNODE:tempnode:g’ > /etc/udev/rules.d/xusbdfwu.rules
sudo cp /opt/Xilinx/11.1/ISE/bin/lin/xusb*.hex /usr/share/
sudo /etc/init.d/udev restart
Other
sudo cp /opt/Xilinx/11.1/ISE/bin/lin/xusbdfwu.rules /etc/udev/rules.d/
sudo cp /opt/Xilinx/11.1/ISE/bin/lin/xusb*.hex /usr/share/
sudo /etc/init.d/udev restart

Fixing the Path

This step may not be required if the Xilinx install appends to your .bashrc automatically:
Running the following two lines will add the Xilinx path to the system path, and will ensure that the Xilinx binaries are accessable by the system.
32-bit
echo “PATH=\$PATH:/opt/Xilinx/11.1/ISE/bin/lin” >> ~/.bashrc
echo “export PATH” >> ~/.bashrc
64-bit
echo “PATH=\$PATH:/opt/Xilinx/11.1/ISE/bin/lin64” >> ~/.bashrc
echo “export PATH” >> ~/.bashrc
Some people reported that the 32-bit version didn’t work correctly on 64-bit host.
Ensure you are using the 64-bit version of the ISE software.
The 64-bit stuff is located in /opt/Xilinx/11.1/ISE/bin/lin64/

Running the programs

Before you can call any of the Xilinx ISE Suite, you must close the terminal you have open, and reopen a new one. This causes bash to reload, getting the new path variable. You can now run anything from the Xilinx ISE Suite. If you know the program you wish to run, for example, you can simply call it from a terminal window, like so:
user@box:~$ impact

All Done

Once you get to here, the cable drivers should work. When you plug the programmer in, you will notice that after a short while, the programmer’s status LED turns green. This indicates that the firmware was successfully loaded. If you open Xilinx’s iMPACT with the programmer connected to the computer and a circuit, you should be able to execute a boundary scan. The image below shows Xilinx iMPACT running under Linux Mint 7 (Gloria) with a Boundary Scan of my Spartan-3E board.

Xilinx iMPACT – GUI


 

 Xilinx iMPACT – Log Window Text

This is the result of a boundary scan on my Spartan-3E board.
Welcome to iMPACT
iMPACT Version: 11.1
// *** BATCH CMD : setMode -bs
// *** BATCH CMD : setMode -bs
// *** BATCH CMD : setMode -bs
// *** BATCH CMD : setMode -bs
GUI — Auto connect to cable…
// *** BATCH CMD : setCable-port auto
AutoDetecting cable. Please wait.
PROGRESS_START – Starting Operation.
OS platform = i686.
Connecting to cable (Usb Port – USB21).
Checking cable driver.
File version of /opt/Xilinx/11.1/ISE/bin/lin/xusbdfwu.hex = 1030.
File version of /usr/share/xusbdfwu.hex = 1030.
Using libusb.
Max current requested during enumeration is 74 mA.
Type = 0x0004.
Cable Type = 3, Revision = 0.
Setting cable speed to 6 MHz.
Cable connection established.
Firmware version = 1028.
File version of /opt/Xilinx/11.1/ISE/data/xusb_xlp.hex = 1303.
Firmware hex file version = 1303.
Downloading /opt/Xilinx/11.1/ISE/data/xusb_xlp.hex.
Downloaded firmware version = 1303.
PLD file version = 0012h.
PLD version = 0012h.
PROGRESS_END – End Operation.
Elapsed time = 1 sec.
Attempting to identify devices in the boundary-scan chain configuration…
INFO:iMPACT – Current time: Thu Oct 8 18:50:31 2009
// *** BATCH CMD : Identify
PROGRESS_START – Starting Operation.
Identifying chain contents…’0′: : Manufacturer’s ID = Xilinx xc2c64a, Version : 0
INFO:iMPACT:1777 –
Reading /opt/Xilinx/11.1/ISE/xbr/data/xc2c64a.bsd…
INFO:iMPACT:501 – ‘1’: Added Device xc2c64a successfully.
———————————————————————-
———————————————————————-
‘1’: : Manufacturer’s ID = Xilinx xcf04s, Version : 15
INFO:iMPACT:1777 –
Reading /opt/Xilinx/11.1/ISE/xcf/data/xcf04s.bsd…
INFO:iMPACT:501 – ‘1’: Added Device xcf04s successfully.
———————————————————————-
———————————————————————-
‘2’: : Manufacturer’s ID = Xilinx xc3s500e, Version : 4
INFO:iMPACT:1777 –
Reading /opt/Xilinx/11.1/ISE/spartan3e/data/xc3s500e.bsd…
INFO:iMPACT:501 – ‘1’: Added Device xc3s500e successfully.
———————————————————————-
———————————————————————-
done.
PROGRESS_END – End Operation.
Elapsed time = 0 sec.
// *** BATCH CMD : identifyMPM

Linux Kernel

Below shows the the linux kernel reporting that it finds the device. Notice that it finds the device 3 times. It finds the chip with no firmware, then once it recognises it, it uploads firmware, and then it restarts. It finds the chip with the firmware, initilises it, and then restarts the chip. You should see this.
kernel: [690505.051492] usb 2-1: new high speed USB device using ehci_hcd and address 45
kernel: [690505.184191] usb 2-1: configuration #1 chosen from 1 choice
kernel: [690505.296118] usb 2-1: USB disconnect, address 45
kernel: [690507.251482] usb 7-1: new full speed USB device using uhci_hcd and address 2
kernel: [690507.393556] usb 7-1: not running at top speed; connect to a high speed hub
kernel: [690507.416882] usb 7-1: configuration #3 chosen from 1 choice
kernel: [690510.041561] usb 7-1: USB disconnect, address 2
kernel: [690511.800521] usb 2-1: new high speed USB device using ehci_hcd and address 47
kernel: [690511.931390] usb 2-1: configuration #2 chosen from 1 choice

The All-Telling Status LED

If you do it all correctly, once the kernel has settled, you should get the status led illuminated. This will either be the LED on the front of the JTAG box, or on the Spartan-3E board, the status LED next to the USB-B socket (shown with the red arrow).


Troubleshooting

Thying to make a perfect guide for many different possible combinations is hard. Here is a section of things to try before you dispondantly email me.

Newer UDEV (Ubuntu 9.10/10.04)

Many people are reporting problems with the new UDEV system, usually the one used in Ubuntu 9.10. This problem is easily overcome by simply editing your udev rules. Using your favorite editor, edit /etc/udev/rules.d/xusbdfwu.rules and change any reference to $TEMPNODE to $tempnode. This is done automatically in the howto above. Remember to restart udev after this:
sudo /etc/init.d/udev restart

Impact 64-bit

If using the 64-bit version of Impact, there are some slight changes. Source 6 describes in more detail how to get the 64-bit version of Impact running, but simply all that needs to be done is:
cd /usr/lib64
sudo ln -s libusb-0.1.so.4 libusb.so
(I have not personally tested this)

Sources

    • [1] Using Xilinx USB cable on LinuxMint / Ubuntu without windvr
::(http://paddydempster.wordpress.com/2008/04/08/using-xilinx-usb-cable-on-ubuntu-without-windvr/)
::Taken on 19/Aug/2009 at 23:21 BST
    • [2] libusb/ppdev-connector for XILINX jtag tools
::(http://git.zerfleddert.de/cgi-bin/gitweb.cgi/usb-driver?a=blob;f=README;h=265dd3941b23edf68c967b3e3a627c1265f1caa3;hb=HEAD)
::Also included in /opt/Xilinx/usb-drivers/README
::Taken on 19/Aug/2009 at 23:28 BST
    • [3] udev ignoring rules? any help appreciated! ubuntu 9.10
::(http://ubuntuforums.org/showthread.php?t=1313572)
::Taken on 09/Nov/2009 at 01:11 GMT
    • [ubuntu How does USB work | Xilinx Spartan 3E driver problem
::(http://ubuntuforums.org/showthread.php?t=1307574&highlight=xilinx+ise+11.1)
::Taken on 09/Nov/2009 at 00:20 GMT
::Thanks to Mehmet Tukel, Teaching Assistant at Istanbul Technical University for this source.
    • [5] Xilinx USB programmer – problems with Debian/Linux – Solved
:: (http://groups.google.com/group/comp.arch.fpga/browse_thread/thread/2492e85c32938119/386d80ad26dbb974?lnk=gst&q=Wojtek#386d80ad26dbb974)
::Taken on 09/Nov/2009 at 00:41 GMT
::Thanks to Werner Hein for this source.
    • [6] ISE 11.2, Impact can’t find USB II cable, SLED 11 Linux 64 bit
::(http://forums.xilinx.com/xlnx/board/message?board.id=INSTALLBD&message.id=467&query.id=386680#M467)
::Taken on 13/Nov/2009 at 11:03 GMT
::Thanks to Jonathan Drolet for this source.

Updates

  • [29/Jul/2011] Added ia32-libs-dev to dependancies on 64-bit systems. (Thanks to Philipp Hörauf).
  • [05/Feb/2010] Adjusted the dependencies, seperating 32/64-bit hosts. (Thanks to Jerry G. for pointing this confusion out).
  • [15/Apr/2010] Added information for Ubuntu 10.04.



NEW: Xilinx JTAG Linux

This page is an updated version of OLD Xilinx JTAG Linux. If you are having problems with older versions of Ubuntu or the Xilinx ISE, then check out the old page.

Xilinx JTAG Linux OLD above. 

This is updated for Ubuntu 11.04 and Xilinx ISE 13-14.



Introduction

If you found this information helpful, you can Donate a small sum of money (of your choosing) to help me get through my degree and for the upkeep of this server. You may contact me here.
This page originally gave a basic howto on installing the cable drivers for the Xilinx ISE (specifically iMPACT) under Linux/Unix. The page was well received, and I got many emails with various problems, which we overcome. This page was modified to include the ISE installation. This was prompted by me having to reinstall ISE on Ubuntu 9.10 (64-bit). This method I have tested on Ubuntu 8.04, 10.04_beta and Mint Gloria. It should certainly be valid for any Debian based system, and probably any system where it is possible to do what I have suggested.
This Install Guide was written with Ubuntu 11.04 64-bit Desktop Edition and Xilinx ISE 13.2. Last tested by me on Ubuntu 13.10, Xilinx ISE 14.7
Finally, I am no expert in any of this: FPGAs, Xilinx or Linux. I just applied what knowledge I did have, and made it work. I offer my experience as help to you.

Installing Xilinx ISE

When installing Xilinx ISE, make sure that the installer is located on the hard drive. The installer needs to have write permissions to the setup files. Burning the files to DVD has been reported to create problems.
Download Xilinx ISE from their website. This guide assumes you have Xilinx_ISE_DS_Lin_13.2_O.61xd.0.0, which is the full version. However, the webpack should work in the same manor.



Extract the archives to a place with read and write permissions, and chmod the installer file executable my all. To do this, change into the folder with the installer files are located and issue the command
sudo chmod a+x xsetup
Then you are ready to install the ISE suite. I suggest you do this as root. To start the installer, enter the following command:
sudo ./xsetup
Go though the menus, as they are fairly obvious. Here are my suggested responses:
    • Next the welcome screen.
    • Accept the License Agreement (part 1).
    • Accept the License Agreement (part 2).
    • Except the default install path of /opt/Xilinx/13.2 – Feel free to change this, but the rest of this guide assumes you have not.
: Also note, when working and referring to this path, that Xilinx begins with a capitalised X.
  • Select what you wish to be installed. I chose everything, but if you’re using a free WebPACK license, then just install that; save yourself the 15GB disk space!
  • You next have to select the last few installation options:
  • * Check Aquire/Manage a License Key.
  • * Uncheck Install cable drivers (does not work, use the method outlined below) – Saves you having to okay the dialog when it eventually fails! (see image below)
  • * Check Enable WebTalk (stops it complaining if you use WebPACK).


    • Leave the default path, /opt/Xilinx/13.2
    • Review the proposed installation stuff, and start the install
    • Wait for a small eternity.
    • The Xilinx License Configuration Manager should appear:
: Select what best describes what you need. The “Start ISE WebPack” gives you unlimited access to fundamental applications, but not to everything. for help on what does what, check out the Xilinx Software Matrix, here. At this point, I select “Get my Purchased Licenses”. This opens Firefox (or your default web browser), and asks you to log into their system. You can download your licenses file from them, and browse to it using the “Copy License” button under the “Manage Xilinx License” tab. Either way, get a license from Xilinx. Once you have done so, close the License Config Manager.
  • You should be told Installation is complete;  Press Okay.
  • Move onto the next steps of installing cable drivers.

Errors with SysGen under Ubuntu 13.10 and ISE 14.7

I found this error while trying to launch the System Generator under ISE 14.7:
$ sysgen
/opt/Xilinx/14.7/ISE_DS/ISE/sysgen/util/sysgen: 82: /opt/Xilinx/14.7/ISE_DS/ISE/sysgen/util/sysgen: Syntax error: “(” unexpected
The answer is simple. You need to edit the sysgen script, /opt/Xilinx/14.7/ISE_DS/ISE/sysgen/util/sysgen and replace the top line to use bash instead of sh
sudo nano /opt/Xilinx/14.7/ISE_DS/ISE/sysgen/util/sysgen
and replace
#!/bin/sh
with
#!/bin/bash
You should now find that System Generator works.

Using Xilinx USB JTAG Programmers under Linux (Installing Cable Drivers)

Assuming you have followed the above installation howto, this next section should follow on. If you jumped straight here to this section the next section on installing Cable Drivers should standalone. If you have problems, please check that you have similar options set in your ISE install to those I outline in the previous section.

Getting what’s needed

First of all, this guide assumes you have installed Xilinx ISE (version 11.1 is used here) into the default path of /opt/Xilinx
Next, you will need to have GIT installed to get the required libraries. This approach does not use the official Xilinx libraries but a replica of them. You will also need libusb-dev which is required in the compiling of the drivers. You will also need build-essential metapackage for the compiler. On a 64-bit host, you will need to get the 32-bit version of libc6-dev-i386.
On 32-bit
sudo apt-get install gitk git-gui libusb-dev build-essential libc6-dev fxload
On 64-bit
sudo apt-get install gitk git-gui libusb-dev build-essential libc6-dev-i386 fxload
Philipp Hörauf reports there is a need to install ia32-libs-dev on some 64-bit systems, though I didn’t require this.

Download the driver source

You should firstly change to the installation directory. You need (assuming default install path) to change directory to /opt/Xilinx. Then you will be required to use git to download the source.
cd /opt/Xilinx
sudo git clone git://git.zerfleddert.de/usb-driver

Compiling the Driver

This step is once simple command, but the most important. It compiles the cable driver required. There are two versions depending on the version (32-/64-bit) of Xilinx ISE you have. Firstly change into the source directory created in the previous step. Then you need to issue the make command.
cd usb-driver/
sudo make
Since the drivers now support 64-bit too, you don’t need to build the 32-bit version. If you have trouble, try sudo make lib32 to build the 32-bit driver.

Setting up the Cable Driver

The newer versions of the usb-driver come with a setup script, which is very useful! You can run setup_pcusb and have it do all the complicated stuff for you, thusly…

george@diode:/opt/Xilinx/usb-driver$ ./setup_pcusb /opt/Xilinx/13.2/ISE_DS/ISE/

Fixing the Path

This step may not be required if the Xilinx install appends to your .bashrc automatically:
Running the following two lines will add the Xilinx path to the system path, and will ensure that the Xilinx binaries are accessable by the system.
32-bit
echo “PATH=\$PATH:/opt/Xilinx/13.2/ISE_DS/ISE/bin/lin” >> ~/.bashrc
echo “export PATH” >> ~/.bashrc
64-bit
echo “PATH=\$PATH:/opt/Xilinx/13.2/ISE_DS/ISE/bin/lin64/” >> ~/.bashrc
echo “export PATH” >> ~/.bashrc
Some people reported that the 32-bit version didn’t work correctly on 64-bit host.
Ensure you are using the 64-bit version of the ISE software.
The 64-bit stuff is located in /opt/Xilinx/11.1/ISE/bin/lin64/

Connect the Programmer

Once you get to this point, the cable drives have been installed, and you’re now ready to connect the Xilinx USB JTAG Programmer to the PC’s USB port. If you follow the computer’s system log (kernel messages) then you should be able to see the process of flashing the firmware happening as well as the Firmware light on the programmer illuminate.
On the Spartan-3E board shown here in the video, you can see the firmware light to the left of the USB socket. The screen is split, showing you the webcam video on the left and the kernel messages on the right.

iMPACT

iMPACT seems to reliably crash for me every time I do a boundary scan.
george@diode:/opt/Xilinx$ cat /home/george/_impact.log
iMPACT Version: 13.2
iMPACT log file Started on Sat Jul 30 00:46:45 2011
Welcome to iMPACT
iMPACT Version: 13.2
// *** BATCH CMD : setMode -bs
GUI — Auto connect to cable…
// *** BATCH CMD : setCable -port auto
Xilinx ISE 12.1 will perform a boundary scan just fine. Seems to be an issue with ISE 13.2.



Issues, Problems & Troubleshooting

I had no issues with this approach; In fact, it surprised me how simple it had become. If you do have problems, there is much more depth to the old tutorial, which you can view here. It has a troubleshooting section, too!



Xilinx USB Issues

Using Ubuntu with the Xilinx tools can be problematic.  Xilinx does not even try to install cable drivers for the "impact" programmer for Linux that is not Redhat or Suse (such as Ubuntu).

To make impact work, I followed (roughly) these steps:
  1. Install the "fxload" and "libusb-1.0-0" and "libusb-1.0-0-dev" packages

    # apt-get install fxload libusb-1.0-0 libusb-1.0-0-dev
  2. The impact tool is built to look for the USB library in "/usr/lib64/libusb.so" (or /usr/lib/libusb.so on 32-bit systems), so a symbolic link needs to be made:

    # ln -s /usr/lib64/libusb-1.0.so /usr/lib64/libusb.so

    or, if using Ubuntu 12.04

    # ln -s /usr/lib/x86_64-linux-gnu/libusb-1.0.so /usr/lib/x86_64-linux-gnu/libusb.so

     
  3. The Xilinx firmware images needs to be available for udev.  From the root of the Xilinx package, copy the "*.hex" files to "/usr/share":

    # cp /opt/Xilinx/12.4/ISE_DS/ISE/bin/lin64/*.hex /usr/share
  4. The "udev" system needs to be configured for the Xilinx USB devices.  This important step loads the proper firmware, and sets the permissions on the device file that was created when the device is connected.  This requires placing a file in the /etc/udev.d directory.   After coppying the file, a change must be made to accomodate the new version of udev that Ubuntu uses.  This can be done using the "sed" command:



    # cp /opt/Xilinx/12.4/ISE_DS/ISE/bin/lin64/xusbdfwu.rules /etc/udev/rules.d

    # sed -i -e 's/TEMPNODE/tempnode/' -e 's/SYSFS/ATTRS/g' -e 's/BUS/SUBSYSTEMS/' /etc/udev/rules.d/xusbdfwu.rules
  5. Most sources that describe this process indicate that it is sufficient to restart udev.  I found that this isn't the case on my ubuntu system.  I rebooted the system at this point to enforce the new rules for udev.

    # reboot
  6. After the reboot, connecting the USB programmer to the host and the board should register the board with udev.  If everything worked at this point, you can use the "lsusb" command to detect the board.  The board must appear with the firmware version :0008.  The XUPV5 boards, without the proper firmware, appear as rev :000d. 

    # lsusb
    ...
    Bus 001 Device 006: ID 03fd:0008 Xilinx, Inc.
    ...
  7. Finally, to ensure that the Xilinx tools will use the libusb driver (instead of the windrvr version), an environment variable must be set.  The best place for this, in most cases, is the settings file.  Edit the settings file, and add the

    export XIL_IMPACT_USE_LIBUSB=1
  8. Finally, test out connectivity by loading the "impact" utility, and initializing the boundary scan

No comments: