Electronic – arduino – Is it possible to make a JTAG interface with an arduino

arduinoarmembeddedjtag

If so, could one direct me to a site that tells how to do this? I believe I may have found a way, but I am unsure as to whether or not it would work yet (need to find something to test it on).

This question is related to a previous question of mine located here.

In case more background information is needed.

Best Answer

Yes, it is possible to turn an Arduino into an ARM JTAG adapter.

There are three problems, voltage, speed and drivers.

The Arduino natively runs at 5V. Most ARM microcontrollers are not 5V tolerant on their JTAG pins and require 3.3V. The easiest solution is to run your Arduino at 3.3V, failing that you will need some sort of level conversion (see I2C 3.3 to 5.0 V conversion for ideas).

The Arduino is connected to a PC via a serial link. I doubt it can feasibly go faster than 115200bps, which will make interactive activities like stepping through code in a debugger very slow. But, you'll be able to upload code and reflash devices.

JTAG is a high level protocol, specific to each processor family, which uses a SPI like interface to exchange data. Most JTAG dongles just provide a SPI interface over USB then leave the rest of the work to a PC application. OpenOCD and URJTag are popular choices. You will need a driver in one of these for your Arduino JTAG protocol.

The Bus Pirate is very similar to the Arduino (low speed microcontroller + FTDI chip). It supports JTAG with OpenOCD, so it's certainly possible.

If you use a Teensy/Opendous or other AVR-USB board, you could use eStick-JTAG.

But, for lost cost JTAG, I'd recommend one of the FTDI2232 based dongles. They're cheap and well supported by OpenOCD.