[SOLVED] warnings of Serial.println(F("Hi there"));


to save ram put message texts flash memory e.g. using f()-function. works well. developers!

anyhow, compiler gives red warning verbose output list @ every invocation of f():
" warning: initialized variables can placed program memory area".

it makes tedious find other potentilly useful warnings among on 100 f() -related messages in program. (red , white distinction otherwise idea).

there has been discussions @ least months ago e.g. in avg-freaks forum, without  having easy
solution suppress warning message no others.

have solution this?


http://old.nabble.com/c%2b%2b-with-pstr-td26664456.html

locate , open wstring.h

above these 2 lines...
code: [select]
class __flashstringhelper;
#define f(string_literal) (reinterpret_cast<__flashstringhelper *>(pstr(string_literal)))


insert this...
code: [select]
#undef progmem
#define progmem __attribute__(( section(".progmem.data") ))


no guarantees management.   ;)


Arduino Forum > Using Arduino > Installation & Troubleshooting > [SOLVED] warnings of Serial.println(F("Hi there"));


arduino

Comments

Popular posts from this blog

Thread: PKI Client 5.00 install (for eToken Pro)

ATmega2560-Arduino Pin Mapping

Crossfader Arduino Tutorial