back-arrow Go back to Linux on Xilinx FPGA Tutorials

Running Xilinx ISE and EDK 10.1 in Ubuntu 8.10 and 9.10

Updated to include information for 8.10, 9.10, and 64-bit Linux.

Contents

Instructions for Ubuntu 9.10 64-bit

  1. Replace dash with bash:

    sudo apt-get install bash
    ln -sf bash /bin/sh
    
  2. Install ISE and EDK, and Service Pack 3. When prompted to install the cable drivers, CHOOSE NO. (We're going to install an alternative driver, called the "libusb" driver using the setup_pcusb command described below.) These are the directories I used for installing ISE and EDK:

  • /home/xilinx/10.1_sp3/ise
  • /home/xilinx/10.1_sp3/edk
  1. Fake out various prerequisites:

    # Fake libdb-4.1.so (for 32-bit Linux):
    sudo apt-get install libdb4.2
    sudo ln -s libdb-4.2.so /usr/lib/libdb-4.1.so
    
    # NOTE: If you are running 64-bit Linux, try this instead:
    sudo apt-get install ia32-libs # provides libdb-4.7.so if you're lucky
    ln -s libdb-4.7.so /usr/lib32/libdb-4.1.so
    # NOTE: getlibs is a tool for installing 32-bit libs on 64-bit Ubuntu
    wget http://frozenfox.freehostia.com/cappy/getlibs
    chmod a+rx getlibs
    sudo ./getlibs libusb.so # installs 32-bit version libusb-dev for Impact
    
    # Fake gmake:
    sudo ln -s make /usr/bin/gmake
    
    # Fake Acrobat Reader (for datasheets in EDK):
    sudo apt-get install xpdf
    sudo ln -s xpdf /usr/bin/acroread
    
  2. Install more prerequisites and helper tools:

    sudo apt-get install libstdc++5
    sudo apt-get install fxload
    sudo apt-get install rlwrap # the readline wrapper
    
  3. Put the following function into .bashrc (or into some other system-wide environment script). Whenever opening a new shell, you must execute this function prior to running any Xilinx programs:

    x101sp3 () {
        local xil_home
        xil_home=/home/xilinx/10.1_sp3
        . $xil_home/chipscope/ChipScope/settings32.sh
        . $xil_home/ise/ISE/settings32.sh
        . $xil_home/edk/EDK/settings32.sh
        export PATH="$xil_home/edk/EDK/gnu/powerpc-eabi/lin/bin:$PATH"
        export PATH="$xil_home/edk/EDK/gnu/microblaze/lin/bin:$PATH"
        export XIL_IMPACT_USE_LIBUSB=1
        alias inserter='AWT_TOOLKIT=MToolkit inserter.sh'
        alias analyzer='AWT_TOOLKIT=MToolkit analyzer.sh'
    }
    
  4. Install the libusb cable drivers:

    # Restart your shell so that you have the "x101sp3" function
    # (i.e. the one described above)
    x101sp3 # to get the $XILINX environment variable
    cd $XILINX/bin/lin
    sudo su # switch to root
    
    # Restart the udevd service, because for some reason multiple udevd
    # processes sometimes get spawned which confuses setup_pcusb:
    /etc/init.d/udev restart
    
    . setup_pcusb
    . setup_pcusb # yes, do it again
    
    # Fix incorrect/broken rules (they will break in Ubuntu 9.10, but they
    # worked prior to that):
    perl -p -i.bak -e 's/BUS.*"03fd".*SYSFS.idProduct.=="(....)".*/SUBSYSTEM=="usb", ACTION=="add", ATTR\{idVendor\}=="03fd", ATTR\{idProduct\}=="\1", RUN+="\/sbin\/fxload -v -t fx2 -I \/usr\/share\/xusbdfwu.hex -D %N"/g' /etc/udev/rules.d/xusbdfwu.rules
    
    exit # get out of root
    
  5. Now you are set. To get access to the Xilinx tools, just run x101sp3 and then you'll be able to run ise, xps, and other commands. Here is an example usage:

    x101sp3 # <-- loads up the environment variables
    
    # To launch xps or ise or whatever:
    linux32 xps
    
    # To launch impact:
    # linux32 is only necessary if you are running 64-bit Linux:
    linux32 impact -batch etc/download.cmd
    
    # To launch XMD:
    rlwrap linux32 xmd -opt etc/xmd_ppc405_0.opt
    
    # To launch ChipScope:
    linux32 inserter.sh
    linux32 analyzer.sh
    

Instructions for Ubuntu 8.10 32-bit

  1. Replace dash with bash:

    sudo apt-get install bash
    ln -sf bash /bin/sh
    
  2. Install ISE and EDK, and Service Pack 3. When prompted to install the cable drivers, CHOOSE NO. (We're going to install an alternative driver, called the "libusb" driver using the setup_pcusb command described below.) These are the directories I used for installing ISE and EDK:

  • /home/xilinx/10.1_sp3/ise
  • /home/xilinx/10.1_sp3/edk
  1. Fake out various prerequisites:

    # Fake libdb-4.1.so (for 32-bit Linux):
    sudo apt-get install libdb4.2
    sudo ln -s libdb-4.2.so /usr/lib/libdb-4.1.so
    
    # Fake gmake:
    sudo ln -s make /usr/bin/gmake
    
    # Fake Acrobat Reader (for datasheets in EDK):
    sudo apt-get install xpdf
    sudo ln -s xpdf /usr/bin/acroread
    
  2. Install more prerequisites and helper tools:

    sudo apt-get install libstdc++5
    sudo apt-get install fxload
    sudo apt-get install rlwrap # the readline wrapper
    
  3. Put the following function into .bashrc (or into some other system-wide environment script). Whenever opening a new shell, you must run execute this function prior to running any Xilinx programs:

    x101sp3 () {
        local xil_home
        xil_home=/home/xilinx/10.1_sp3
        . $xil_home/chipscope/ChipScope/settings32.sh
        . $xil_home/ise/ISE/settings32.sh
        . $xil_home/edk/EDK/settings32.sh
        export PATH="$xil_home/edk/EDK/gnu/powerpc-eabi/lin/bin:$PATH"
        export PATH="$xil_home/edk/EDK/gnu/microblaze/lin/bin:$PATH"
        export XIL_IMPACT_USE_LIBUSB=1
        alias inserter='AWT_TOOLKIT=MToolkit inserter.sh'
        alias analyzer='AWT_TOOLKIT=MToolkit analyzer.sh'
    }
    
  4. Install the libusb cable drivers:

    # Restart your shell so that you have the "x101sp3" function
    # (i.e. the one described above)
    x101sp3 # to get the $XILINX environment variable
    cd $XILINX/bin/lin
    sudo su # switch to root
    . setup_pcusb
    . setup_pcusb # yes, do it again
    exit # get out of root
    
  5. Now you are set. To get access to the Xilinx tools, just run x101sp3 and then you'll be able to run ise, xps, and other commands. Here is an example usage:

    x101sp3 # <-- loads up the environment variables
    
    # To launch xps or ise or whatever:
    xps
    
    # To launch impact:
    impact -batch etc/download.cmd
    
    # To launch XMD:
    rlwrap xmd -opt etc/xmd_ppc405_0.opt
    
    # To launch ChipScope:
    inserter.sh
    analyzer.sh
    

Problems