Categories

A JTAG/XSVF library for Arduino

Posted on Wednesday, August 19th, 2015 in Arduino, JTAG by DP

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.

This entry was posted on Wednesday, August 19th, 2015 at 12:45 pm and is filed under Arduino, JTAG. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

6 Responses to “A JTAG/XSVF library for Arduino”

  1. Drone says:

    Cool – Let’s try this with one of the Dangerous Prototypes CPLD breakout boards.

  2. Spix says:

    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

    • Drone says:

      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?

  3. Spix says:

    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

Leave a Reply

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

Recent Comments

  • lostengineer: hahaha an entire article just saying to heat-shrink your wires or glue them if they might move around a lot. When did common sense die?
  • readybrek: They're tasty tasty very very tasty... they're very tasty.
  • hli: Sunday++
  • Chamod: Check on your buddy. Make sure they don't forget their lunchbox.
  • Kurt: But February made me shiver With every paper I'd deliver Bad news on the doorstep I couldn't take one more step