AVR debugging - Can't read io register contents

Tristan Gingold gingold@adacore.com
Mon Nov 30 13:36:00 GMT 2015

> On 30 Nov 2015, at 14:24, Diogo Martins Silva <diogo.masilva@gmail.com> wrote:
> Hello.
> I'm debugging an AVR software using an AVR Dragon - Avarice - avr-gdb -
> Eclipse Toolchain in Ubuntu 15.10, with current packages.
> While trying to read some register address (1284p's EICRA register at
> 0x69), I get all zeros. If I printf the register, the correct value is
> printed. I know to have successfully altered the register because the
> behavior of the micro changes accordingly.
> Funny thing is I can correctly read every other register.
> How do I pinpoint this? I'm not knowledgeable of gdb, so I appreciate
> your help.

I would first do a ‘set debug remote 1’ to trace the remote protocol
and see whether the issue in within avarice or within gdb.

More information about the Gdb mailing list