Support for Altera and Xilinx USB JTAG adapters

Hi,

I’ve uploaded an experimental OpenOCD jtag driver for Altera’s USB-Blaster at http://www.ixo.de/info/usb_jtag/. It currently supports only the slowest possible communication method. Comments indicate how higher speeds could be achieved.

Kolja

Hi,

an updated version of my experimental USB-Blaster support patch, now matching current SVN HEAD of OpenOCD, is available at http://www.ixo.de/info/usb_jtag/. The ZIP listed at the very top of the page contains both the driver code and adapter hardware description.

However, there’s nothing really new; if you already have my old patch applied and working, there’s no need to download the new one yet. It’s still lacking support for the faster byte-shift mode.

Currently I’d rather like to concentrate on another project: support for the “Xilinx Platform Cable USB” (just another proprietary JTAG adapter, but quite sophisticated and /really/ highspeed). I just learned most protocol details and believe OpenOCD could support it soon.

Please mail or reply here if you’re interested in either of the projects; it would increase my motivation even further and speed up development.

Kolja

As an owner of the Spartan 3E kit with the USB Platform Cable I’d definately be interested seeing it supported in open source tools.

You wrote that “I just learned most protocol details”, do you mean that you are planning to support the cable with it’s original FX2 and CPLD configurations ?

Henri

If you don’t mind reprogramming the CPLD, you can use the configuration made for the xup project (http://inisyn.org/src/xup/) to access the chain on the Spartan 3E board without Xilinx software. It is trivial to adapt the “usb_jtag” FX2 firmware, for which an OpenOCD driver already exists (s.a.)

However, I’m confident that we will be able to utilize at least the CPLD in its original configuration (… at least for some time until they make incompatible changes and enforce an upgrade of the CPLD with their tools).

Kolja

Just implemented a simple method to access tje JTAG chain with original Xilinx firmware/CPLD configuration for openwince jtag. Patch is available from my usb_jtag page (link in signature) - let me see if I find time to do at least the same for OpenOCD. - Kolja

And now there’s a firmware compilable with SDCC that can run on the Xilinx cable, so it behaves like the other usb_jtag variants. No reprogramming of the cable CPLD is required. In future I’ll concentrate my efforts on the usb_jtag support in openocd/openwince.

I’ve been having all kinds of fun times trying for a few weeks (in my spare time) to get anything to talk to my shiny new xilinx cable on 64-bit *nix. Xilinx’s new libusb-based software won’t even touch it, and their tech support won’t touch me since I’m not on the Enterpri$$e edition of redhat.

So, I find this project.

  1. Not obvious is c51/xpcu_x or xpcu_i the thing I’m supposed to build for a DLC9?

  2. devtest seems only interested in talking to the altera dongle, or do I just hack the VID and pretend it’s altera?

  3. same question as devtest, but for openocd.

Thanks,

Steve

I see you are an admin on sourceforge.net/urjtag - looks like that would be a more perfect solution for Xilinx parts than openOCD - maybe you could change my question #3 from “openocd” to “urjtag” (or whatever you think most likely to succed :wink:

Steve

Hi,

usb_jtag: It’s hw_xpcu_x for the eXternal chain (not the Internal chain which is basically the CPLD itself). However, it may not function out of the box with the DLC9, it has been tested only with a “cable” embedded in the Spartan 3E Starter Kit.

devtest: Looks for device with either Altera or usb_jtag VID/PID. If you load the hw_xpcu_x-based usb_jtag on your cable it will renumerate and present itself as usb_jtag with new VID/PID. Or even with Altera VID/PID if you put that into the firmware.

urjtag: If you’ve booted your cable with the Xilinx firmware you should be able to use current UrJTAG to talk to it directly, i.e. not using usb_jtag. The original firmware (a .hex file) is buried somewhere in the ISE installation and/or updates to it.

openocd: Currently the usb_jtag way is the only way to use a DLC9 with OpenOCD, but probably only with an old version because I haven’t updated my patch for the newest OpenOCD, and there have been quite a lot of changes (to the better).

64 bit: I had success to use original Xilinx software with original firmware on 64 bit Ubuntu using this http://www.rmdir.de/~michael/xilinx/ . There’s a tutorial here: http://gentoo-wiki.com/HOWTO_Xilinx

Kolja

Hi

Is there any reason why this patch hasn’t been merged upstream so far?

It’s a pity because the USB-JTAG firmware for FX2 chips works great and support in OPENOCD would really be an added value.

Thanks,

Michael

P.S.:

Forgot to mention: The USB-JTAG solution does NOT implement its own protocol but emulates an ALTERA USBBlaster. So, including this patch will also enable users of ALTERA USBBlaster to debug ARM processors with their existing equipment.

Neuer_User:
Is there any reason why this patch hasn’t been merged upstream so far?

As far as I understand, the OpenOCD developers follow the policy not to include anything which is not based on open, publicly available documentation. There’s also no support for Xilinx DLC9 and Segger J-Link cables, although there was a patch available some time ago.

http://urjtag.org - successor to the OpenWinCE jtag tools - has support for those cables and others, but no ARM debug support. However, a socket interface to UrJTAG is under development, as well as an extended C API. When it’s ready, OpenOCD might connect or link UrJTAG for the low level JTAG access, and this way become able to be used with all cables supported by UrJTAG.

Kolja