[avr-gcc-list] Re: Storing variables in external memory - suggestions

2009-05-23 Thread Heike C. Zimmerer
David Kelly dke...@hiwaay.net writes: On Fri, May 22, 2009 at 05:35:43AM -0700, Parthasaradhi Nayani wrote: Hello all, I was wondering if any one can suggest a decent method of automatically assigning address space to variables in external EEPROM. For internal EEPROM the attribute EEMEM

Re: [avr-gcc-list] Storing variables in external memory - suggestions

2009-05-23 Thread Parthasaradhi Nayani
--- On Fri, 5/22/09, David Kelly dke...@hiwaay.net wrote: AVR Studio convention is that internal .eeprom starts at 0x0081. So what I'd do if I were you and wanted the compiler to assign static memory addresses in an external eeprom would be: #define    EEEXT

Re: [avr-gcc-list] Storing variables in external memory - suggestions

2009-05-23 Thread Dave Hylands
Hi Nayani, Replying to the list this time as well. On Sat, May 23, 2009 at 3:24 AM, Parthasaradhi Nayani partha_nay...@yahoo.com wrote: ...snip... Hello David Kelly, I tried as you mentioned and seems to work fine. One more question is, how to know the address ranges used by WinAVR? so one

[avr-gcc-list] RE: possible bug in avr-gcc 4.3.2?

2009-05-23 Thread Zoran Rilak
On second thought, perhaps the bug is in my understanding of how it works. In the following block: char dow0[] PROGMEM = Ned; char dow1[] PROGMEM = Pon; char dow2[] PROGMEM = Uto; char dow3[] PROGMEM = Str; char dow4[] PROGMEM = Stv; char dow5[] PROGMEM = Pia; char dow6[] PROGMEM = Sob; PGM_P

Re: [avr-gcc-list] RE: possible bug in avr-gcc 4.3.2?

2009-05-23 Thread Joerg Wunsch
Zoran Rilak zoran.ri...@gmail.com wrote: is it possible that the compiler does automatic replacement of dow[0] with dow0, which is as intended, while dow[k] gets dereferenced as a pointer to data memory? Exactly that. You have to apply pgm_read_word() in both cases. -- cheers, Jorg