I started a project to try to useĀ Arduino as a JTAG interface to perform debugging, programming and scans. The objective is to have a setup like the following diagram:
The complete project should include:
- Arduino sketch
- OpenOCD integration
- Python API
- Arduino shield with common connectors etc.
In particular the shield should have:
- Level shifters between the 5V of Arduino and the voltage of the target chip
- Some standard connectors (at least the 20 pin and the 10 pin)
- Power supply and ground lines
- Some jumpers for configuration (for example to bypass level shifters or to choose connector)
If the target chip that I want to debug works at 5V like the Arduino then the shield could actually be optional, but some wires must be used in place of the JTAG connectors.
I have started a project on GitHub called JTAGduino, that up to now contains the Arduino sketch and a Python API to access basic functionality. It should already be possible to use it to send some JTAG sequences to a 5V target chip.
I decided that inside the Arduino I should keep just some basic code to manage and drive the pins, and let the host PC do the “JTAG” logic of knowing the TAP state and fill Instruction Register and Data Register. By looking at OpenOCD source code it seems like it’s a common design choice.
The default mapping of Arduino pins to JTAG pins is that pins 2, 3, 4, 5 and 6 are used for TCK, TMS, TDI, TDO and TRST. The default speed is the maximum one, with TCK moving at 1MHz.
The next step would be to fork the OpenOCD repository and add the “JTAGduino” driver.

Entries
Iggo
2012/01/29
Ciao, complimenti per il tuo lavoro! Io sono di Venezia!
I have a beagleboard and I m interested in a JTAG emulator (where the “emulator” name comes from?!!?). I sow some of them, but what I can’t really understand (quite ignorant about this subject) is there are 5 signal in a common JTAG, so whats the difference between a Wiggler, a serial and for example a FlySwatter (the one I should use from what I understand)?? Could ur Arduino project fullfill my pourpouses??
Thank u very much!
Sorry for my english…
Balau
2012/01/29
My Arduino project is still at the beginning, it can’t do anything different than 5V (Beagleboard seems to need 1.8V) and can’t yet connect to a debugger.
The main (for me) differences between all the JTAG emulators are speed, voltage, and the software that attaches to them from the PC.
I think for now other than the FlySwatter you may try the Bus Blaster with OpenOCD.
These objects are historically called emulators, but I don’t know where the term comes from (here some hints: http://en.wikipedia.org/wiki/In-circuit_emulator)
Ciao!