B4R Question ESP8266 PROGMEM error

Mostez

Active Member
Hello,
I tried to upload this code example to ESP8266, but I got that error message below, is it about a missing file or is there another method for ESP to include arrays into progmem.

Thanks

B4R Version: 2.60
Parsing code. (0.00s)
Building folders structure. (0.00s)
Compiling code. (0.00s)
Building project (0.00s)
Compiling & deploying Ino project (Generic ESP8266 Module - COM10) Error
Loading configuration...
Initializing packages...
Preparing boards...
Verifying...
b4r_main.cpp:20:27: error: avr/pgmspace.h: No such file or directory
#include <avr/pgmspace.h>
^
compilation terminated.
exit status 1
 

Mostez

Active Member
Thanks so much, worked OK. Sorry if it's a stupid question, data array stored in program memory or RAM?
 

Erel

Administrator
Staff member
Licensed User
Both. It is loaded into RAM when the program starts.

PROGMEM is useful when programming smaller Arduino boards that only have 2k or less RAM.
 
Top