10

Im trying to find out if it would be possible to build/include a USB to JTAG circuit on my experiment circuit board I'm designing. My aim is not to reinvent the wheel, but use something that is already out there, and simple/small enough to add to my PCB design.

I want to be able to program and debug my Atmel SAM3S chip using JTAG, via USB.

I've seen devices like the USB to JTAG programmer from Modular Circuits, and it looks like this can be fairly easily integrated into my design, however, I'm not too sure if their license allows this.

I've tried to Google around a bit for alternative more open sourced designs, but couldn't really find something. Can anyone refer me to a Open Source project for USB > JTAG circuits, that are available online?

josef.van.niekerk
  • 3,600
  • 7
  • 44
  • 63
  • For the "production" board, it's usual to just have a JTAG header and use an external programmer, rather than include the USB-JTAG on the board. – pjc50 Jan 24 '13 at 09:57

3 Answers3

8

There are many examples on the web of using an FTDI FT232R chip in its "synchronous bit-bang mode" to drive a JTAG interface to configure a microcontroller or CPLD/FPGA, including the necessary host software. One advantage of this approach is that you can subsequently switch the chip to its regular UART mode and use it to communicate with the target application.

Dave Tweed
  • 168,369
  • 17
  • 228
  • 393
  • 2
    I'd recommend the FT2232 over the FT232 as it has better support for JTAG mode and you can also keep access to the serial port to connect to the MCU's UART, saving you even more wiring. – akohlsmith Jan 24 '13 at 14:28
  • 2
    If you want to use an FT232, I found http://vak.ru/doku.php/proj/bitbang/bitbang-jtag which looks about as simple as it can get. You do have to patch OpenOCD though, although I don't know why this wouldn't be an acceptable patch for all future versions. – akohlsmith Jan 24 '13 at 14:29
  • 1
    Would this approach enable both programming and debugging? Most useful comments, thanks! – josef.van.niekerk Jan 24 '13 at 16:01
  • 1
    It would, but that would depend entirely on the software support for those features on the host side. Debuggers are generally very specific to a particular manufacturer's software development toolchain, and those are generally written to work with that manufacturer's programming/debugging hardware. Generic JTAG debuggers are very rare. – Dave Tweed Jan 24 '13 at 16:05
  • Looks like I'm gonna need to buy a SAM-ICE, if I want this to work properly. Gotta decide which arm and leg I'm going to chop off. :) – josef.van.niekerk Jan 24 '13 at 16:09
6

Note that I haven't used this system myself, but the following project called opendous-jtag is compatible with OpenOCD and may be worth a look. The software license is the fairly liberal MIT license and it's based on open source hardware you should be able to replicate:

http://code.google.com/p/opendous-jtag/

PeterJ
  • 17,131
  • 37
  • 56
  • 91
4

There's a Bus Blaster of Dangerous Prototypes - it's based on FT2232H - this chip has two serial interfaces - one is used for JTAG and another - to reprogram onboard CPLD to emulate different JTAG debuggers.

miceuz
  • 5,523
  • 3
  • 39
  • 49