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

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

Re: [avr-gcc-list] Structs in program memory.


From: E. Weddington
Subject: Re: [avr-gcc-list] Structs in program memory.
Date: Tue, 27 Apr 2004 05:58:06 -0600

[Rearranging the top-post for easier reading ]

On 26 Apr 2004 at 18:04, Douglas Dotson wrote:

> --- Christian Ludlam <address@hidden> wrote:
> > On 27 Apr E. Weddington wrote:
> > 
> > > On 26 Apr 2004 at 15:57, Douglas Dotson wrote:
> > > 
> > > > Thanks for the info. Too bad it isn't a bit more
> > seamless. Would be nice
> > > > to be able to switch back and forth from RAM to
> > PROGMEM without rewriting
> > > > code. I guess I can accomplish that using
> > macros, but that's kind of
> > > > ugly.
> > > 
> > > Any switching between Program Memory and RAM will
> > have seams of some sort 
> > > because the AVR is a Harvard Architecture chip.
> > 
> > Not necessarily; if the compiler is aware of the
> > different address spaces it
> > can change the generated code to access it
> > correctly. Then it would just be a
> > case of changing the declaration of a variable - the
> > C code to read it would
> > be the same.
> > 
> > This has come up several times, but AFAIK nobody's
> > seriously considered
> > adding this support to gcc (it's probably a lot of
> > work). I think some other
> > compilers were going to, though - sdcc springs to
> > mind, but it seems the AVR
> > port is no longer maintained :-/
> > 
> I don't think it would be that bad to do. Obviously
> the PROGMEM directive is stored in the parse tree so
> that the code generator can create the struct in
> PROGMEM. So the code generator should be able to
> generate the appropriate code to access. I haven't
> looked at GCC code in about 10 years so it is hard
> tell the effort involved.

You're right Christian, it could be added to GCC itself; I've been aware of 
this. The problem of 
course is finding people who are:
1. Willing to do it.
2. Capable of doing it.

Right now, there are 2 listed maintainers of the AVR port of GCC, both of which 
are not very 
actively involved in it. There is a bug list for the AVR port of GCC that is 
languishing. Granted 
there aren't many bugs, and especially show-stopper bugs. I know of one other 
person (Ted 
Roth) who is getting his FSF paperwork done so he can submit patches to GCC. 
However, 
Ted is so incredibly busy with maintaining avr-libc, uisp, avrdude, simulavr, 
avarice, and the 
AVR port of GDB. It would certainly help to have other volunteers, especially 
with GCC. I agree 
that it would be incredibly beneficial to have this feature; it would be quite 
the coup. But it's not 
going to easily happen without volunteers willing to go through all the hoops 
to get there.

Eric


reply via email to

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