OK, thanks for the info!
Apologies for the late reply,I haven’t done much work with ARM or CPLD’s until a few days ago, when this saga started again
Before I made the first post in this topic I had managed to successfully use openocd 0.3.1, with a jtagkey-like interface to debug my At91SAM7256 board from omilex. Turns out I had issues with drivers (namely open source libftdi vs. ftd2xx) and a small hardware mistake on my part. I ended up using the libftdi drivers.
I had also used the above setup to configure one XC95144XL CPLD using an svf file - altohugh this took several attempts. I ran a couple of xilinx generated SVF files I created for a XC9536 crashed openOCD when they were run. I recieved an error the ‘unexpected TDO’ followed by ‘cannot write MPSSE commands’. It did this at the same point on the SVF file in question so it wasn’t random noise on the lines,or a hardware issue. The same SVF file worked fine using Xilinx IMPACT with a parallel cable. I am not sure if this is a problem with openOCD reading certain SVF files/lines… OR if it is a problem with the way it communicates with the drivers. As this was a prebuilt openocd, I could not use ftd2xx drivers, only libftdi. - ergo - OpenOCD 0.3.1 was useless to me for CPLD work.
Coming back to it, I decided to install the latest openOCD 0.4.0. I originally used a windows installer from freddie chopins page:
http://www.freddiechopin.info/index.php … /4-openocd
However, it seems he didn’t enable the USB-blaster in any build (not complaining, just an obseravtion) so I had to build it myself on windows XP using cygwin - this took 6 hours lol. I used this wonderful tutorial to help me understand how to do it, and whats going on:
http://www.openpilot.org/OpenOCD_Compile_on_x86
It refused to build using the libftdi drivers, OR the latest ftd2xx ones, until I eventually cleaned my system of ALL usb drivers, plugged in my ft2232 board, and installed the latest ft2dxx drivers for it. The SAME drivers I was using to build openOCD, only then did it actually create the makefile, and I was able to build.
So, at that point, I had openocd 0.3.1, built for libftdi drivers, which crashed on running xilinx svf files,and could not communicate with my ft2232 board (as my 0.3.1 was libftdi only, and my ft2232 board was installed with ftd2xx drivers).
So, having got 0.4.0 built, and enabled both the FT2232 AND the USB-blaster with ftd2xx drivers, I thought I would test the guts out of it. Running my SVF file on this new build, it once again failed at the SAME point in the SVF file using my FT2232 board with the ‘unexpected TDO’ error. However, this time it didnt’ crash, but merely quit openOCD, leaving me at the prompt. So, it seems libftdi will crash the window when it can no longer send MPSSE commands (I suspect its buffer overflowed). But the official ftd2xx drivers, handle this error, and just quit out of openocd.
Last attempt: the USB blaster. This was a clone built by me, and extensively tested using the Quartus II 9.0 programmer software from Altera. Before using openOCD, I used Quartus to read the IDcode’s of several xilinx CPLD’s, as well as configure an EPM7064S altera CPLD. No errors, no problems, although Quartus refuses to configure any non-Altera device, by ANY means - I have had this confirm by Altera, it purposefully will only configure Altera deivces IDcodes
So, my Altera blaster is installed, and working, with ftd2xx drivers. However, using openocd 0.4.0, it doesn’t work. It DOES recognise it, but claims it can’t read the TAP, indicating it finds all 0’s. It does this regardless of what I have connected, or what commands I give. So, considering my test with Quartus, I’m guessing the altera USB blaster isn’t fully working with openOCD 0.4.0. I can provide logs if someone would like them (this post is too big already).
After spending a total of 15 hours on this (and endless cups of coffee later) a last ditch attempt was to use an old version of ‘UrJtag’, I installed a couple of years ago with the intention to use it as a generic SVF programmer. My USB blaster didn’t work with this either! So perhaps, it is the drivers for the USB blaster not being access correctly by openOCD, OR UrJtag, only by Quartus. However, as a nice happy ending to this story, using my FT2232 board, UrJtag very happily ran my svf without any errors (I made sure it stopped on the first one), and I now have a well tested CPLD sitting on my desk running the design.
Apologies for a long post here, but as you can see, there are several versions/flavours of OpenOCD builds used, two types of hardware interface, several devices, and quit a number of different drivers used…the combination is soul destroying…
Has anyone successfully configured Xilinx devices using SVF files? Also, has anyone managed to get their USB blaster working with 0.4.0 ? if so, I would love to hear how it was done.
Scott.