cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
2,003 Views
Registered: ‎05-09-2018

Platform Cable USB II on Centos 7

I am attempting to get the USB cable to run wit impact and chipscope (ISE 14.7) under Centos 7 (VM running under OSX).

 

I believe that I have the drivers installed but neither tool can see the cable.

 

lsusb (On the Centos vm) reports this 

 

lsusb

Bus 001 Device 004: ID 03fd:0013 Xilinx, Inc. 

Bus 001 Device 003: ID 203a:fff9  

Bus 001 Device 002: ID 203a:fff9  

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

 

dmesg reports this

[96565.118220] usb 1-3: new high-speed USB device number 5 using ehci-pci

[96565.233919] usb 1-3: New USB device found, idVendor=03fd, idProduct=0013

[96565.233923] usb 1-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0

 

 

Any clues would be much appreciated.

 

 

0 Kudos
6 Replies
Highlighted
Xilinx Employee
Xilinx Employee
1,928 Views
Registered: ‎03-07-2018

Hi @stfarley

 

This link may help you!!

 

Regards,

Bhushan

-------------------------------------------------------------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
-------------------------------------------------------------------------------------------------------------------------------------------------

Regards,
Bhushan

-------------------------------------------------------------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
-------------------------------------------------------------------------------------------------------------------------------------------------
0 Kudos
Highlighted
Adventurer
Adventurer
1,908 Views
Registered: ‎05-09-2018

FYI

I tried the suggestions there. Still doesn't work.

I have a Vista VM as well and it doesn't work either.

 

For now my workaround is to run cse_server on a widows 8 laptop and access it from that.

 

Thanks 

0 Kudos
Highlighted
Observer
Observer
1,664 Views
Registered: ‎01-03-2010

I don't know if this will still be useful to you now, but based on your lsusb output I suspect you've run into the same issue that I did on modern versions of Debian.

The main issue at play is that the platform cable requires firmware to be loaded onto it each time it is plugged into your system. Before that firmware blob is loaded onto the platform cable, it can't do anything useful. It will show up as a USB device as you've seen, but iMPACT and other programs won't be able to see or use it.

You can tell if that firmware has been loaded by checking the USB device ID. As you've noted in your case, your cable is showing up as 03fd:0013. This is a pre-firmware device ID.  Platform cables report as 03fd:0008 when firmware has been successfully loaded and it is ready to go. You will also be able to see this change physically as the status LED on the platform cable itself may appear to be dim or off entirely until the firmware has been loaded.

Loading the firmware is usually accomplished with a program called fxload. Through a collection of rules files, udev can be configured to automatically execute fxload when a recognized USB device is plugged in. You can see these rules at /etc/udev/rules.d/. The Xilinx platform cable installer should have created these rules files for you when it was executed. This is where the core of the problem lies. The original fxload project has been abandoned, and the package included with your distribution is likely very out of date as a result. On modern Debian systems for instance (Stretch and later), fxload is currently non-functional. As such, when a device is plugged in, the firmware is not automatically loaded because the loader itself fails.

There is a solution, fortunately, in that the libusb project contains an updated and maintained version of fxload that continues to work on modern systems. If you build libusb yourself, you'll end up with an fxload binary that you can either install on your system in place of your distribution's outdated copy or you can stick it somewhere like /opt and trigger it yourself when you're ready to use your platform cable.

If you want to try this, you'll want to fetch a copy of libusb. You can do this using git:
mkdir ~/temp
cd ~/temp
git clone https://github.com/libusb/libusb .
./autogen.sh
make

Once built, you'll find fxload in examples/. Note that this has a dependency in a hidden subfolder (examples/.libs/fxload), however, so you'll need to keep this as well if you want it to function.

If you take a look at /etc/udev/rules.d/xusbdfwu.rules (if present--this is installed by some version of the Xilinx platform cable installer, but I do not recall which one), you'll see multiple lines. Each one corresponds to a particular platform cable by device ID and targets fxload with a specific firmware blob that should have been installed by the Xilinx IDE installer. In your particular cable's case, you're looking for this one since it matches your cable's USB device ID:

