JTAG adapter


13 posts
by billium » Tue Nov 22, 2011 1:15 am
Could possibly use the ethernet version as a remote gdb/openocd based JTAG adapter.
Posts: 7
Joined: Sat Nov 19, 2011 11:33 am
by dhb » Tue Nov 22, 2011 2:56 am
Out of the box, I doubt it.

If you were willing to do some coding, I don't see why not. (Though I wouldn't know everything needed.) Several times I've worked on projects that have build JTAG controllers by bit-banging GPIO pins. You'd also need something listening and responding on the ethernet. Mere matter of software! :-)
Posts: 20
Joined: Wed Sep 28, 2011 7:21 pm
by billium » Tue Nov 22, 2011 9:28 am
obviously
Posts: 7
Joined: Sat Nov 19, 2011 11:33 am
by jamesh » Tue Nov 22, 2011 9:40 am
I doubt you would get the response required from bit banging on the board. You are more than welcome to try though.
Soon to be employed engineer - Hurrah! Volunteer at the Raspberry Pi Foundation, helper at PiAcademy September 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11926
Joined: Sat Jul 30, 2011 7:41 pm
by donhamilton » Mon Dec 05, 2011 3:53 pm
Does Broadcom suggest a jtag adapter ?

Does Keil/IAR support Broadcom ?
Posts: 1
Joined: Mon Dec 05, 2011 3:30 pm
by RichC » Wed Dec 07, 2011 10:50 pm
It has an ARM1176JZF-S core and unfortunately Keil ULINK does not support ARM11 - a choice ARM made when they bought Keil. You could use RealView ICE or Lauterbach, both quite expensive. Don't know about IAR.

The ARM JTAG pins are shared with GPIO so you have to solder on a connector and configure in software (part of the Videocore/bootloader blob). So not available at first, although they want to offer it for kernel mode debug http://www.raspberrypi.org/faqs
Posts: 20
Joined: Thu Jul 28, 2011 9:20 am
by jamesh » Wed Dec 07, 2011 11:17 pm
You only really need JTAG on the Arm for board bringup/kernel boot issues - even the Broadcom dev people don't use it except for that - rest of the time its GDB or KDB, and lots of printk I beleive! I've always found GDB to be much more pleasant in Linux debugging that JTAG.

(Hi Rich!)
Soon to be employed engineer - Hurrah! Volunteer at the Raspberry Pi Foundation, helper at PiAcademy September 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11926
Joined: Sat Jul 30, 2011 7:41 pm
by Gert van Loo » Thu Dec 08, 2011 4:13 pm
The ARM JTAG pins are indeed shared with the GPIO pins but accidentally (really an accident!!) they
are all shared with the SD-card pins. So you could make an ARM JTAG adopter which plugs in the SD-card slot. But you will have to debug without SD access.
As James said: You would use ARM JTAG only for kernel bring up and that should be do-able without SD-card access for most of the development. Until you have to bring up the SD-card ....
User avatar
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2078
Joined: Tue Aug 02, 2011 7:27 am
by hippy » Thu Dec 08, 2011 5:58 pm
Quote from Gert van Loo on December 8, 2011, 16:13
The ARM JTAG pins ... are all shared with the SD-card pins.


Is it also the case that all SD Card signals are present on the JTAG interface ?

If so that makes it much easier in getting the SD Card socket off-board to somewhere else without unsoldering the socket and soldering on flying wires.

Fingers crossed as I'm still trying to figure out the best way to place an R-Pi in a box much larger than the PCB and provide easy access to all the interfaces.
Posts: 820
Joined: Fri Sep 09, 2011 10:34 pm
by Bakul Shah » Fri Dec 09, 2011 8:27 am
Quote from Gert van Loo on December 8, 2011, 16:13
The ARM JTAG pins are indeed shared with the GPIO pins but accidentally (really an accident!!) they
are all shared with the SD-card pins. So you could make an ARM JTAG adopter which plugs in the SD-card slot. But you will have to debug without SD access.
As James said: You would use ARM JTAG only for kernel bring up and that should be do-able without SD-card access for most of the development. Until you have to bring up the SD-card ....


Well... using JTAG may be you can stuff pxeboot or a usb boot program in memory and off you go : ) [Reminds me of my first Unix port. Initially we had no disk driver & l had to download the kernel via a 9600 baud serial port but it was under 64KB so didn't take long!]
Posts: 293
Joined: Sun Sep 25, 2011 1:25 am
by MNM » Tue Feb 28, 2012 12:54 am
This topic has been discussing both JTAG into the RPi (to take control of the Broadcom SoC itself) and out of the RPi (to have the RPi control via JTAG a separate chip which would supposedly be connected on the GPIO headers).

If my understanding is correct, the JTAG connector on the RPi is a JTAG link going into the RPi (i.e. the TCK, TMS, TDI pins are inputs to the RPi) and the general recommendation is that this JTAG link is not very useful to anyone but the RPi team itself. There is no JTAG connector out of the RPi (i.e. where the TCK, TMS, TDI pins would be outputs from the RPi) so the only way to emulate such a JTAG out link would be by using the GPIOs on the GPIO headers.

If one was to ssh into the RPi and run gdb with an OpenOCD layer to "bit-bang GPIO pins", one would have an interesting platform for on-chip debug of a device connected on the GPIO headers.

So the question: is anyone planning on coding OpenOCD on the Raspberry Pi?
Posts: 1
Joined: Tue Feb 28, 2012 12:07 am
by mm0zct_ » Fri Jul 20, 2012 12:16 pm
I have actually been getting my RPi to work as a JTAG master for an in house platform, not openocd, but I'm gradually writing it up in a rather incoherent tumblr post mm0zct.tumblr.com
I've not finished writing it up yet but it might be useful when I finally do. Soldering together the final logic level converter circuit this weekend.
Posts: 6
Joined: Sun Jun 10, 2012 12:42 am
by Bakul Shah » Fri Jul 20, 2012 5:43 pm
mm0zct_ wrote:I have actually been getting my RPi to work as a JTAG master for an in house platform, not openocd, but I'm gradually writing it up in a rather incoherent tumblr post mm0zct.tumblr.com
I've not finished writing it up yet but it might be useful when I finally do. Soldering together the final logic level converter circuit this weekend.

Sounds very interesting.... Please keep us posted!

MNM wrote:If my understanding is correct, the JTAG connector on the RPi is a JTAG link going into the RPi (i.e. the TCK, TMS, TDI pins are inputs to the RPi) and the general recommendation is that this JTAG link is not very useful to anyone but the RPi team itself. There is no JTAG connector out of the RPi (i.e. where the TCK, TMS, TDI pins would be outputs from the RPi) so the only way to emulate such a JTAG out link would be by using the GPIOs on the GPIO headers.

You need to solder a wire as one of the signals is not brought on either header but you can use JTAG for the ARM processor. See https://github.com/dwelch67/raspberrypi, in particular the armjtag directory.
Posts: 293
Joined: Sun Sep 25, 2011 1:25 am