Install Xilinx USB cable drivers for Ubuntu

来源:互联网 发布:日本历史地震数据统计 编辑:程序博客网 时间:2024/05/01 05:14

硬件环境:HP CQ45 308
操作系统:KUbuntu12.04 LTS 32bit
软件版本:ISE Design Suit 14.2 ; Vivado 2012.2
开发套件:ZEDBoard
        在Kubuntu12.04下安装ISE其实并不是非常麻烦,关键是使用Xilinx License Configuration Manager(xlcm)激活license非常麻烦,首先是Get free webpack license按钮不能链接到官方网页上,即鼠标点“connect now”没有反映,点“save”存储链接之后,弹出对话框让我选择存储路径,然后对话框就卡住没反应了,过一会就崩溃了。终端弹出如下信息:
kfmclient: /opt/Xilinx/14.2/ISE_DS/common//lib/lin/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /usr/lib/libkdecore.so.5)
kfmclient: /opt/Xilinx/14.2/ISE_DS/common//lib/lin/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libkdecore.so.5)
kfmclient: /opt/Xilinx/14.2/ISE_DS/common//lib/lin/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libstreamanalyzer.so.0)
kfmclient: /opt/Xilinx/14.2/ISE_DS/common//lib/lin/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /usr/lib/libstreamanalyzer.so.0)
kfmclient: /opt/Xilinx/14.2/ISE_DS/common//lib/lin/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /usr/lib/libstreamanalyzer.so.0)
kfmclient: /opt/Xilinx/14.2/ISE_DS/common//lib/lin/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /usr/lib/libstreams.so.0)
kfmclient: /opt/Xilinx/14.2/ISE_DS/common//lib/lin/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/libstreams.so.0)
kfmclient: /opt/Xilinx/14.2/ISE_DS/common//lib/lin/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /usr/lib/libstreams.so.0)
这方面国内的资料非常少,只能根据终端中报错信息google国外的网站,找到一个论坛,有个网友遇到和我一样的问题,解决方法是将libstdc++.so.6链接到系统中用的库,但是并没有能够解决问题。第一天装了好几次ise,结果都一样看。第二天,突然有了一点想法,之前在Ubuntu12.04上安装的时候都是好好的,现在换成KUbuntu12.04,也就是很有可能是换了桌面环境的缘故,于是马上Google"kde xilinx ise",这下找到两个网站:
http://forums.xilinx.com/t5/Installation-and-Licensing/Xilinx-ISE-Webpack-will-only-run-as-root-in-KDE-Slackware-64-14/td-p/287769
Xilinx ISE WebPACK - ArchWiki
都是讲ISE安装在KDE桌面环境下的问题,究其原因是ISE用的QT版本相比KUbuntu12.04上KDE用的QT版本来说(PS:KDE使用QT写出来的)太老了,但是ISE在使用过程中会使用QT_PLUGIN_PATH环境变量来查找要用的东西,这时候就会去调用KDE中的QT_PLUGIN_PATH,于是新老版本之间的兼容性问题产生了,以上两个网页都提到了将QT_PLUGIN_PATH环境变量unset掉就可以了,即在终端中:

$ unset QT_PLUGIN_PATH

现在打开Xilinx License Configuration Manager(xlcm)之后,弹出的对话框不会卡住,虽然上面那个libstdc++.so.6的链接库问题没有解决,即“connect now”不管用,不过我们可以将申请license用的网页链接保存下来再用浏览器打开。另外为了最大程度保持兼容性,安装时选择中文语言的在打开Xilinx一系列工具之前最好将语言设置成英文,即在终端中:

$ export LANG="en"

OK,license的问题解决了。

——————————————————————————————————————————————————————————————
        在综合(Run Synthesis)的过程中会遇到下面这个error:
