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

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

Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?


From: David Kelly
Subject: Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?
Date: Sun, 18 Sep 2005 16:54:04 -0500


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, address@hidden
========================================================================
Whom computers would destroy, they must first drive mad.





reply via email to

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