On Sep 18, 2005, at 3:02 PM, Vincent Trouilliez wrote:
Do I need to use some variant of the printf function when displaying data declared with the __ATTR_PROGMEM__ attribute ?
Yes. printf_P(). Better read the manual as I don't use printf() so I haven't used printf_P() and can't say how or whether you can mix memory spaces in one _P function call.
Doesn't the compiler take care of this automatically ?
Nope. Been talked about. GCC 3.x lacks the hooks to deal with multiple address spaces. Something that 4.x might. This is the one minor detail where at least some commercial AVR C compilers do better.
There are at least 3 address spaces in the AVR: SRAM, FLASH, and EEPROM. Maybe SFR is 4th but think that is in SRAM space.
-- David Kelly N4HHE, [EMAIL PROTECTED] ======================================================================== Whom computers would destroy, they must first drive mad. _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list