Re: [avr-gcc-list] Program Space String & optimization
From:
bolet (sent by Nabble.com)
Subject:
Re: [avr-gcc-list] Program Space String & optimization
Date:
Thu, 15 Dec 2005 02:27:00 -0800 (PST)
>A solution I would propose is to change the offending line like this (I
>haven't checked this, though):
>> do{} while( (a=(volatile char)(pgm_read_byte(txt))) );
Thanks for answering. I've tryed your suggestion with the same result, but
the answer given by Joerg Wunsch (first answer in thread) works OK:
>Your volatile qualifier is at the wrong place. You're marking the
>object "txt" points to as volatile, not the pointer itself. Change
>that into
>
>PGM_P volatile txt = P_Txt