avr-gcc-list
[Top][All Lists]
Advanced

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

RE: [avr-gcc-list] port access with avr-gdb


From: Larry Barello
Subject: RE: [avr-gcc-list] port access with avr-gdb
Date: Wed, 16 Jun 2004 20:38:14 -0700

I put this header together for the mega8...  I checked out accesses via a
zero pointer and, indeed, the compiler did the right thing for all accesses:
LDS/STS, IN, OUT and SBI/CBI when appropriate.

Maybe GCC should consider replacing the archaic #define headers with
structs, like this one?  Being able to do direct bit access is pretty nice
(rather than PORTB |= BV(PORTB1);) Or, maybe just adding this struct to the
current headers so either way could be used.

Cheers!

P.S. if attachments are stripped, I'll stick this somewhere public...

-----Original Message-----
From:  Dave Hylands

One way to get the registers to show up symbolically, is to create a
structure which has the same layout as the registers. Then you can access
through a null pointer. This would allow you to see the registers in GDB.
They still wouldn't show up I nthe linker map though.

There are ways of making them show up in the linker map too. Just create an
asm file which has each of the registers named. On the C side you'd have
appropriate externs decalred.

-

reply via email to

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