[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] port access with avr-gdb
From: |
Ned Konz |
Subject: |
Re: [avr-gcc-list] port access with avr-gdb |
Date: |
Fri, 18 Jun 2004 14:35:20 -0700 |
User-agent: |
KMail/1.6.2 |
On Friday 18 June 2004 12:40 pm, I wrote:
> On Sunday 13 June 2004 7:23 am, Dave Hylands wrote:
> > 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.
>
> I rather like the way that Microchip's C18 compiler does it...
Here's an example; I haven't tried it out.
The important ideas:
* bits are named in anonymous struct members in unions
* can deal with multi-bit fields (like MUX0..4 in adc10.h here)
* factoring common peripherals out into separate files can ease code
duplication and maintenance effort
* defines provide datasheet-compatible aliases but still safe
--
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE
- Re: [avr-gcc-list] port access with avr-gdb, (continued)
- RE: [avr-gcc-list] port access with avr-gdb, Dave Hylands, 2004/06/13
- RE: [avr-gcc-list] port access with avr-gdb, Larry Barello, 2004/06/16
- RE: [avr-gcc-list] port access with avr-gdb, Theodore A. Roth, 2004/06/17
- RE: [avr-gcc-list] port access with avr-gdb, Theodore A. Roth, 2004/06/17
- Re: [avr-gcc-list] port access with avr-gdb, David Brown, 2004/06/17
- RE: [avr-gcc-list] port access with avr-gdb, Larry Barello, 2004/06/17
- RE: [avr-gcc-list] port access with avr-gdb, Theodore A. Roth, 2004/06/17
- Message not available
- RE: [avr-gcc-list] port access with avr-gdb, Theodore A. Roth, 2004/06/17
Re: [avr-gcc-list] port access with avr-gdb, Ned Konz, 2004/06/18
- Re: [avr-gcc-list] port access with avr-gdb,
Ned Konz <=
Re: [avr-gcc-list] port access with avr-gdb, Theodore A. Roth, 2004/06/17
Re: [avr-gcc-list] port access with avr-gdb, David Brown, 2004/06/18
RE: [avr-gcc-list] port access with avr-gdb, Dave Hylands, 2004/06/18
RE: [avr-gcc-list] port access with avr-gdb, Dave Hylands, 2004/06/18
RE: [avr-gcc-list] port access with avr-gdb, Dave Hylands, 2004/06/21