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

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

[avr-gcc-list] PROGMEM string pointers to strings in PROGMEM


From: Peter Bosscha
Subject: [avr-gcc-list] PROGMEM string pointers to strings in PROGMEM
Date: Mon, 04 Nov 2002 09:14:18 +0200

Hi All,

I thought I understood this PROGMEM stuff, but this one has me
stumped.

I'm trying to create an array of pointers in PROGMEM (no problem so
far), which point to strings in PROGMEM.
Something like this:

typedef struct {
  byte* PROGMEM strings;
}Tstrs;

Tstrs PROGMEM pointers[]=
{
  {"This"},
  {"is"},
  {"Text"},
  {"in"},
  {"PROGMEM"}
};

Problem is, the strings wind up in RAM not PROGMEM. 
Putting more PSTR and PROGMEM in either does not compile or does not
help.

Yes, I know I could define the strings individually and then put
references in the array, 
but in this case I want the compiler to do the work for me.

Any ideas ?

Regards
Peter

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



reply via email to

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