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

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

Re: [avr-gcc-list] program memory access question


From: Marek Michalkiewicz
Subject: Re: [avr-gcc-list] program memory access question
Date: Wed, 12 Jun 2002 11:05:38 +0200 (CEST)

> Can I do what I'm trying to do without reverting to calls to _lpm_inline?

Well, besides lpm you have a few string functions (with *_P names)
that work on strings in program memory.  You can use memcpy_P() to
copy something from program memory to RAM - you can have a big array
of structs in program memory, and copy just one element, for example.

> Is there something obvious that I'm missing?

GCC itself doesn't handle different address spaces (extending it to do
that would be quite a lot of work, useful only for a few targets -
AVR, some DSP chips, x86 segments...), so we have to live with special
macros and library functions to access anything in program memory.

Not perfect, but not that hard in practice...

Marek

avr-gcc-list at http://avr1.org



reply via email to

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