Install Xilinx ISE - jhu-cisst/mechatronics-firmware GitHub Wiki

About

This page documents how to install Xilinx ISE and USB cable driver on Linux (Ubuntu). It also documents solutions for running Xilinx Coregen and Xilinx Platform Studio (XPS) in newer versions of Linux (e.g., Ubuntu 18.04+).

Download

Download from Xilinx website:
http://www.xilinx.com/support/download.html

Install

# change permission if necessary
chmod +x xsetup
# run installer
./xsetup

NOTE: Do not install cable driver!!!

NOTE: It is necessary to install libncurses5 on Ubuntu 20.04 (and probably other versions)

Set Environment Variables

Add the following function into your ~/.bashrc file, and call this function loadXilinx from terminal whenever you need to load environment variables for Xilinx. Note, however, that if you are using CMake to build the firmware, you do not need to set the environment variables.

function loadXilinx() {  
    # use settings32.sh if your system is 32-bit                                                    
    if [ -f /opt/Xilinx/13.4/ISE_DS/settings64.sh ]; then                    
        . /opt/Xilinx/13.4/ISE_DS/settings64.sh                              
    fi                                                                       
}

Get Xilinx ISE license file

Getting a license file for Xilinx ISE on recent versions of Linux, such as Ubuntu 16.04, is problematic. The easiest solution is to get the license file by logging in to the Xilinx website, https://www.xilinx.com/getlicense. The alternative is to run the Xilinx license manager, xlcm, either directly or via ise (the IDE). In this case, you should first run source settings64.sh (or source settings32.sh). The license manager will attempt to get the MAC address of your network card (even though it does not seem to be needed for the WebPACK license) and then use your browser to connect to the Xilinx website. For these steps to work, either or both of the following changes may be necessary:

  1. Set the network interface to eth0, which is required by the license manager (otherwise, it does not find the MAC address). There are two methods to do this:
    1. Set GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0" in \etc\default\grub, invoke update-grub and reboot. This permanently sets your network interface to eth0.
    2. Run the following commands to temporarily change from any_name to eth0 (until next reboot): ip link set any_name down; ip link set any_name name eth0; ip link set eth0 up
  2. If you are using Firefox, the license manager may fail to launch Firefox, showing an error such as GLIBCXX_3.4.10 not found. This can be fixed by replacing the libstdc++.so.6 in the Xilinx common/lib/lin64 directory with a soft link to the standard library (e.g., in /usr/lib/x86_64-linux-gnu). This change can be reverted after getting the license file.

Install USB Cable Driver

This is the tricky part. I found this http://www.rmdir.de/~michael/xilinx/ working on my setup.

#NOTE: replace /opt/Xilinx/13.4/ISE_DS/ISE with correct path
sudo ./setup_pcusb /opt/Xilinx/13.4/ISE_DS/ISE/
  • Add preload library scripbt to loadXilinx function
function loadXilinx() {  
    # use settings32.sh if your system is 32-bit                                                    
    if [ -f /opt/Xilinx/13.4/ISE_DS/settings64.sh ]; then                    
        . /opt/Xilinx/13.4/ISE_DS/settings64.sh                              
    fi
    
    # replace /path/to with real path 
    if [ -f /path/to//libusb-driver.so ]; then                      
        export LD_PRELOAD=/path/to/libusb-driver.so                
        echo "preloaded libusb-driver.so"                                                         
    else                                                     
        (>&2 echo "Can not find libusb-driver.so!")                                               
    fi                        
}

Note: It is probably easier to just use Vivado for JTAG programming.

Run programs

Make sure all the environment variables have been set up before you try to start any Xilinx programs by calling loadXilinx() in terminal.

# ISE 
ise

Xilinx Coregen

On newer versions of Ubuntu, coregen will fail due to the use of an older version of Java (Java5). The solution is to instead use Java6. The following commands back up the default version of java and then replace it with a link to java6.

mv /opt/Xilinx/14.7/ISE_DS/ISE/java/lin64/jre/bin/java /opt/Xilinx/14.7/ISE_DS/ISE/java/lin64/jre/bin/java.old
ln -s /opt/Xilinx/14.7/ISE_DS/ISE/java6/lin64/jre/bin/java /opt/Xilinx/14.7/ISE_DS/ISE/java/lin64/jre/bin/java

Xilinx Platform Studio Setup

With Ubuntu 18.04 or above, you may experience problems using Xilinx Platform Studio (XPS), e.g., it only serves as a text editor. This is because the old libstdc++ libraries do not work with newer versions of Ubuntu/Linux, i.e., any version greater than and including 18.04. The solution is to move the incompatible libraries to a different folder so that XPS cannot find them.

sudo mkdir /opt/Xilinx/14.7/ISE_DS/ISE/lib/lin64/<backup-folder> 
sudo mv /opt/Xilinx/14.7/ISE_DS/ISE/lib/lin64/libstdc++* /opt/Xilinx/14.7/ISE_DS/ISE/lib/lin64/<backup-folder>/
 
sudo mkdir /opt/Xilinx/14.7/ISE_DS/common/lib/lin64/<backup-folder> 
sudo mv /opt/Xilinx/14.7/ISE_DS/common/lib/lin64/libstdc++* /opt/Xilinx/14.7/ISE_DS/common/lib/lin64/<backup-folder>/

This assumes you installed Xilinx Development Kit in /opt. If not, replace /opt with the path to your Xilinx Development Kit.

References

Contact

Jintan Zhang
jzhan247 at jhu.edu

Peter Kazanzides pkaz at jhu.edu