[Edk 24-166] (generate_target): Failed to execute XPS script. Please check for any errors reported by the XPS application in the console: [/zynq/prjdir/HelloZynq/HelloZynq.srcs/sources_1/edk/system/__xps/pa/_system_synth.tcl]
这个问题网上比较普遍,究其原因是在综合的过程中ISE等软件会调用gmake(网友的解释是GNU make),但是在linux中“GNU make”的软件名称就是make,Xilinx真是够雷人的,于是我们只需要添加一个软链接将gmake链接到make就可以了,操作如下:

$ cd /usr/bin
$ sudo ln -s make gmake

即可解决问题。

____________________________________________________________________________________________________________
        关于USB JTAG驱动的安装:安装过程可以参考这个网页:http://elinux.org/Install_Xilinx_USB_cable_drivers_for_Ubuntu。简而言之人就是:

cd /<Install Path>/Xilinx/<Version Number>/ISE_DS/common/bin/lin/digilent

比如我是安装默认路径安装的,那么就是:

cd /opt/Xilinx/14.2/ISE_DS/common/bin/lin/digilent/

如果是64位的话把lin换成lin64,然后在当前目录下执行安装脚本

sudo ./install_digilent.sh

不过到这里还没有完全结束,我们还需要修改udev规则,上面的安装脚本会在/etc/udev/rules.d/目录下安装52-digilent-usb.rules,其实里面就一句话,其他的都是注释,内容如下:
SYSFS{idVendor}=="1443", MODE="666",GROUP="user"
ACTION=="add", SYSFS{idVendor}=="0403", SYSFS{manufacturer}=="Digilent", MODE="666", RUN+="/usr/local/sbin/dftdrvdtch %s{busnum} %s{devnum}"
主要参考这篇博客:http://hi.baidu.com/daxuelangren/item/7325b3fc3cf34b16d7ff8c4e,我把上面两条语句注释掉,然后加上下面这条:
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6014", GROUP="user", MODE="0666"
具体的id号可以在终端下输入一下命令查找对应USB设备的相关信息:

lsusb

接下来就是使得配置生效,万无一失的方法是重启系统。
如果不想重启系统的话,拔插一次USB线即可。因为udev 会自动检测规则文件的修改,所以更改不需要重启 udev 就会立即生效。但是规则不会被已有设备重新触发,所以热插拔设备(如USB设备等)可能需要重新连接才会使新规则生效,所以我们要把USB线拔插一次。
现在在impact以及Xilinx SDK下面都可以对FPGA进行配置了。
 impact下识别成功
KUbuntu12.04下安装Xilinx ISE+Vivado - 小辉辉 - 小辉辉的博客

Xilinx SDK下进行PROGRAM FPGA
KUbuntu12.04下安装Xilinx ISE+Vivado - 小辉辉 - 小辉辉的博客
 


____________________________________________________________________________________________________________
关于Vivado HLS,由于Ubuntu不是Xilinx官方支持的Linux发行版本,因此会难免出现很多兼容性问题,比如在VivadoHLS的使用过程中进行C仿真时会报告如下一些错误:
错误:
/opt/Xilinx/Vivado_HLS/2013.1/Linux_x86/tools/gcc/bin/../lib/gcc/i686-pc-linux-gnu/4.6.3/include-fixed/features.h:339:25: fatal error: sys/cdefs.h:没有那个文件或目录
分析:
编译过程中会寻找系统库函数,由于ubuntu中cedfs.h并不是在/usr/include/sys目录下,而是在/usr/include/i386-linux-gnu/sys目录下(我的系统是32位,如果是64位linux的话那么是在/usr/include/x86_64-linux-gnu/sys目录下)
解决方法:
这里我们可以添加一个软链接将/usr/include/sys/cdefs.h链接到/usr/include/i386-linux-gnu/sys/cdefs.h
不过鉴于这里的路径问题不只这一个,所以我干脆直接把整个文件夹的路径链接过去:

$ sudo ln -s /usr/include/i386-linux-gnu/sys/ /usr/include/sys

