Follow-up Comment #6, bug #28837 (project avr-libc):

> Backport the gcc fix :-)
> it looks like it could be quite a while before it becomes
> available by normal upgrade.

avr-gcc's PR34734 <http://gcc.gnu.org/PR34734> is fixed in 4.6.2 and GCC 4.6.2
is available, see http://gcc.gnu.org/gcc-4.6

Bugfixes in avr-gcc are not backported to all versions supported by GCC
because of avr-gcc developer shortage. That is: Bugfixes are only backported
from current development trunk (4.7 at the moment) to 4.6.

Even if there was a backport to 4.5, you would still have to get a 4.5.3
distribution or build it yourself, anyway, as it won't tunnel into your local
installation by magic ;-)


#define PROGMEM __attribute__(( section(".progmem.data"))) 
PROGMEM const char string1[] = "String 1";
PROGMEM char string2[] = "String 2";


> error: string2 causes a section type conflict

This is not a avt-libc bug because it is not a PROGMEM define from avr-libc.

And GCC is correect about complaining: Section attributes are drawn from data
properties and they are different but the data is put into the same section.

Using a new compiler version together with the original progmem attribute,
this will result in an error, too, because it is no more legitimate to use
attribute progmem in non-const data.

If you like to write to the data by, say, a bootloader then the data is to be
qualified as volatile const.





    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?28837>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/


_______________________________________________
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev

Reply via email to