Open JTAG Interfaces

I’m shopping around for hardware I can use to program and debug ARM microcontrollers. I used the Keil ULINK 2 at my last job, and it worked just fine. Now that I’m on my own, I can’t afford to drop hundreds of dollars on debug hardware. What’s more, the ULINK is proprietary hardware and is only officially supported with Keil products on Windows. That just doesn’t jibe with ShareBrained philosophy. So I’m shopping around for other options that are compatible with OpenOCD, have open hardware and open protocols, and use USB (not parallel or serial ports). Here’s what I’ve found so far (corrections and changes welcome):

Device Hardware Protocol Software Performance
Dangerous Prototypes Bus Pirate Open Open All Poor (designed for human-rate interface)
Dangerous Prototypes Bus Blaster Open FTDI Proprietary (but works with open libFTDI) All OK
Embedded Projects GmbH usbprog Open Open, supported by OpenOCD All Bad (improved with alternate firmware and OpenOCD driver)
Keil ULINK2 Proprietary Proprietary Windows only OK
Segger J-Link Proprietary Public but proprietary, supported by OpenOCD All OK
Nuvoton Nu-Link Proprietary, Nuvoton target devices only? Proprietary Windows only OK
ST Microelectronics ST-Link/V2 Proprietary Proprietary, provided to OpenOCD under NDA Windows only? OK?
CooCox CoLink Open Proprietary? Windows only OK
CooCox CoLinkEx Open FTDI Proprietary (but works with open libFTDI?) Windows only? OK
KrisTech KT-LINK Crude schematic in user manual FTDI Proprietary (but works with open libFTDI?) All
Amontec JTAGkey ? FTDI Proprietary (but works with open libFTDI?) All
NGX ARM USB JTAG ? FTDI Proprietary (but works with open libFTDI?) All
Micromint PicoJTAG ? FTDI Proprietary (but works with open libFTDI?) All?
Olimex ARM-USB-OCD FTDI Proprietary (but works with open libFTDI?) All
Goepel PicoTAP Proprietary?

At some point in my research, I noticed that the Dangerous Prototypes Bus Blaster might be the solution to all my concerns. It’s open (except for the FTDI chip, which works with the open libFTDI library), inexpensive, and *should* support SWD soon. This is the interface I’m going to try.

Tagged , , , , , . Bookmark the permalink.

5 Responses to Open JTAG Interfaces

  1. Joby Taffey says:

    I agree about the Bus Pirate, It’s more of a swiss army knife than a cleaver. http://blog.hodgepig.org/2010/04/13/545/

    But, it may support SWD, see https://github.com/willdonnelly/pirate-swd

    My attempt an open source JTAG adapter used a USB AVR. Which wasn’t very fast.
    http://blog.hodgepig.org/busninja/

    Also worth checking out: http://www.makestuff.eu/wordpress/?page_id=1046

  2. jboone says:

    That’s a good bunch of tips.

    Nice work pulling out the FTDI chip on the Bus Pirate. So many microcontrollers have built-in USB these days — it seems somewhat wasteful to use a FTDI chip. I wonder if for some, an FTDI chip is a way to avoid buying (or hijacking) a USB VID/PID pair. Regarding LUFA on other platforms — it looks like Dean is starting to tackle 32-bit and endianness issues in his latest release. Can an ARM port be too far away?

    The NeroJTAG seems to be addressing my performance concerns. Instead of bit-banging (either through an FTDI or other general-purpose interface), they’ve provided a USB request interface that isn’t hamstrung by USB’s 1ms frame rate.

    I have a friend in town who’s done some work on top of Versaloon, porting it to the STM32VL Discovery board. Still not entirely out of the proprietary woods, but definitely getting there…

  3. mossmann says:

    There is some GoodFET code for OpenOCD, though I’m not sure how complete it is. Also check out the Opendous JTAG projects:

    https://code.google.com/p/opendous-jtag/
    https://code.google.com/p/opendous/wiki/JTAG

    I’ve been meaning to try out the latter.

  4. jboone says:

    Here’s where I’ve settled, with the help of a local Dork (Jim Larson). He’s using Versaloon on a $11.85 US STM32VL-Discovery board. All the details can be gleaned from the Versaloon forums. Start here:

    http://www.versaloon.com/bbs/viewtopic.php?f=2&t=17

    There’s a bit of a bootstrapping issue — you need to be able to reprogram the 48-pin STM32 (U2) on the Discovery board with *something*. Fortunately, Jim had already solved that problem, so he used his Verasaloon’ed Discovery to program mine. It required picking off the two SWD signals from the underside of my Discovery, and wiring the SWD from his board to mine. Through this connection, he flashed my board with a LeafLabs Maple bootloader modified for the Discovery. Then, we used the bootloader on my board (with OpenMoko’s dfu-util) to flash Versaloon, built specifically for the Discovery. After a bit of time (re)building the current revisions of OpenOCD and the Versaloon client, I was up and running.

  5. jboone says:

    @mossmann:

    The impression I get from both of the Opendous projects is that they use a low-level signal manipulation strategy (a “wiggler”), which makes JTAG performance rather slow due to the 1ms USB frame rate. Low performance is rather bothersome when debugging. I’ve developed a preference for devices who support a higher-level host interface where the JTAG adapter does the signal manipulation locally. I also get stuck on dependence on the FTDI chips, which require proprietary or reverse-engineered drivers — ick. And lastly, I really want SWD support, since it frees up two or three pins, which when using low pin count ARMs, is particularly important. It turns out that OpenOCD and Versaloon are pretty much there on all of these points — good high-level USB protocol, open-source software from end to end, and solid SWD support. Yay!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>