[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] avr-gdb: watch on I/O register?

From: Mark Litwack
Subject: [avr-gcc-list] avr-gdb: watch on I/O register?
Date: Thu, 8 May 2008 14:12:01 -0400
User-agent: KMail/1.9.9

Is it possible to set a watchpoint on an I/O register?

*Something* in my program is misbehaving and changing an I/O
register on me.  I'm trying to catch it using avr-gdb but it
seems that the hardware is not doing a break on a write to
an I/O register.

Specifically, I'm trying to catch changes to SPCR on an
AT90USB1287, which is register 0x2c (memory location 0x4c).

I think this should work:

  (gdb) watch *(uint8_t *)0x80004c
  Hardware watchpoint 1: *(unsigned char *) 8388684

but it does not.  Even with a simple program that just pokes
values to this location using either "out 0x2c,..." or other
memory store instructions.  The register is changed but no
break occurs.

At this point I'm thinking I/O registers are a special case
and not caught by the OCD hardware.  If it makes any
difference, I'm using:

   avr-gdb v6.6
   avarice v2.7 w/JTAGICEmkII on usb

All running on Fedora 8, FWIW.

Thanks for any clues,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]