Raspberry Pi 2 SMP debug

Gedare Bloom gedare at gwu.edu
Fri Jul 24 14:35:01 UTC 2015


On Wed, Jul 22, 2015 at 9:28 AM, Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
> On 22/07/15 13:19, Rohini Kulkarni wrote:
>>
>> Hi,
>>
>> I need to debug my code to check what is going wrong with SMP
>> initialization. Any suggestions on how I can go about this in the absence of
>> actual debugging hardware?
>
>
> Pavel Pisa wrote something about JTAG debugging of the  Raspberry Pi
> recently:
>
> https://lists.rtems.org/pipermail/devel/2015-July/011962.html
>
> Another option is Qemu, but I don't know the options to simulate a Raspberry
> Pi.
>
If these techniques don't work for the RPi2, and you can't find
anything online, then you'll have to resort to more mundane debugging
tactics.

One thing you can try to do is to use either LEDs or other IO to send
a signal off the device (if console IO isn't working), and create some
scheme by which you can identify various execution points in the
system. Using LEDs works pretty well when you have a sufficient number
of them, because you can turn them on/off to create a pattern (e.g.,
binary encoded numbers) and then you inject in various parts of the
code you're debugging something like, "led_on(1)...led_off(1);
led_on(2);..." and so on. Wherever the LED gets "stuck" you know the
problem exists between the number indicated by the lights and the next
number in the sequence. Of course, this only works if you can get the
LEDs working by the point in the code you're trying to debug, which
may be hard if the break is in really early boot code.

Gedare

> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone   : +49 89 189 47 41-16
> Fax     : +49 89 189 47 41-09
> E-Mail  : sebastian.huber at embedded-brains.de
> PGP     : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel



More information about the devel mailing list