A JTAG/XSVF library for Arduino

arduino_jtag

Marcelo published a post on his blog about JTAG and the library he wrote.

I have recently felt the need to incorporate a JTAG port in a project to program a hardware that contained a CPLD. The idea was to both program it and perform some integrity tests on the board. I imagined something using pogo pins, to make it easier and quicker to test everything. I would also write the necessary test routines and generate some kind of report.
With this objective in mind, I have decided to design an Arduino shield to do the job. The testing routines were not really a big deal. And I was sure I would find some JTAG library for Arduino ready to be used. That was not the case.
There were some projects using Arduino to control a JTAG TAP (Test Access Port), but they were all incomplete. And I had no idea what was really JTAG. So I had to study a little bit to make things work for me.
In the end, the challenge proved enlightening. There were some caveats, both from hardware and from software. I’ll try to address them in this article.

The library is hosted on Github.

More details at Marcelo’s EE & CS blog.

Join the Conversation

6 Comments

  1. Could I use this in combination with a Teensy 3.2 board and Eclipse IDE? I am just starting to setup an IDE and I would love to stick to Eclipse and being able to debug the code on the target. using a hardware hack to be able to access the JTAG pins on the processor as explained in http://mcuoneclipse.com/2014/08/09/hacking-the-teensy-v3-1-for-swd-debugging/

    I don’t know JTAG but I guess it is something processor and supplier independent interface?

    Any help is very much appriciated

    1. I think Teensy 3.1 comes preloaded with a bootloader that is ATMEL STK500 protocol compliant (because it works with the Arduino IDE, for-example). So I suggest you configure your Eclipse IDE to communicate with the Teensy using the STK500 protocol, which I am pretty sure it should be able to do. Heck working from memory, I don’t even think the JTAG pins are brought out on the Teensy 3.1 – are they?

Leave a comment

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

Notify me of followup comments via e-mail. You can also subscribe without commenting.