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: Christian Ludlam
Subject: Re: [avr-gcc-list] Structs in program memory.
Date: Tue, 27 Apr 2004 00:56:51 +0100
User-agent: Messenger-Pro/1.00c (MsgServe/1.00a) (RISC-OS/5.05) POPstar/2.05

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


reply via email to

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