Hello, after being bitten by windrvr once again (it did not compile after a kernel upgrade), I decided to see if I could get the Xilinx USB cable and impact working without a kernel module. To achieve this, I have written a wrapper library for impact which maps calls to windrvr to the userspace libusb-library which should be available on all modern linux distributions.
With this wrapper I am able to program a XC3S1500 in 2 seconds, which is the same time it takes when using windrvr. The library has been developed and solely tested against impact from ISE Webpack 9.1i SP1 and will very likely not work with older versions (pre 9.1i).
The library source can be downloaded at:
formatting link
or browsed at:
formatting link
I have also put a precompiled version (built on Debian Etch) at:
formatting link
Please report back if this library is useful and works for you. Maybe this helps XILINX to decide that they do not need to use windrvr for easy USB access, as most parts of my library are only there to provide a compatible replacement for windrvr functions and are not needed when directly accessing libusb from within an application program.
Brilliant! Seems to work for me. I can't test it fully right now because impact complains with "ERROR:iMPACT:583 - '2': The idcode read from the device does not match the idcode in the bsdl File." when I try to download to my ml403 board (which happens when I use the kernel driver too). But it correctly scans the JTAG chain and reports back the number/type of devices.
I wasn't able to get it to work on an x86_64 system, but in a i386 chroot I had no problems.
Have you passed on your utility to anyone at Xilinx?
I decided to install the .hex in /usr/share/usb instead of /usr/share but Impact seemed to look for it in /usr/share so I just needed to add a hook to redirect the "open" to the right place.
Nice to hear that it now works on x86_64. I had no chance to test it on such a machine with a connected cable, so I just got the driver to the point to not detect a cable when I got access to such a machine.
I have been trying to program a Xilinx spartan FPGA board using the parallel port (jtag) and the ISE webpack 9.1i and I cannot get it to work with windrvr.
I'm very new to linux but I undestand that you propose an alternative to windrvr that seems to work well.
I've spent many hours trying to get the windrvr and your driver to work without success.
Besides i cannot get the windrvr to wort, I don't know how to install your driver. I downloaded the files compiled them, did export LD_PRELOAD=/path/to/libusb-driver.so as stated in the README but it doesn't work. I still get an error saying the windrvr module is not loaded when I try to program the board.
I would really appreciate some help. I'm new to Linux and I use Kubuntu 6.10.
Here is my "step by step newbie" installation howto for Ubuntu Dapper
6=2E06 :)
Open a terminal (Application menu : Accessory > Terminal), where you can enter the given commands (line starting with the $ prompt symbol).
We suppose we are in your prefered directory. For you it is probably something like "/home/carlos". For this tutorial il will be replaced by a generic "/path" :
$ pwd /path
First, you donwload the program's archive in your prefered "/path/ Download" directory.
$ mkdir Download $ wget "
formatting link
" -O Download/usb-driver.tar.gz
Now you go in your prefered work directory (for me it is called "Travail" :) and you decompress the archive.
$ cd /path/Travail $ tar zxvf /path/Download/usb-driver.tar.gz $ cd usb-driver
First thing to do is to check if README or INSTALL files exist, and _READ_ them.
$ ls -l $ more README
Now you know what to do. First you check the required module are loaded.
This time, if everything goes right, you can try impact :) As explained in the README, set the preload environnement variable (this will be set only for the current terminal) :
I suppose you replaced /path/to/ with the real path to the library and started ISE or Impact from the shell where you did the LD_PRELOAD? To make sure that this is the case, you can put the export line in the settings.sh file generated by the ISE installer.
If you get that message, then the basic preloading of the library did not work, as it should tell impact that the windrvr module is loaded. What happens if you run "lsmod" after running the export LD_PRELOAD? You should get the following output:
Thanks Luzerne and Uwe for testing with a parallel cable. I am happy to hear that it works for other people, too and that even the parallel cable 4 works (in compatibility mode).
In that case, try lowering the speed in the cable setup menu. The ID code problem often happens when the cable speed is too high. Initializing the JTAG chain works most of the time, but after that transfers fail. Lowering the speed fixes that for me in most cases.
--
My email address is only valid until the end of the month.
Try figuring out what the address is going to be after that...
Thank you very much Luzerne for taking the time of explaining it step by step really clearly and slowly. I really really appreciate it.
What I was doing wrong was doing "export LD_PRELOAD=3D/path/Travail/usb- driver/libusb-driver.so" in another terminal session since I thought this was a kind of global setting.
You're welcome. My post was in fact more a contribution given back to Michael GERNOTH's work than to you :) but I'm happy to know it helps someone, and to discover this someone is so grateful :) But I think your greets are misplaced, as Michael GERNOTH deserves all of them.
The first one is a warning and may be harmless, the second one says it can not open libusb-driver.so: Permission denied. check the permissions. Perhaps you had run the build before as root. and now it can not overwrite the file, but that is just a guess...
I have a DLC9G, don't know how this is different from a DLC9LP. It works, but I occasionally get into some kind of problem where it will not initialize. I have to go through several menus to reset impact so it scans again for the device. You do NOT need windrvr, that is for the old parallel port JTAG device.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.