Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • See Xilinx Answer Record Platform Cable USB/USB-II - Libusb Driver support available on Linux
  • See FPGARelated.com posts, especially the one by Jan Pech
    • Note formatting issues in this post. Get rid of all 3D instances; fix wrapped lines to be single lines; be sure to introduce spaces where they were deleted by the line wrap
    • The resulting xusbdfwu.rules should look like:
      Code Block
      # version 0003
      ATTR{idVendor}=="03fd", ATTR{idProduct}=="0008", MODE="666"
      SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="03fd", ATTR{idProduct}=="0007", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusbdfwu.hex -D $tempnode"
      SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="03fd", ATTR{idProduct}=="0009", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xup.hex -D $tempnode"
      SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="03fd", ATTR{idProduct}=="000d", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_emb.hex -D $tempnode"
      SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="03fd", ATTR{idProduct}=="000f", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xlp.hex -D $tempnode"
      SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="03fd", ATTR{idProduct}=="0013", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xp2.hex -D $tempnode"
      SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="03fd", ATTR{idProduct}=="0015", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xse.hex -D $tempnode"
      
  • Make sure dongles are disconnected from USB and applications attempting to interact with them are not running
  • Become root (sudo -m)
  • Need to have libusb, libusb1, fxload installed (see above)
    Code Block
    yum install libusb libusb1 fxload
    
  • Write permission is needed to run the installation script, so
    Code Block
    cp -r $XILINX/bin/lin64 /tmp/xilinx
    
    on the machine on which the drivers are to be installed
    • If a 32 bit machine, use cp -r $XILINX/bin/lin /tmp/xilinx
  • Modify /tmp/xilinx/lin64/setup_pcusb:
    • Force it to use udev by changing the lines:
      Code Block
      TP_USE_UDEV="0"
      TP_UDEV_ENABLED=`ps -e | grep -c udevd`
      
      to:
      Code Block
      TP_USE_UDEV="1"
      TP_UDEV_ENABLED="1"
      
    • Make the script executable (chmod +x setup_pcusb)
  • Execute it (./setup_pcusb)
    Apparently errors are ignorable. Output looks something like:
    Code Block
    
    --File /usr/share/xusbdfwu.hex does not exist.
    --Error getting file version for /usr/share/xusbdfwu.hex.
    --Updating xusbdfwu.hex file.
    --File /usr/share/xusb_xlp.hex does not exist.
    --Error getting file version for /usr/share/xusb_xlp.hex.
    --Updating xusb_xlp.hex file.
    --File /usr/share/xusb_emb.hex does not exist.
    --Error getting file version for /usr/share/xusb_emb.hex.
    --Updating xusb_emb.hex file.
    --File /usr/share/xusb_xpr.hex does not exist.
    --Error getting file version for /usr/share/xusb_xpr.hex.
    --Updating xusb_xpr.hex file.
    --File /usr/share/xusb_xup.hex does not exist.
    --Error getting file version for /usr/share/xusb_xup.hex.
    --Updating xusb_xup.hex file.
    --File /usr/share/xusb_xp2.hex does not exist.
    --Error getting file version for /usr/share/xusb_xp2.hex.
    --Updating xusb_xp2.hex file.
    --File /usr/share/xusb_xse.hex does not exist.
    --Error getting file version for /usr/share/xusb_xse.hex.
    --Updating xusb_xse.hex file.
    --File /etc/udev/rules.d/xusbdfwu.rules exists.
    --File /etc/udev/rules.d/xusbdfwu.rules version = 0003
    --File xusbdfwu.rules exists.
    --File xusbdfwu.rules version = 0003
    --File xusbdfwu.rules is already updated.
    
  • Ensure the hex files were installed in /usr/share
    Code Block
    $ ls -l /usr/share/*.hex
    -rw-r--r-- 1 root bin 21708 Feb  9 13:30 /usr/share/xusb_emb.hex
    -rw-r--r-- 1 root bin 21708 Feb  9 13:30 /usr/share/xusb_xlp.hex
    -rw-r--r-- 1 root bin 22956 Feb  9 13:30 /usr/share/xusb_xp2.hex
    -rw-r--r-- 1 root bin 20740 Feb  9 13:30 /usr/share/xusb_xpr.hex
    -rw-r--r-- 1 root bin 22956 Feb  9 13:30 /usr/share/xusb_xse.hex
    -rw-r--r-- 1 root bin 21666 Feb  9 13:30 /usr/share/xusb_xup.hex
    -rw-r--r-- 1 root bin 21666 Feb  9 13:30 /usr/share/xusbdfwu.hex
    
    If the permissions or ownership aren't as above, change them
  • Ensure the rules were installed in /etc/udev/rules.d
    Code Block
    $ ls -l /etc/udev/rules.d/xusbdfwu.rules
    -rw-r--r--  1 root root  987 Feb  9 15:04 xusbdfwu.rules
    
    If the permissions or ownership isn't as above, change them
  • Plug a dongle into a USB port
  • Use lsusb to see whether a line like Bus 002 Device 013: ID 03fd:0008 Xilinx, Inc. appears
    You should find a file called /proc/bus/usb/<Bus>/<Device>
  • Use dmesg to look for errors. When it's working properly, you'll see something like:
    Code Block
    usb 2-1: new high speed USB device using ehci_hcd and address 13
    usb 2-1: New USB device found, idVendor=03fd, idProduct=0008
    usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    usb 2-1: Product: XILINX    
    usb 2-1: Manufacturer: XILINX 
    usb 2-1: configuration #2 chosen from 1 choice
    
  • If it's not working properly, try running the fxload command found in /etc/udev/rules.d/xusbdfwu.rules by hand. Use the one that has the same idVendor and idProduct given in the dmesg output. Use /proc/bus/usb/<Bus>/<Device> for $tempnode.
  • The drivers are loaded when the dongle's light is either amber or green.

...