[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] String array in ROM gives error in spite of following
From: |
Senthil Kumar Selvaraj |
Subject: |
Re: [avr-gcc-list] String array in ROM gives error in spite of following example code. |
Date: |
Fri, 13 Jun 2014 10:24:36 +0530 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Thu, Jun 12, 2014 at 09:58:54PM +0530, Royce Pereira wrote:
> I'll try the various suggestions tomorrow.
>
> But I'm surprised at the diverse replies.
>
> Don't people declare an array of strings anymore ? :-)
>
Well, the compiler is now stricter in that it expects the array itself
to be declared const (in addition to the array elements).
Regards
Senthil
> On Thu, Jun 12, 2014 at 9:30 PM, Senthil Kumar
> <address@hidden> wrote:
> > Does
> >
> > PGM_P const pgtmp_msg[] PROGMEM =
> > { ptmpUP_msg, ptmpDN_msg, ptmpCLG_msg,} ;
> >
> > work? The array itself needs to be declared const, as progmem/flash contents
> > cannot be modified.
> >
> > Regards
> > Senthil
> >
> >
> > On Thu, Jun 12, 2014 at 6:16 PM, Bob Paddock <address@hidden>
> > wrote:
> >>
> >> #define FLASH /* Empty, used for IAR compiler. Define PROGMEM as
> >> empty to use GCC */
> >>
> >> static char const FLASH string000[] PROGMEM = "NO_MSG"; /* 000/0x00 */
> >> ...
> >>
> >> static PGM_P const string_pointers[] PROGMEM = {
> >> string000, /* 0x00 */
> >> ...
> >> };
> >>
> >> That works without out warnings for C. There was a long standing bug
> >> that you may be running into if you are compiling as C++.
> >>
> >> _______________________________________________
> >> AVR-GCC-list mailing list
> >> address@hidden
> >> https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
> >
> >
>
>
>
> --
> Best Regards,
>
> -- Royce Pereira
>
> _______________________________________________
> AVR-GCC-list mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
- [avr-gcc-list] String array in ROM gives error in spite of following example code., Royce Pereira, 2014/06/12
- Re: [avr-gcc-list] String array in ROM gives error in spite of following example code., Francois Lorrain, 2014/06/12
- Re: [avr-gcc-list] String array in ROM gives error in spite of following example code., Royce Pereira, 2014/06/12
- Re: [avr-gcc-list] String array in ROM gives error in spite of following example code., Royce Pereira, 2014/06/12
- Re: [avr-gcc-list] String array in ROM gives error in spite of following example code., Royce Pereira, 2014/06/12
- Re: [avr-gcc-list] String array in ROM gives error in spite of following example code., Bob Paddock, 2014/06/12
- Re: [avr-gcc-list] String array in ROM gives error in spite of following example code., Senthil Kumar, 2014/06/12
- Re: [avr-gcc-list] String array in ROM gives error in spite of following example code., Royce Pereira, 2014/06/12
- Re: [avr-gcc-list] String array in ROM gives error in spite of following example code.,
Senthil Kumar Selvaraj <=
- Re: [avr-gcc-list] String array in ROM gives error in spite of following example code., Royce Pereira, 2014/06/13
- Re: [avr-gcc-list] String array in ROM gives error in spite of following example code., Joerg Wunsch, 2014/06/13
- Re: [avr-gcc-list] String array in ROM gives error in spite of following example code., Royce Pereira, 2014/06/13
- Re: [avr-gcc-list] String array in ROM gives error in spite of following example code., Senthil Kumar Selvaraj, 2014/06/13
- Re: [avr-gcc-list] String array in ROM gives error in spite of following example code., Royce Pereira, 2014/06/13
Re: [avr-gcc-list] String array in ROM gives error in spite of following example code., Georg-Johann Lay, 2014/06/16