BUS=="usb", ACTION=="add", SYSFS{idVendor}=="03fd", SYSFS{idProduct}=="0013", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusb_xp2.hex -D $TEMPNODE"

For your particular platform cable, you will need to locate xusb_xp2.hex on your system. I still use ISE Webpack for my devices (Spartan 3/6, XC9500XL, etc), and for me the firmware blobs can be found at /opt/Xilinx/14.7/ISE_DS/ISE/bin/lin64/.  Once found, you can plug your platform cable in and then use your freshly built copy of fxload like this (note that the syntax has slightly changed versus what is defined in the old rules file--the D argument in particular has become lowercase):

./fxload -v -t fx2 -I /opt/Xilinx/14.7/ISE_DS/ISE/bin/lin64/xusb_xp2.hex -d 03fd:0013

The terminal should show that the firmware is being written in a process that takes a second or two. At that point, your platform cable should light up and lsusb will now show a device ID of 03fd:0008 if it worked.

With firmware loaded into your platform cable, you should be able to use your other software that interacts with it.

In my case with iMPACT on ISE Webpack 14.7 I also have to use an updated version of libusb-driver.so that I found or built--I cannot remember. If this also applies to you, let me know and I will dig into where to get that from.

Highlighted
Observer
Observer
1,651 Views
Registered: ‎01-03-2010

In case it comes in useful to someone else down the road when trying to use a platform cable with iMPACT in particular, I did some more digging to discover where I had gotten the updated driver.  This is a separate issue from the firmware issue in my previous post, and both are required parts for me to be able to use a USB Platform Cable II with ISE Webpack 14.7's iMPACT for programming FPGAs and CPLDs.

Once the platform cable firmware has been loaded, it's necessary to launch iMPACT with a pointer to an updated libusb-driver.so library.  Fortunately there is a project available that runs in userspace these days--a definite improvement over older solutions.

You can find the project website here:
http://git.zerfleddert.de/cgi-bin/gitweb.cgi/usb-driver

To use it, I suggest using git like with libusb in my previous post.  On Debian there are two prerequisites required in order for it to build.  Your distribution will likely have similarly named packages available.

sudo apt install libusb-dev libftdi-dev build-essential
mkdir ~/libusbdriver
cd ~/libusbdriver
git clone git://git.zerfleddert.de/usb-driver .
make

Compiling should only take a few seconds.  If it worked, you'll end up with libusb-driver.so.  You'll need to preload this when you launch iMPACT in the future.  You can do so like this:

LD_PRELOAD=~/libusbdriver/libusb-driver.so /opt/Xilinx/14.7/ISE_DS/ISE/bin/lin64/impact

You might wish to move the driver around to somewhere more permanent like /opt/Xilinx or something like that.

You should see iMPACT load the driver on startup in the status window.  You can run the cable setup wizard and use the "open cable plugin" option at the bottom of the screen instead of the options up top.  If you only have one platform cable connected, it should be device USB21.  Platform cables start at 21 and go up from there.

xilinx_platformusb PORT=USB21 FREQUENCY=6000000

Highlighted
Adventurer
Adventurer
1,496 Views
Registered: ‎05-09-2018

Thanks for the response particle.

 

I tried both but can't seem to get either to compile so I can't verify that this works. It does look like a solution though. 

Will update if I can get the compilations to run.

0 Kudos
Highlighted
Observer
Observer
1,482 Views
Registered: ‎01-03-2010

No problem, and I'm sorry that you've had trouble building those two binaries. I can't promise they'll work for you on your system, but if you're interested I can send you the binaries that I compiled.

Unfortunately, I don't have any direct experience with Centos so as to provide better help with respect to how compiling works on it. It might have an entirely different make toolchain than Debian. You might look into if autoconf and automake are available on Centos.  It's also worth checking your shell to make sure that you're running bash instead of something else like dash if you're running into errors executing the config scripts in particular.

0 Kudos