How-to Install Digilent Cable Driver for Xilinx Design Suite on Ubuntu 11.10

It has always been a problem to install cable driver for Xilinx Design Suite on Linux machines since the day I was introduced to Xilinx FPGA.

Recently, I received many questions concerning the installation, which matters libusb issues, kernel issues and permission problems.

So, I would like to write a detailed guide about the installation procedure.

 

Section I: The packages you need

The package you need before installation are list as follows:

1. libusb for your distribution

    for Ubuntu OS, you can install it with command:

          $ sudo apt-get install libusb

    for CentOS, Fedora, or RHEL, you can install with:

          $ sudo yum install libusb

2. Digilent Adept Runtime x32 / x64

     Digilent Adept Runtime package is available at website 
     http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,66,828&Prod=ADEPT2

     0001

      Chose the package according to your linux OS. If it’s a 32-bit OS, dowload Adept 2.8.2 Runtime x86 Linux. If it’s 64-bit kernel, download Adept 2.8.2 Runtime x64 Linux.

      The downloaded software package is wrapped in format .tar.gz.

3. Digilent Adept Utilities x32/x64

     Digilent Adept Utilities package is available at website  
     http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,66,828&Prod=ADEPT2

     0001

      Chose the package according to your linux OS. If it’s a 32-bit OS, dowload Adept 2.8.2 Utilities x86 Linux. If it’s 64-bit kernel, download Adept 2.8.2 Utilities x64 Linux.

      The downloaded software package is wrapped in format .tar.gz.

4. Digilent Plugins x32/64

      Download Digilent Plugin for Xilinx Design Suite if you want to download your bitstream from XPS, ISE or iMPACT directly and debug with SDK or Chipscope.

      Digilent Plugin is available at website

      http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,66,768&Prod=DIGILENT-PLUGIN

     0002

       Chose the package according to your linux OS. If it’s a 32-bit OS, dowload Adept 2.8.2 Utilities x86 Linux. If it’s 64-bit kernel, download Adept 2.8.2 Utilities x64 Linux.

        The downloaded software package is wrapped in format .tar.gz.

5. Xilinx Design Suite

     I believe you have already have the Xilinx Tools installed. But remember, do not ever install the cable driver provided inside Smile with tongue out

 

Section II: Installation

1. Decompress all packages.

    Let’s say all packages are stored under ~/Download (~ is the home directory under your login name, i.e. /home/<username>)

    As I installed ubuntu 11.10 x64 on my laptop, the packages I have are shown in the figure below:

    0003

    Decompress all packages with command “tar zxvf <filenames>”

    0004

2. Install Digilent Adept Runtime 2.8.2

     Enter directory digilent.adept.runtime_2.8.2-<platform>

     run command “$ sudo ./install.sh” and keep all default locations unchanged.

     * NOTE: If you are install on Ubuntu 11.10 or other recent distributions with kernel version >= 3.0 (verify it with command `uname –r`)
                      You need to add the following lines after line 209: cprocUdev=$ (ps –e | grep –I –c udevd)

209 cprocUdev=$(ps -e | grep -i -c udevd) 
210 
211 if [ "${szVmjr}" = "3" ] 
212 then 
213        if (( $cprocUdev )) 
214        then 
215               let fUseUdev=1 
216        fi 
217 fi

                      0005

     Here is the log:

[WangTH@localhost digilent.adept.runtime_2.8.2-x86_64]$ sudo ./install.sh
Adept Runtime Installer
64-bit operating system detected
In which directory should libraries be installed? [/usr/local/lib64/digilent/adept]
Installing runtime libraries…..
Successfully installed runtime libraries.
Installing system binaries…..
    installed "/usr/local/sbin/dftdrvdtch"
Successfully installed system binaries in "/usr/local/sbin".
Installing firmware images…..
Successfully installed firmware images in "/usr/local/share/digilent/data/firmware".
Installing JTSC device list…..
Successfully installed JTSC device list "/usr/local/share/digilent/data/jtscdvclist.txt".
Installing CoolRunner support files…..
Successfully installed CoolRunner support files in "/usr/local/share/digilent/data/xpla3".
Installing CoolRunner 2 support files…..
Successfully installed CoolRunner 2 support files in "/usr/local/share/digilent/data/xbr".
Installing Adept Runtime configuration…..
Successfully installed Adept Runtime configuration "/etc/digilent-adept.conf".
Installing USB UDEV rules…..
Successfully installed USB UDEV rules "/etc/udev/rules.d/52-digilent-usb.rules".
Installing dynamic loader configuration…..
Successfully installed dynamic loader configuration "/etc/ld.so.conf.d/digilent-adept-libraries.conf".
Successfully reloaded UDEV rules.

