[Top][All Lists]

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

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

From: Douglas Dotson
Subject: Re: [avr-gcc-list] Structs in program memory.
Date: Mon, 26 Apr 2004 18:04:10 -0700 (PDT)


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.


--- 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 :-/
> -- 
> Christian Ludlam
> address@hidden
> _______________________________________________
> avr-gcc-list mailing list
> address@hidden
> http://www.avr1.org/mailman/listinfo/avr-gcc-list

reply via email to

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