zoukankan      html  css  js  c++  java
  • 在Debian sid (squeeze) 下安装Quartus10.1 USB驱动&&Xilinx Cable驱动&&遇到的一些问题的解决方法

    环境:
    Debian sid (squeeze)
    Quartus II 10.1 && Xilinx ISE 12.4

    执行以下命令:
    sudo gedit /etc/udev/rules.d/51-usb-blaster.rules
    加入以下内容:
    # USB-Blaster
    SUBSYSTEM=="usb", SYSFS{idVendor}=="09fb", SYSFS{idProduct}=="6001", MODE="0666", SYMLINK+="usbblaster"
    sudo gedit /etc/fstab
    加入以下内容:
    usbfs /dev/bus/usb usbfs devmode=0666 0 0
    再启动"Hardware Setup..."
    为了避免在开机时提示ATTR{}之类的问题,可以将rules使用新格式修改:
    SUBSYSTEM=="usb",ATTR{idVendor}=="09fb", ATTR{idProduct}=="6001", MODE="0666",
    SYMLINK+="usbblaster"
    然后在fstab中加入上面usbfs....内容
    引用:http://www.techno-st.net/wiki/Altera_USB-Blaster_on_Debian
    在Debian上安装Xilinx Platform Cable USB driver比较费劲
    sudo apt-get install libdb-dev
    sudo apt-get install libusb-0.1-4 libusb-dev fxload
    sudo sed /home/shengansong/EDA/Xilinx/12.4/ISE_DS/ISE/bin/lin/xusbdfwu.rules -e 's:TEMPNODE:tempnode:g' > /etc/udev/rules.d/xusbdfwu.rules
    xusbdfwu.rules内容:
    # version 0003
    ATTRS{idVendor}=="03fd", ATTRS{idProduct}=="0008", MODE="666"
    SUBSYSTEMS=="usb", ACTION=="add",ATTRS{idVendor}=="03fd", ,ATTRS{idProduct}=="0007", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusbdfwu.hex -D $tempnode"
    SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="03fd", ATTRS{idProduct}=="0009", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xup.hex -D $tempnode"
    SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="03fd", ATTRS{idProduct}=="000d", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_emb.hex -D $tempnode"
    SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="03fd", ATTRS{idProduct}=="000f", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xlp.hex -D $tempnode"
    SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="03fd", ATTRS{idProduct}=="0013", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xp2.hex -D $tempnode"
    SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="03fd", ATTRS{idProduct}=="0015", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xse.hex -D $tempnode"
    然后将.hex文件复制到/usr/share
    sudo cp /home/shengansong/EDA/Xilinx/12.4/ISE_DS/ISE/bin/lin/xusb*.hex /usr/share/
    sudo /etc/init.d/udev restart

    http://itee.uq.edu.au/~listarch/microblaze-uclinux/archive/2007/03/msg00101.html

    Get the usb bus and number

    $ lsusb | grep Xilinx # note the bus and number (in my case 002 and 004 respec.)

    if the output for previous lsusb command doesn't say 03fd:0008 (in my case this was 03fd:0009) then update the firmware with the command:

    sudo /sbin/fxload -v -t fx2 -I /usr/share/xusbdfwu.hex -D /proc/bus/usb/002/004
    #####################################################################################################
    附加网上找到的内容,关于windrvr的,上面的也要装,下面的也要装
    (本文由OpenHW.org 的Kevin原创,转载请注明。)
    XILINX的ISE能否在ubuntu上工作呢?XILINX的官方回答比较含糊,标准答案是:支持CentOS和RedHat, 其他类型的linux有成功的例子,但不保证。Walkie告诉我,其实ISE在很多其他版本的LINUX上的安装和运行其实是毫无问题的,唯一的问题就是下载线的驱动在有些LINUX上无法工作。
    继续深入研究,发现,下载线的驱动在某些linux下不工作的唯一原因是:目前,下载线的驱动依赖于一个叫windrvr的文件。 而该文件目前只有linux内核2.4的二进制版本,因此遇到2.6内核的linux发布版,如高版本的CentOS或高版本的ubuntu, 就不工作了。
    好在一个叫Michael Gernoth的德国人,大公无私地写了一个windrvr的替代版本,并且开放源码,这样,无论碰到什么版本的内核,现场编译一个驱动并安装,就能解决linux内核版本匹配的问题。源代码包在这里:
    http://git.zerfleddert.de/cgi-bin/gitweb.cgi/usb-driver?a=snapshot;h=HEAD;sf=tgz

    http://rmdir.de/~michael/xilinx/
    解开压缩包,编译的时候,只需要make就行了,当然,第一次make八成是不过的,因为一般人都不会在ubuntu上预装usb开发包,需要装一下,只需要这样就可以了:
    sudo apt-get install libusb-dev
    make完了以后,应该看到libusb-driver.so被生成了。
    当然,编译完还需要设环境量, 命令是,export LD_PRELOAD=/你的路径/libusb-driver.so ,为简单起见,可以把这个命令加你的.bashrc里,这样,下一次开一个终端时,就不用手工设了。
    你的linux用户需要进入lp组以便有权限,最简单的方法是编辑/etc/group, 把你的用户名加到lp组后面就可以了。
    这样,在纯ubuntu上跑xilinx 的问题基本宣告解决。
    ###############################################
    xps问题:编译的时候如果出现warning:LANG=(unset)。。。。。。而导致的错误则修改/etc/default/locale:
    sudo gedit /etc/default/locale
    LANG="en_US.UTF-8"
    LANGUAGE="en_US:en"
    ##################################################
    FATAL_ERROR:Simulator:Fuse:cpp Failed to compile one of the generated C files.
    http://forums.xilinx.com/t5/Simulation-and-Verification/ISIM-simulator-under-Kubuntu-10-10-Compile-error/td-p/125600
    可能的解决方法:
    /opt/Xilinx/12.4/ISE_DS/common/lib/lin
    /opt/Xilinx/12.4/ISE_DS/ISE/lib/lin
    do the following
    # mkdir old
    # mv libstdc++.so* old
    If you are running on a 64 bit system you may have to install all the ia32 libraries.
    Then you need to install gnome or XFCE or some other window manager. ISE segfaults in KDE for some reason.
    I have tested this on three computers with the same result.
    #################################################################
    fpga_editor无法打开(libxm.so.3无法找到)
    安装libmotif3
    #################################################################3
    Wind/U X-toolkit Error: wuDisplay: Can't open display:
    export DISPLAY=:0

     #######################################################################################

    关于glibc detect的问题

    I was able to suppress the error (build is luckily unaffected by this, so just preventing the segfault from terminating the build is sufficient) by adding another level of wrapper on top of trce.

     

    The procedure is the following:

     

    1. Unpack the archive in some directory (say, /home/user), it will create trce-wrapper directory

    2. cd trce-wrapper

    3. make

    4. cd $XILINX/bin/lin/

    (lin should be lin64 on 64-bit systems, use "su" or "sudo -s" to become root if Xilinx tools are installed in non-user-writable directory such as /opt)

    5. mv -i trce trce.real

    (if mv asks to overwrite trce.real, don't confirm it -- it means that you have already done so)

    6. ln -s trce unwrapped/trce.real

    7. cp /home/user/trce-wrapper/trce-wrapper trce

     

    Please be careful with those operations -- you are replacing Xilinx trce executable with your own one after original executable was renamed to trce.real, and to keep it working, a symlink to unwrapped/trce executable is created as unwrapped/trce.real . If you will have to restore this setup, you should rename trce.real to trce, and remove unwrapped/trce.real file (despite its name, it's not the real file, it's a symlink you have created).

     

    I still don't know what exactly causes the crash. The obvious part is, glibc safeguard was tripped by memory allocation problem. It is most likely related to XML processing in Xalan library, however just as well it's possible that memory corruption happened somewhere else, and Xalan library was just unlucky enough to perform memory deallocation when memory was already inconsistent. As I said before, luckily this does not break the build -- trce utility generates a report, and report is already finished at the time of crash.

     



    (本文由OpenHW.org 的Kevin原创,转载请注明。)









    XILINX的ISE能否在ubuntu上工作呢?XILINX的官方回答比较含糊,标准答案是:支持CentOS和RedHat, 其他类型的linux有成功的例子,但不保证。 








     Walkie告诉我,其实ISE在很多其他版本的LINUX上的安装和运行其实是毫无问题的,唯一的问题就是下载线的驱动在有些LINUX上无法工作。 









    继续深入研究,发现,下载线的驱动在某些linux下不工作的唯一原因是:目前,下载线的驱动依赖于一个叫windrvr的文件。 而该文件目前只有linux内核2.4的二进制版本,因此遇到2.6内核的linux发布版,如高版本的CentOS或高版本的ubuntu, 就不工作了。 









    好在一个叫Michael Gernoth的德国人,大公无私地写了一个windrvr的替代版本,并且开放源码,这样,无论碰到什么版本的内核,现场编译一个驱动并安装,就能解决linux内核版本匹配的问题。源代码包在这里: 









    git.zerfleddert.de/cgi-bin/gitweb.cgi/usb-driver









    解开压缩包,编译的时候,只需要make就行了,当然,第一次make八成是不过的,因为一般人都不会在ubuntu上预装usb开发包,需要装一下,只需要这样就可以了:









    sudo apt-get install libusb-dev









    make完了以后,应该看到libusb-driver.so被生成了。









    当然,编译完还需要设环境量, 命令是,export LD_PRELOAD=/你的路径/libusb-driver.so ,为简单起见,可以把这个命令加你的.bashrc里,这样,下一次开一个终端时,就不用手工设了。









    你的linux用户需要进入lp组以便有权限,最简单的方法是编辑/etc/group, 把你的用户名加到lp组后面就可以了。 









    这样,在纯ubuntu上跑xilinx 的问题基本宣告解决。




  • 相关阅读:
    Python 从入门到实践
    Python 斐波那契数列
    Python 纸牌游戏
    Python hangman小游戏
    BC #49 1001 Untitled
    BC#50 1003 The mook jong
    BC #50 1001 Distribution money
    vector
    stack
    queue
  • 原文地址:https://www.cnblogs.com/shengansong/p/1973388.html
Copyright © 2011-2022 走看看