[WangTH@localhost digilent.adept.runtime_2.8.2-x86_64]$

3. Install Digilent Adept Utilities 2.8.2

     Enter directory digilent.adept.utilities_2.8.2-<platform>

     run command “$ sudo ./install.sh” and keep all default locations unchanged.

     Here is the installation log:

[WangTH@localhost digilent.adept.utilities_2.1.1-x86_64]$ sudo ./install.sh
[sudo] password for WangTH:
Adept Utilities Installer
64-bit operating system detected
In which directory should binaries be installed? [/usr/bin]
In which directory should manuals be installed? [/usr/local/man]
Installing binaries…..
    installed dadutil: "/usr/bin/dadutil"
    installed djtgcfg: "/usr/bin/djtgcfg"
Successfully installed binaries in "/usr/bin"
Installing manuals…..
    installed dadutil.1: "/usr/local/man/man1/dadutil.1"
    installed djtgcfg.1: "/usr/local/man/man1/djtgcfg.1"
Successfully installed manuals in "/usr/local/man"
Successfully installed Adept Utilities

4. Install Digilent Plugin for Xilinx Design Suites

    Enter directory libCseDigilent_2.0.5-<platform>

    Enter directory of the Xilinx DS version installed on your computer.

    For me, it was ISE13x, because I installed Xilinx DS 13.2

    There is a pdf under the folder named: Digilent_Plug-in_Xilinx_<versionNo>.pdf

    The document tells exactly how to install the Digilent Plugin and how to use it.

     To install plugin is quite easy, all you need to do is copy the libCseDigilent.so and libCseDigilent.xml to

     <Xilinx_DS_Path>/ISE/lib/lin64/plugins/Digilent/libCseDigilent/  (if 64-bit OS)

    or <Xilinx_DS_Path>/ISE/lib/lin/plugins/Digilent/libCseDigilent/ (if 32-bit OS)

    if there is no dir “Digilent” under <Xilinx_DS_Path>/ISE/lib/lin64/plugins/, just make a new dir with command mkdir.

    On my computer:

0006

Section III: Test and Troubleshoot

1. Connect your digilent board to your PC

     Test whether Adept utilities can recognize your board.

     All you need is to run the command “djtgcfg enum” and see whether your boards pop up.

2. Open iMPACT with command “impact&”

     See if any FPGA can be found on your JTAG chain.

(I will go on with this part later, good luck Smile with tongue out)

About these ads

