Genode + ARM + OpenOCD

Stefan Kalkowski stefan.kalkowski at genode-labs.com
Mon May 14 10:21:07 CEST 2018


Hello Hinnerk,

On Thu, May 10, 2018 at 11:55:56PM +0200, Hinnerk van Bruinehsen wrote:
> Hello again,
> 
> I've got kind of a followup question. I've got some things working (I
> can hold the board, read and write to memory and resume operations),
> what's still missing is real debug capability, which most likely comes
> from me not knowing which file gdb should load. I assumed it would be
> the image.elf, but that is stripped and therefore seems not to include
> any debug info.

all unstripped user-land components can be found under "debug/" in your
build directory. The kernel/core and bootstrap component however are
located under "var/run/<run-script-name>.core" and
"var/run/<run-script-name>.bootstrap". The latter is the unstripped
version of our first stage kernel still running with MMU off. Whereby,
core is starting with MMU enabled and is linked correspondingly to
0x80000000 and above.
> 
> Another somewhat related question is, if I can make sure that writes via
> "write<registername>(0x1234)" really happen. If my OCD works, the value
> doesn't seem to change (or the driver fails before that even gets
> executed. Is there a way to sensibly use debug-printf like statements
> (does "Genode::warning()" work inside a device driver?

Of course, Genode::warning() is working in a device driver. However,
if you need a light-weight print solution, you can use Genode::raw()
instead. In contrast to the other print methods, it uses a kernel call
implicitly and does not use the "LOG" service. Moreover, it works
unsynchronized and is therefore not thread-safe. It is part of the
development version of Genode to ease debugging of time-sensitive
components, like device drivers.

Regards
Stefan

> 
> Thank you and kind regards,
> Hinnerk
> 
> On Wed, May 09, 2018 at 10:32:46PM +0200, Hinnerk van Bruinehsen wrote:
> > Hello,
> > 
> > I'm writing/porting a bunch of device drivers for an ARM board (am335x
> > based) for Genode/seL4.
> > I have an on chip debugger (flyswatter2) and can halt or resume the
> > board's operation via the OCD (so generally it seems to work).
> > Since you have successfully ported/written drivers for other boards
> > (imx6 for example), I've asked myself if you have some hints, that may
> > help me to get gdbi (ideally with OpenOCD) working.
> > Right now my problem is that I don't know what binary file I should open
> > gdb with, since using the resulting uimage file doesn't work for me.
> > 
> > If someone has some hints for me it would be greatly appreciated!
> > 
> > Have a nice holiday and presumably long weekend!
> > 
> > WKR
> > Hinnerk
> > 
> > 
> > _______________________________________________
> > Genode users mailing list
> > users at lists.genode.org
> > https://lists.genode.org/listinfo/users
> 
> _______________________________________________
> Genode users mailing list
> users at lists.genode.org
> https://lists.genode.org/listinfo/users

-- 
Stefan Kalkowski
Genode labs

https://github.com.skalk | https://genode.org



More information about the users mailing list