Re: [WIP] Bare-metal register browsing

Yao Qi
2015-04-24T09:47:15Z

Vladimir Prus <vladimir@codesourcery.com> writes:

Hi Vladimir,

> The attached patches implement accessing peripheral registers on
> bare-metal targets. Typically,
> these registers are memory-mapped, so one can poke at them using
> memory operations, but it's
> far from convenient. Also, on some targets the registers might require
> a custom way of access,
> which makes things even less convenient.
>
> This patch allows target XML to describe 'spaces' - contains of
> registers, which can be further grouped.
> Given that descrpiption, GDB allows one to do something like:
>
> (gdb) print $io.GPIO_PORTF.GPIO_PORTFDIR
> $7 = -1
>
> to access registers. One can also do
>
> (gdb) ptype $io
>
> to see top-level register groups in space 'io', and so find the
> desired register.

What does the xml using 'spaces' look like? A small example would be
useful. Target description "reg" has already had a component "type",
can't we extend "type" for memory-mapped registers? I am trying to
understand how useful it is to add 'spaces' here.

--
Yao (齐尧)