Tech Stuff
For this installation we will not use the provided setup_usb script from Xilinx, because it makes the installation of the scripts in /etc/hotplug which were substituted by udev.
apt-get install fxload libusb-0.1-4 libusb-dev
cat /opt/Xilinx/14.7/ISE_DS/common/bin/lin64/xusbdfwu.rules # version 0003 SYSFS=="03fd", SYSFS=="0008", MODE="666" BUS=="usb", ACTION=="add", SYSFS=="03fd", SYSFS=="0007", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusbdfwu.hex -D $TEMPNODE" BUS=="usb", ACTION=="add", SYSFS=="03fd", SYSFS=="0009", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xup.hex -D $TEMPNODE" BUS=="usb", ACTION=="add", SYSFS=="03fd", SYSFS=="000d", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_emb.hex -D $TEMPNODE" BUS=="usb", ACTION=="add", SYSFS=="03fd", SYSFS=="000f", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xlp.hex -D $TEMPNODE" BUS=="usb", ACTION=="add", SYSFS=="03fd", SYSFS=="0013", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xp2.hex -D $TEMPNODE" BUS=="usb", ACTION=="add", SYSFS=="03fd", SYSFS=="0015", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xse.hex -D $TEMPNODE"
As for the rules for rules file creation, i created a copy of the which consisted, on removing BUS= code» style=»background-color: #f7f9fa; border: 1px dashed rgb(140, 172, 187);»>sed /opt/Xilinx/14.7/ISE_DS/common/bin/lin64/xusbdfwu.rules -e ‘s:BUS==»usb», ::g’ -e ‘s:SYSFS:ATTRS:g’ -e ‘s:TEMPNODE:tempnode:g’ > /etc/udev/rules.d/xusbdfwu.rules
Now let’s copy the usb firmware to the expected location (/usr/share), so udev can load the appropriate firmware to the device.
cp /opt/Xilinx/14.7/ISE_DS/common/bin/lin64/xusb*.hex /usr/share/
Now connect your device to the computer. If everything went okay the device enumeration should go this way:
kernel: [36003.892056] usb 2-1: new high-speed USB device number 4 using ehci_hcd kernel: [36004.024493] usb 2-1: New USB device found, idVendor=03fd, idProduct=000d kernel: [36004.024499] usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 kernel: [36004.084649] usb 2-1: USB disconnect, device number 4 kernel: [36006.272080] usb 4-1: new full-speed USB device number 3 using uhci_hcd kernel: [36006.411949] usb 4-1: not running at top speed; connect to a high speed hub kernel: [36006.433946] usb 4-1: New USB device found, idVendor=03fd, idProduct=0008 kernel: [36006.433952] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 kernel: [36006.433956] usb 4-1: Product: XILINX kernel: [36006.433959] usb 4-1: Manufacturer: XILINX kernel: [36009.256112] usb 4-1: USB disconnect, device number 3 kernel: [36010.812067] usb 2-1: new high-speed USB device number 6 using ehci_hcd kernel: [36010.944863] usb 2-1: New USB device found, idVendor=03fd, idProduct=0008 kernel: [36010.944869] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 kernel: [36010.944874] usb 2-1: Product: XILINX kernel: [36010.944877] usb 2-1: Manufacturer: XILINX
What happens is that after the device is enumerated the udev loads the firmware into it through fxload, after that it gets enumerated and then it restarts it.So just after the second disconnect (third enumeration) the device is ready to used.
You will also need to create a link for the shared library, because impact will search for libusb in /usr/lib64/ and the libusb is installed on /usr/lib/x86_64-linux-gnu/
cd /usr/lib64/ ln -s ../lib/x86_64-linux-gnu/libusb-0.1.so.4 libusb.so
Блог Войтика Дмитрия про всякое электронное и не очень
В данной заметке я изложу по шагам последовательность действий установки и настройки ПО для поддержки программаторов фирмы Xilinx для ОС GNU/Linux и ПО САПР Xilinx ISE. Все ниже написанное проверялось под ОС Fedora 8. Использовался программатор Xilinx Platform Cable USB ( Model DLC9G ) и ISE версии 10.1 ( SP2 ). Я не рекомендую использовать драйверы windrv, а использовать libusb как промежуточную библиотеку доступа ПО Xilinx к программатору.
Для начала устанавливаем fxload:
fxload — это утилита загрузки прошивки в USB-контроллеры.
Итак, скачиваем, распаковываем и устанавливаем только ту часть пакета, которая необходима для загрузки прошивки:
$ wget ftp://ftp.xilinx.com/pub/utilities/fpga/install_drivers.tar.gz $ tar xvf install_drivers.tar.gz $ cd install_drivers/linux_drivers/pcusb $ su # ./setup_pcusb
Теперь можно проверить работоспособность программатора — подключаем его к USB и к плате. Проверяем если загорелся зеленый светодиод. Чтобы iMPACT не использовал драйвер windrvr, а использовал библиотеку libusb необходимо установить переменную окружения XIL_IMPACT_USE_LIBUSB в 1.
Я рекомендую ее поместить в .bashrc:
$ echo "export XIL_IMPACT_USE_LIBUSB=1" >> ~/.bashrc
Замечу, что данный прием работает только с ISE версии 10 и выше. Для старых версий (9 и 8) воспользуйтесь следующей ссылкой: http://rmdir.de/~michael/xilinx/.
Теперь проверяем работоспособность iMPACT:
$ . /opt/ise101/ISE/settings64.sh $ impact&
При создании новго проекта ( create new project ) отключаем автоматическое сканирование ( опцию Configure devices using Boundary-Scan (JTAG) устанавливаем в Enter a Boundary-Scan chain manualy ). В главном меню выбираем — Output -> Cable setup… и в появившемся диалоговом окне устанавливаем Communication Mode в Xilinx USB Cable и жмем Ок. Далее жмем Ctrl+I для запуска сканирования цепочки JTAG. В результате iMPACT должен найти поддерживаемые устройства.
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:
The terminal window opens in your home directory. Change directory to where the Xilinx USB drivers can be found.
cd //Xilinx//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:
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.
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.
Source the right Xilinx settings file:
source //Xilinx//ISE_DS/settingsNN.FFF
Where is the directory path where the Xilinx tools are installed, 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:
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.