
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.

Cool – Let’s try this with one of the Dangerous Prototypes CPLD breakout boards.
Hi Drone,
That is exactly what I did. Look carefully and you will see that there are two XC2C64A Dangerous Prototypes breakout boards on the photo :)
Also see https://github.com/sowbug/JTAGWhisperer.
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
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?
I have found these threads on debugging on the target via Eclipse,
http://mcuoneclipse.com/2015/10/03/freertos-arm-thread-debugging-with-eclipse-and-gdb/#more-16657
and an approach that does break out the JTAG pins doing some tiny DIY solder work yourself:
http://mcuoneclipse.com/2014/08/09/hacking-the-teensy-v3-1-for-swd-debugging/
also I have found https://forum.pjrc.com to be an excelent source on many many topics
Cheers