$ sudo ln -s /usr/include/i386-linux-gnu/gnu/ /usr/include/gnu

$ sudo ln -s /usr/include/i386-linux-gnu/bits/ /usr/include/bits

错误:
/usr/bin/ld: error: cannot open crt1.o: No such file or directory
/usr/bin/ld: error: cannot open crti.o: No such file or directory
/usr/bin/ld: error: cannot open crtn.o: No such file or directory
分析:
同样是与上面一样的路径问题,ubuntu中crt1.o, crtn.o, crti.o在/usr/lib/i386-linux-gnu中,但是vivado hls会去/usr/lib中寻找(我的系统是32位,如果是64位linux的话那么文件是在/usr/lib/x86_64-linux-gnu目录下)
解决方法:
软链接,同上相似

$ sudo ln -s /usr/lib/i386-linux-gnu/crt1.o /usr/lib$ sudo ln -s /usr/lib/i386-linux-gnu/crtn.o /usr/lib$ sudo ln -s /usr/lib/i386-linux-gnu/crti.o /usr/lib





Install Xilinx USB cable drivers for Ubuntu

Using Xilinx tools, iMPACT, Chipscope, ... on an UBUNTU 12.04LTS machine.


Being able to download configuration files in Xilinx FPGAs on Xilinx and othere demo boards and use tools a iMPACT, Chipscope, and etcetera requires he installation of drivers. In the past it often was a burden to get this going, in the latest releases of the software these drivers are delivered with the installation of the software.

I'll provide here the installation procedure on an Ubuntu 12.04LTS equipped machine but this procedure can also be followed for other Linux distributions.

After installing the Xilinx ISE software on your machine, open a terminal window using the following key-combination:

[CTRL] + [ALT] + T


The terminal window opens in your home directory. Change directory to where the Xilinx USB drivers can be found.

cd /<Install Path>/Xilinx/<Version Number>/ISE_DS/common/bin/lin64/digilent


The given path points to the 64-bit drivers, for the 32-bit versions replace "lin64" by "lin".

for the installation on my machine the path looks as:

/usr/Xilinx/14.4/ISE_DS/common/bin/lin64/digilent


Install the USB cable drivers for Xilinx tools

Install the USB cable drivers for Xilinx tools by typing in the terminal:

sudo ./install_digilent.sh


Provide your sudo password and the installation will start. Below is an example of the text that will appear in the terminal window while the drivers are installed:

    Digilent Cable Drivers Installer    Checking for prerequisite: libusb-1.0    libusb-1.0.so.0 is present    Installing component: Digilent Adept Runtime    Adept Runtime Installer    64-bit operating system detected    In which directory should libraries be installed? [/usr/local/lib64/digilent/adept] 

It is possible to specify a directory path here for the installation of the drivers, but normally you can just accept the default given path.

   Installing runtime libraries.....   Checking to see if libdabs.so is already installed....   No existing installation of libdabs.so found.   Installed shared library "/usr/local/lib64/digilent/adept/libdabs.so.2.10.1"   

The terminal screen will show a whole list of this kind of messages while all .so files are installed or installation is skipped because the libraries are already available.

   Checking to see if libjtsc.so is already installed....   No existing installation of libjtsc.so found.   Installed shared library "/usr/local/lib64/digilent/adept/libjtsc.so.2.7.2"   Created symbolic link "/usr/local/lib64/digilent/adept/libjtsc.so"   Created symbolic link "/usr/local/lib64/digilent/adept/libjtsc.so.2"   Successfully installed runtime libraries.   In which directory should system binaries be installed? [/usr/local/sbin] 

The libraries are installed and the question is asked where to install the binaries of the Xilinx USB cable drivers. Provide a path or accept the default given path by just hitting the enter/return key.

Remark:

