BMOW title
Floppy Emu banner

Quest For a Simple JTAG SVF Player

Where are all the cheap and simple third-party JTAG programmers? My work on the Yellowstone disk controller was sidetracked by issues with the Lattice-clone JTAG programmer, and discussion about ways that future Yellowstone customers might do JTAG programming. Eventually I realized that any generic JTAG hardware can program Yellowstone’s Lattice FPGA using a standard SVF file generated by the Lattice software. But what JTAG programming hardware to use, and what software to control it?

The device I’m imagining needs to play SVF files on a JTAG interface and verify the result. That’s all. It doesn’t need to handle JTAG debugging, ISP programming, SPI, or anything else. It should have easy cross-platform software to control the device: a basic GUI where the user can select an SVF file and click a button, then see progress info and a final good/bad result. Since JTAG is a fairly simple serial interface, this shouldn’t be much more difficult than building something like a USB-to-serial adapter, along with software to control it, which could leverage something like lib(X)SVF for SVF parsing. I confidently assumed there would be many such devices available for sale.

I was wrong. My search found nothing that really fit the requirement of cheap and easy, though a few options came close. Here’s a summary of what I found. If I’ve overlooked something obvious, please leave me a note in the comments.

Bus Blaster – A $35 open source JTAG tool based on the FT2232H. The hardware fits the bill, but the software does not. The Bus Blaster seems mainly intended to be used with UrJTAG or OpenOCD software, which are both unfortunately the opposite of user-friendly. From what I can tell, neither one has an official binary distribution and must be compiled from source code. From there it’s a somewhat daunting sequence of command line work to get things done. Surely there’s a simpler option if all that’s needed is an SVF player?

Flash Cat – A $30 commercial JTAG device that also does SPI, I2C, and serial. It’s not clear what IC it uses. This might almost work, and the software looks promising, but it’s Windows-only.

TinyFPGA Programmer – A $9 open source programmer for the TinyFPGA product line, and based on a PIC microcontroller. This is the best solution I’ve found so far, and the software is simple and cross-platform. But the hardware is specifically designed for the TinyFPGA boards, and so it makes assumptions about voltage levels and JTAG pinouts, and may have other limitations that prevent it from being a general-purpose programmer. The software is a python module and the GUI is Tk. Beggars can’t be choosers, especially for only $9, but a native control program for Mac and Windows would be preferred.

Those were the only decent commercial options I could find. Everything else was either a platform-specific tool, or a more complex and expensive JTAG debugger like the Segger J-Link, or somebody’s one-off hobby project.

Am I blind, and overlooking an obvious solution? If not, why doesn’t something like this already exist? Is it more complicated than I imagine? Or is there simply no demand for it? It sure looks like you could build a device like this using any simple microcontroller or USB-to-serial converter. Then spend a little time creating native apps for Mac and Windows, and get everything lined up regarding necessary drivers and software signatures, and you’d have a very desirable product. I have half a mind to drop everything and go do this myself.

Read 9 comments and join the conversation 

