^

AR# 29310 Platform Cable USB/USB-II - Libusb Driver support available on Linux

Starting with 10.1 Service Pack 1, the libusb package can be used to connect to the Platform Cable USB on the Linux platforms. This package replaces the functionality provided by the Jungo windrvr6 module. The use of libusb provides an alternative approach for users who encounter problems during the building and installation of the existing driver solution. To use libusb with the Platform Cable USB on Linux platforms, the following driver components must be installed:

(1) Cable Enumeration Drivers

These are required by the Operating System to recognize the USB cable. These drivers are currently installed through the ISE Installer. Alternatively, these drivers can be installed manually by changing the directory to the <Xilinx install root>/bin/lin directory (or the <Xilinx install root>/bin/lin64 directory on 64-bit Linux) and running the setup_pcusb script. The installation of these drivers requires root permission.

(2) The libusb Package

This package is required by client applications for use of the cable. This package might have been included in the user's Linux distribution. The installation of this component does not necessarily require root permission.

For more Cable Support Articles and other Configuration Related Articles, see (Xilinx Answer 34104)

Test for Presence of a Functional libusb Installation

The required cable driver components might already be present in the Linux install. To test whether this is the case:

1. Open a shell or terminal console.
2. Run the script to set the ISE settings (settings.sh or settings.csh).
3. Set the environment variable that enables the use of libusb. See the "Setting of the XIL_IMPACT_USE_LIBUSB environment variable" section below. This environment variable is not needed for iMPACT 11.1 as it is on by default.
4. Run iMPACT and open the Platform Cable USB. If the iMPACT log shows "Using libusb" and the cable open operation is successful, the required cable driver components are already present in the user's machine and the user effort is complete.

Setup in Absence of Functional libusb Installation

NOTE: The user must already have an ISE 10.1sp1 installation to complete the following the sections.

To enable the libusb support, the two driver components listed above must be installed, and an environment variable must be set prior to running the application that connects to the cable.

Installation of cable enumeration drivers

NOTE: The user must have root permissions to perform this installation.

1. Disconnect the cable and close all applications that use the cable.
2. Log in as a root user and open a shell or terminal console.
3. Navigate to the $Xilinx/bin/lin (for 32-bit version) or $Xilinx/bin/lin64 (for 64-bit version) directory. Note that the $Xilinx variable was set by the previous installation of the 10.1 design tools.
4. Run the installation script by typing: ./setup_pcusb (you will first need to set the script as executable). You might see some errors executing the script relating to "xusbdfwu.hex" file. These can be ignored.
5. Reconnect the cable.

Installation of the libusb package

NOTE: The current version of libusb is 0.1.12. If necessary, substitute a newer version in the following steps. Root permission is not required to perform this installation.

1. Download the package from:
http://libusb.sourceforge.net/
2. Open a shell or terminal console.
3. Extract the libusb package script and its support files by typing: tar xzvf libusb-0.1.12.tar.gz. This will create a directory named "libusb-0.1.12" in the current directory.
4. Navigate to the "libusb-0.1.12" directory by typing:
cd libusb-0.1.12
5. Run the configure script by typing: ./configure. Running ./configure script without any argument installs the libusb shared libraries to the "/usr/local". Root permission is required to be able to write to this directory. If root permission is not available, run the configure script with the --prefix argument.
./configure --prefix=<install-dir>

where <install_dir> is a directory where the libusb shared libraries will be installed, and this directory can be owned by a regular user.

6. Run the following commands to complete the installation:

make
make install (can also be run from a root account)

7. Update the LD_LIBRARY_PATH environment variable, if necessary, to point to the libusb shared libraries. If the installation was performed from a root account, make sure that the "/usr/local/bin" directory is included in the LD_LIBRARY_PATH environment variable. If the installation was performed from a regular users account, add the "<install_dir>/bin" to the LD_LIBRARY_PATH environment variable.

For the C shell:
setenv LD_LIBRARY_PATH <install_dir>/bin:$LD_LIBRARY_PATH

For a Bourne shell:

export LD_LIBRARY_PATH=<install_dir>/bin:$LD_LIBRARY_PATH

The user's login script can also be modified to add the libusb shared library location to the LD_LIBRARY_PATH environment variable.

Setting of the XIL_IMPACT_USE_LIBUSB environment variable

This environment variable is not needed for iMPACT 11.1 as it is on by default

Open a shell or terminal console and type the command to set the variable depending on the shell being used.

For the C shell:
setenv XIL_IMPACT_USE_LIBUSB 1

For the Bourne shell:
export XIL_IMPACT_USE_LIBUSB=1

The user's login script can also be modified to set this environment variable.

*** NOTE 1: For 11.1, iMPACT uses libusb by default. The XIL_IMPACT_USE_LIBUSB env variable is not needed for 11.1. If the machine does not have libusb, the following message will be displayed on the console:

"If you are using the Platform Cable USB, please refer to the USB Cable Installation Guide (UG344) to install the libusb package."

*** NOTE 2: This environment variable will work only where the native OS is Linux and not Windows. This means that it will NOT work on a VMWare setup with a Windows host and a Linux Virtual Machine.

*** NOTE 3: In the setup_pcusb script, there is a udev rule xusbdfwu.rules setup. The application 'fxload' gets called to update the firmware of the platform cable. Check that the fxload application is installed on your linux install. Not all Linux installs include the FXLOAD package. The fxload software package is required to ensure correct Platform Cable USB II operation. The fxload package is not automatically installed on SUSE Linux Enterprise 10 distributions or RHEL, and must be installed by the user or System Administrator.

*** NOTE 4: If you are not using the Parallel Cable IV, then the xpc4drvr module installation is not required.
AR# 29310
Date Created 03/26/2008
Last Updated 02/28/2012
Status Active
Type