Chat here about code rewrites, mods, etc... with respect to the github project

Moderator: igrr

User avatar
By gatoruss
#76348 I know there must be something I am missing, but how does the code described at the following link use String to copy char array from flash?

Whtyaren't the special attributed and function at the following link required?
User avatar
By McChubby007
btidey wrote:I didn't think that was the case for the esp8266.
See ... OGMEM.html

I agree. Must use PROGMEM. Same with Atmel328 (Uno etc).
I've made mistakes in the past with a table of pointers to strings, with the pointers going in PROGMEM and the strings in RAM.
Arduino Due on the other hand doesn't need PROGMEM and will happily put const strings in flash.
I would say in any case, for the sake on compatibility it is better to always use PROGMEM no matter what. The architectural settings can then decide whether to ignore or use PROGMEM (for instance a lot of my code is developed and runs on Linux as well as esp8266, so I just redefine PROGMEM on the linux compile).