19

Is there a useable JTAG/BDM interface available on the Raspberry Pi?

What hardware Debugger is needed for Debugging ?

Can Open OCD be used?

Lars Pötter
  • 1,068
  • 2
  • 9
  • 13

3 Answers3

8

The Revision 2.0 of the model B Raspberry Pi has exposed the JTAG pins.

See http://www.raspberrypi.org/archives/1929

Damian Dixon
  • 206
  • 1
  • 4
7

You can find a lot of informations here. Unfortunately, using JTAG on RPi is not straight forward. To be honest, just because it's so problematic, I didn't bother to get it working. Here's what I know, however:

Not all JTAG signals are easily available. All but all are on GPIO connector (not on P2 JTAG connector - it's a VideoCore JTAG, not ARM and AFAIK it's not usable for people outside of Broadcom). The additional pin is on S5 (CSI header) connector, you will probably have to solder it out. Here are pins that are needed (more on this on dwelch67 site, you can also find information about GPIO alternate pins functions on raspberrypi wiki):

  ARM_VREF    P1-1
  ARM_TRST    P1-15
  ARM_TDO     P1-18
  ARM_TCK     P1-22
  ARM_TDI     P1-7
  ARM_TMS     S5-11
  ARM_GND     P1-25

EDIT: As @Damian pointed out, on revision 2.0 of PCB, missing ARM_TMS signal was connected to pin 13 on P1 so soldering should not be necessary any more.

Now, it's not the only problem. By default all those pins are configured to be GPIO pins, not JTAG ones. They have to be reconfigured in software and AFAIK there is no support for this in Foundation bootloader. Dwelch67 wrote his own bootloader (next stage bootloader) that does just that. You can download it from the link provided at the top of this answer.

As for the hardware, any ARM11 JTAG hardware should be OK. As mentioned earlier, I havn't personally tested any so I can't do any recommendations. And yes, OpenOCD can be used. There is even small project (also done by dwelch67) to build very simple and cheap JTAG hardware based on cheap board like Launchpad. See his github repo

Krzysztof Adamski
  • 9,605
  • 1
  • 38
  • 53
0

You can also try this converter SN74LVC8T245 from TI http://www.ti.com/product/sn74lvc8t245