I have read somewhere that F() macro is obsolete for literal strings.
If that is true, from which version of Arduino?
For defined constant strings, is it (pre)compiler smart enough that there is no need to be defined with PROGMEM?
I have read somewhere that F() macro is obsolete for literal strings.
If that is true, from which version of Arduino?
For defined constant strings, is it (pre)compiler smart enough that there is no need to be defined with PROGMEM?
There is some discussion of it here:
It depends on which architecture you're using. On the AVR architecture, it is still just as useful as ever. On the new megaAVR architecture of the ATmega4809 used on the Uno WiFi Rev2 and Nano Every, it is not. I believe it is also the case with the SAMD architecture of the MKR boards, Zero, Nano 33 IoT.
Ideally, the Arduino core library should support the F() macro on all architectures, but just make it do nothing (with no overhead) on the architectures where it's not needed. That way you can use it in your code to save memory on the AVR boards, while still retaining portability with the architectures where it's not needed. That is how the Arduino SAMD Boards core works. Unfortunately, the Arduino megaAVR Boards core currently doesn't fully support the F() macro (actually the problem is not with F() macro, but the special __FlashStringHelper type it uses). It looks like the plan is to fix that so that it should be supported by the next release of Arduino megaAVR Boards.
Even on the chips where F() is unncessary but still non-null (ie ATmega4809), it's not actually "obsolete"; it just does a bit more work than absolutely necessary...