The paths shown in the terminal text examples are those where the drivers are installed on my machine, it is possible that the install paths/locations are different for your machine and/or Linux distribution.

   Installing system binaries.....   installed "/usr/local/sbin/dftdrvdtch"   Successfully installed system binaries in "/usr/local/sbin".   In which directory should data files be installed? [/usr/local/share/digilent/data]

The binaries are installed and now the question is asked where to install the data files. Provide a pth or accept the given default by hitting enter/return.

   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".   In which directory should the Adept Runtime Configuration file be installed? [/etc]

Question asked by the installation flow where to install the runtime configuration file. As for may programs the default given path is /etc but hen wanted this can be anywere else by specifying a custom path.

   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.   Successfully updated dynamic loader cache.   Successfully installed Adept Runtime.   Successfully installed component: Digilent Adept Runtime

Xilinx and Digilent boards use a FTDI USB/RS232 device for communication and downloading of configuration files in the FPGA(s) on teh development / demo boards. The installation program checks if FTDI drivers are already available on the machine and if not installs them. Ubuntu is default equiped with Silabs USB/RS232 drivers, so the FTDI drivers will be installed. It is again possible to specify a location for these drivers. I've let the install tool use the default given location but maybe one wants to install drivers elsewhere, possibly were the Silabs drivers are installed.

   Installing component: FTDI Drivers (libftd2xx)   FTDI Driver Installer   64-bit operating system detected   In which directory should libraries be installed? [/usr/local/lib64]    Checking to see if libftd2xx.so is already installed....   No existing installation of libftd2xx.so found.   Installed shared library "/usr/local/lib64/libftd2xx.so.1.0.4"   Created symbolic link "/usr/local/lib64/libftd2xx.so"   Successfully installed dynamic loader configuration "/etc/ld.so.conf.d/ftdi-drivers.conf"   Successfully updated dynamic loader cache   Successfully installed FTDI Driver   Successfully installed component: FTDI Drivers (libftd2xx)
   Installing component: libCseDigilent   Installer for Plugins for Xilinx Tools   In which directory should plugins be installed? [/home/marc/.cse]
   Plugins will be installed in the following directory: "/home/marc/.cse"   Found plugin "libCseDigilent" version "14.1" by "Digilent".   Overwrite existing plugin "/home/marc/.cse/lin64/14.1/plugins/Digilent/libCseDigilent"? (y/n) [y] y   Successfully installed plugin in "/home/marc/.cse/lin64/14.1/plugins/Digilent/libCseDigilent".   Successfully installed 1 plugin(s) for Xilinx Tools.   Successfully installed component: libCseDigilent
   Successfully installed Digilent Cable Drivers

Voila, installation done and ready to be tested. Connect a development board via a USB cable to your PC and start a tool like iMPACT or Chipscope. 

Example for iMPACT

Start iMPACT via the menu, if you installed the menu system as described in another article on this web page or start iMPACT from the command line.

[CTRL] + [ALT] + T        

Source the right Xilinx settings file:

source /<Install Path>/Xilinx/<Version Number>/ISE_DS/settingsNN.FFF     

Where <Install Path> is the directory path where the Xilinx tools are installed, <Version Number> is the version of the Xilinx ISE software installed on your machine, NN = 32 or 64 bit machine and FFF = csh or sh shell used. Then type:

impact        

The iMPACT GUI will start and when it asks to automatically detect the JTAG chain, respond with yes. WHen the drivers are correctly installed the JTAG chain of components on the used development board will be displayed with icons on the iMPACT canvas.


Installation notes on ubuntu

  1 #!/bin/sh  2 if [ "${ARGS}" = "" ]; then  3  ARGS=-Dsun.java2d.d3d=false\ -Duser.dir=${root}  4 else  5  ARGS=${ARGS}\ -Dsun.java2d.d3d=false\ -Duser.dir=${root}  6 fi

if [ "${ARGS}" == "" ]; then
should modify to
if [ "${ARGS}" = "" ]; then



0 0
原创粉丝点击