30 thoughts on “How-to Install Digilent Cable Driver for Xilinx Design Suite on Ubuntu 11.10

  1. hi steven, I’m luis and I have some troubles with a virtex5-based board of digilent (i think is the ML505 board), I followed your instructions but I couldn’t make it work. No devices found, the outcome of dmesg is this :
    “[13373.096270] usb 1-4: new high speed USB device number 2 using ehci_hcd” and that’s it! No ttyUSB device is detected on /dev.
    the outcome of lsusb is ” Bus 001 Device 002: ID 03fd:000d Xilinx, Inc. ” where it should be noted that the usb cable is a jtag-usb from Digilent. I’ve spent a lot of time in google and nothing works. My linux is kubuntu 11.10. I think no driver is loaded of this device. Thanks for your attention.

    • Hi, Luis,

      ML505 board does not use Digilent JTAB Download Cable solution but uses the old xilinx JTAG cable driver.
      However, I believe that the xilinx always has trouble with their drivers.
      Here is the solution:

      You will find a several .hex file under ${XILINX_ISE}/bin/lin(64)/install_script/install_drivers/pcusb
      xusbdfwu.hex xusb_emb.hex xusb_xlp.hex xusb_xp2.hex xusb_xpr.hex xusb_xse.hex xusb_xup.hex
      copy all hex files to /usr/share

      Then, copy the rule file: xusbdfwu.rules
      to /etc/udev/rules.d

      And everything will be fine now :P

      Hope that helps.
      Good luck!

  2. Hello and thank you for this guide

    I followed your guide but i can’t get it to work. When i’m running “djtgcfg enum” i get the error: djtgcfg: error while loading shared libraries: libdabs.so.2: cannot open shared object file: No such file or directory

    I have a file named libdabs.so.2 in /usr/local/lib/digilent/adept/

    If you have any idea of what might be wrong please let me know, this is driving me nuts.

      • Well.

        1. If the libdabs.so is not found, please check the attributes of libdabs.so.2.
        In some Ubuntu OS, when a copy is performed from a NTFS disk to EXT disk,
        read/write attributes may get messed up.
        Make sure that the file libdabs.so.2 is readable.

        2. ML505 has to be programmed by Xilinx Impact instead of using Digilent Adept Tools.

      • Maybe: (README)
        Dynamic Loader Configuration File (digilent-adept-libraries.conf):
        In order for applications that use the Adept Runtime to execute the
        dynamic loader must be able to find the shared libraries that the
        Runtime consists of. The file “digilent-adept-libraries.conf” contains
        the expected default installation path for both 32-bit and 64-bit
        Runtime libraries. Edit this file to contain paths that are appropriate
        for your installation. The following commands, when executed with
        superuser privileges, will install the dynamic loader configuration
        file in the appropriate location.

        cp -f digilent-adept-libraries.conf /etc/ld.so.conf.d
        chmod 644 /etc/ld.so.conf.d/digilent-adept-libraries.conf

        Once the dynamic loader configuration file has been installed it is
        necessary to have the dynamic loader update its cache. The following
        command, when executed with superuser privileges, can be used to force
        the cache to be updated.

        /sbin/ldconfig

  3. Has anyone installed this on Fedora 16? I keep getting a segmentation fault when running. I have this installed on another machine with Fedora 15 and its works without a problem. Any ideas?

    • I installed Adept on Fedora16. There is an apparent incompatibility with libusb1 : crash occurs in this library. Adept works fine on f15, f14, etc. The difference is that f16 uses libusb1 version 1.0.9 and f14 uses 1.0.8.

      I get it to work this way :

      - get libusb1 1.0.8 source package from sourceforge
      - configure and compile it so that it is installed in its own directory, not in /usr :
      $ cd libusb-1.0.8
      $ ./configure –prefix=/usr/local/libusb1-1.0.8
      $ make
      $ make install (as root user)
      - In /usr/local/bin rename the two binaries dadutil and djtgcfg as (for example) dadutil.bin and djtgcfg.bin
      - write two small shell scripts named dadutil and djtgcfg with contents :

      #!/bin/sh
      export LD_LIBRARY_PATH=/usr/local/libusb1-1.0.8/lib:$LD_LIBRARY_PATH
      exec `dirname $0`/dadutil.bin $*

      and

      #!/bin/sh
      export LD_LIBRARY_PATH=/usr/local/libusb1-1.0.8/lib:$LD_LIBRARY_PATH
      exec `dirname $0`/djtgcfg.bin $*

      - make them executable
      $ chmod a+rx dadutil djtgcfg

      This makes Adept run without crashing.

      Xilinx Impact also crashes when using the digilent plugin. The crash occurs early when trying to setup the cable (Boundary Scan -> Cable Setup…). The fix that worked for me is to make links in /opt/Xilinx/12.4/ISE_DS/common/lib/lin/ (for ISE 12.4) or /opt/Xilinx/13.4/ISE_DS/common/lib/lin/ (for ISE 13.4) to the libusb-1.0.so* located in /usr/local/libusb1-1.0.8/lib :

      $ cd /opt/Xilinx/13.4/ISE_DS/common/lib/lin/
      $ for f in /usr/local/libusb1-1.0.8/lib/lib/libusb-1.0.so*; do ln -s $f ; done

      and then using the instructions provided by Digilent for the libCseDigilent plugin to install the plugin and setup the cable, Impact does not crash and can be used to program the FPGA.

      Hope it helps.

  4. Hi, I followed your tutorial, and made sure that every step was done correctly, but I have come to the point where I don’t know how to proceed.

    When I connect the Basys 2 or Atlys board and type lsusb, I see one entry for digilent CoolRunner II CPLD Starter Kit. If I try djtgcfg enum, it replys with No devices found.

    Could you please help me? I have googled all over for digilent support to no avail.

    I am using Ubuntu 12.04.

      • The recent post about problems are found due to two issues:

        1. for Fedora 14+, a new version of libusb is used by distribution so that the previous built of adept will come up with a segmentation fault. It has been fixed in recent release of adept I believe.

        2. for Ubuntu 12.04, udev rules changed it’s syntax. So, the device file won’t change the mode of file to 666(rw-rw-rw) by udev automatically. As proposed in the link, the ATTR and ATTRS can be used instead to solve the problem.

      • Thanks for your reply, after hours of fiddling around with the udev rules file, I have come to this conclusion for Ubuntu 12.04 LTS distro:


        ACTION!="add|change", GOTO="digilent_config_end"

        # Digilent USB Rules
        SUBSYSTEM=="usb", ATTRS{idVendor}=="1443", MODE:="0666"
        # Digilent FTDI? Rules
        SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{manufacturer}=="Digilent", MODE:="0666", RUN+="/usr/local/sbin/dftdrvdtch %s{busnum} %s{devnum}"

        LABEL="digilent_config_end"

        Just following the help found at the previously supplied link wouldn’t cut it for my installation, so I had to modify MODE=”666″ to MODE:=”666″ and that solved it.

  5. hello thanks for the guide :)
    just one problem impact closing down when intialise the chain ? the step one where you have to set cprocUdev=$ (ps –e | grep –I –c udevd) in line 209 but where what file ?? or am i missing something ? :)

    • Hi Dennis,

      I experienced as same as your problem. How did you solve this? Please i need more help about this and /dev/ttyUSB0 problem. I can’t see the /dev/ttyUSB0 device on GtkTerm program.

      Best regards.

  6. Thanks for sharing this with us.
    I followed the step and everything went fine. However, I had the following issues.
    There is no plugins directory under Xilinx/ISE/bin/lin only a digilent directory.
    Running the command “djtgcfg enum” i could see my card, however the card is still not visible in impact.

    Thanks
    C

  7. Hello; just to say that it works perfectly. THANK YOU !

    Just on thing for libusb, i had to use “libusb-dev” instead of “libusb”

    $ sudo apt-get install libusb-dev

  8. I tried at least 10 other guides on how to setup my nexys 3 board, and this was the only one that actually worked. Thanks for putting this together.

  9. Hello
    Tried this guide as well as several other, but still didn’t manage to see my ZedBoard. I am using Fedora 19, but after typing sudo djtgcfg enum I don’t get any result:
    [vzakharov@localhost bin]$ sudo djtgcfg enum
    [vzakharov@localhost bin]$
    In lsusb both chips are visible:
    Bus 002 Device 011: ID 0403:6014 Future Technology Devices International, Ltd FT232H Single HS USB-UART/FIFO IC
    Bus 005 Device 004: ID 04b4:0008 Cypress Semiconductor Corp.
    Would appreciate any help. I’m just going round a circle.. Thanks in advance.

  10. I can’t seem to get the cable to work from the Xilinx Atrix-7 FPGA AC701 Evaluation Kit. This includes the digilent usb device that is soldered on the board. The thing is linux and the udev entries seems to work, except that the adept utils tells me that the device doesn’t exist.

    I even tried reading from the device to see what happens, and it reacted by producing a number of bytes of data.

    It is almost as if the djtgcfg utility doesn’t even scan the usb devices. Does it maybe expect the usb devices to exist in a different place?

    When I enter (also as root):
    > djtgcfg enum
    No devices found

    > lsusb
    Bus 003 Device 004: ID 0403:6010 Future Technology Devices International, Ltd FT2232C Dual USB-UAST/FIFO IC

    > ls -l /dev/bus/usb/003/004
    crw-rw-rw-. 1 root root 189, 259 Jan 22 13:13 /dev/bus/usb/003/004

    • I did a little bit more digging by turning on debugging of libusb. libusb is able to find the device three and it seems to iterate over all devices. I see the digilent tool reading the description of each usb device and then exit. As if it doesn’t recognise the device.

  11. Pingback: Slackware64-current USB Device Problem

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s