9 Comments so far

  1. LEELAND HEINS - January 30th, 2018 5:07 am

    Hardware wise, something like this: https://www.banggood.com/5V-3_3V-SCM-Burning-Programmer-Automatic-STC-Download-Cable-USB-To-TTL-USB-To-Serial-Port-Function-p-1176249.html would seem to be what was needed. But I don’t think it includes any software. Devices like this are supported by the Arduino software to download bootloaders, etc., but I don’t know what you’d use for more general purpose use like playing an SVF file other than maybe writing something. Python would be pretty easy. It would be possible to do a PyGTK UI and package it for Linux, Mac and Windows that would provide a simple GUI interface. I don’t think the UI would need to be much more than a way to select the file to upload, a “Go” button and a place to display the status. PyGTK can built a much prettier UI than Tk.

  2. LEELAND HEINS - January 30th, 2018 5:08 am

    The one stumbling point for some may be that this hardware uses the Chinese CH340 serial chip instead of the more expensive FTDI chip, but the CH340 is getting to be fairly well supported these days so that may not be as much of an issue as it used to be. It just works on Linux and I think the driver is included in more recent Windows but those still on older Windows like XP or Vista may have to find, download and install the driver. I’m not sure about Windows 7. I try to stay away from Windows as much as possible. I’m also not sure about MacOSX, as I can’t afford a modern Mac. There are also a number of similar inexpensive JTAG programmers out there, most of which use the same CH340 as the one I linked, but some others use an Atmel processor like the one in the TinyFPGA programmer or the FTDI chip used by Bus Blaster. Here’s an example of one that uses an Atmel chip: https://www.aliexpress.com/item/1PCS-AVR-JTAG-USB-Emulator-Debugger-download-AVR-JTAG-ICE-Download-Programmer-Atmega/32789255835.html Here’s one that uses FTDI: https://www.aliexpress.com/item/The-third-generation-of-CJMCU-FTDI-USB-UART-FIFO-FT2232D-R-JTAG-programmer/32765373100.html Another kind that is pretty common is the ST-Link: https://www.aliexpress.com/item/Best-Quality-ST-Link-stlink-V2-for-STM8S-STM8L-STM32-Cortex-M0-Cortex-M3-SWIM-JTAG/32676015777.html

  3. LEELAND HEINS - January 30th, 2018 5:09 am

    As far as why there isn’t a reasonable generic solution that is complete… I think it may be because all of the vendors like Xilinx, Altera, Lattice, etc., are all hawking their own programming tools and most of the focus is on cloning those. The generic devices like the one I linked are more oriented towards DIYers like the Arduino group maybe.

    Sorry about having to split this, I’m too long winded for the 2500 ch limit this morning…

  4. Steve - January 30th, 2018 8:45 am

    Thanks, and sorry about the character limit – I can probably increase that now.

    I’ve seen that “AVR-JTAG Emulator” several times, but I’m unclear exactly what it’s for. Any idea if it’s meant to clone some specific Atmel tool?

    ST-Link looks promising, but I’m unsure if it works with non-ST products, and there doesn’t seem to be any stand-alone software for it.

    There’s probably very little demand for a simple user-friendly JTAG programmer, because end-users don’t do JTAG programming (except in my daydreams about Yellowstone). I can’t think of any situation where I’ve ever wanted to do JTAG reprogramming of some device I bought. Developers and manufacturers do JTAG programming, and they’re happy to use vendor-specific hardware from Xilinx, Altera, Lattice, or Atmel, (or clones), and they need all those features like JTAG debugging that I’ve dismissed as unnecessary. They also use vendor-specific software suites, so there’s not much demand for generic third-party JTAG software or a simple program-only software.

  5. LEELAND HEINS - January 30th, 2018 10:07 am

    I wish I knew enough to have better answers. I don’t know about the official Atmel software or tools, I only know about those processors through their use in Arduinos. All I know is that AVR-JTAG Emulator can be used to load a bootloader onto Arduinos that come without one (the ultra-cheap ones from China often do) or if it gets whacked somehow. The Arduino software is pretty flexible with what it will work with, I suppose because it is hobbiest orriented. It has to be simple and work most of the time or dummies like me won’t be able to figure it out.

    I’m also not really sure about the ST-Link. I just happened to find that one when I was searching and it looked interesting.

    I suspect you are correct about the demand issues. Most of it is probably driven by designers and developers who are targeting specific devices.

  6. Dillon Nichols - January 30th, 2018 10:41 am

    I’ve used the ST Link V2 for programming ST micros using their SWIM and SWD interfaces, not JTAG. Good info here: http://www.st.com/en/development-tools/st-link-v2.html There is a standalone GUI for Windows and I know there’s a linux clone somewhere http://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-programmers/stsw-link004.html If you have any STM32 microcontroller dev boards, they include an ST link at the top and there’s a header on the side that breaks out the pins. Would be easy enough to test if you have one.

  7. Tux2000 - January 30th, 2018 1:47 pm

    The Bus Pirate supports JTAG when programmed with the right firmware, XSVF, via OpenOCD; but it may be slow: http://dangerousprototypes.com/docs/Bus_Pirate#JTAG

    I never used it, I don\’t even own one. But its cheap, just about $30, and it can do much more. So it\’s hardly wasted money.

  8. D512 - June 23rd, 2018 2:28 pm

    After a day or two this is what I settled with: Generic FT2232H board, port A configured as D2XX. build-win32_rev780_stripped.tar.gz prebuilt windows binary. I do not prefer windows, however, this and ISE 14.7 on Windows 10 was the most stable. An added benefit is that xc3sprog uses the jedec file, built without iMPACT, so the workflow is faster without the SVF file conversion step.

  9. Tormod - May 17th, 2020 3:27 am

    For just programming an XVSF file, here is another DIY-solution à la Arduino, with CLI software for Linux and MacOS (Windows would need serial port access ported):
    http://dangerousprototypes.com/forum/index.php?topic=8561.0
    Might work on the sub-5$ “blue-pill” Maple-like STM32 boards too.

    This looks similar, but using the Arduino framework on top of the same STM32 boards: https://github.com/wschutzer/xsvfduino

Leave a reply. For customer support issues, please use the Customer Support link instead of writing comments.