I’ve just started getting an error message I’ve never encountered before (and believe me, I’ve encountered a lot!)…
SD\utility\SdFile.cpp.o:(.rodata._ZTV6SdFile+0x6): warning: internal error: out of range error
core.a(HardwareSerial.cpp.o):(.rodata._ZTV14HardwareSerial+0x6): warning: internal error: out of range error
I use quite a lot of progmem constants for defining errors and log messages, and I first encountered this error when I added a couple more of them. Experimentation indicates that if I remove some of these constants from anywhere in my project then the error disappears, and if I add them back again the error re-appears.
The project is quite large (over 30 libraries, compiles to 136k), each library has been tested and used on it’s own, and it’s only when the entire project gets compiled that I get the error.
- I’m using a Mega 2560,
- The error message refers to standard arduino library files NOT stuff I’ve written myself.
- All my libraries have worked together in other projects without problems.
- I have about 20k of progmem constants.
I define my progmem constants like this…
const prog_char ERR_MESS_01 PROGMEM = "ERROR – Battery voltage dangerously low.";
and use it like this…
strcpy_P(_messBuff, ERR_MESS_01); logging(_messBuff);
where _messBuff is a predefined array of characters of fixed length, and logging() is my function for echoing to screen and writing to an SD card.
Am I right in thinking there’s a limit to the amount of data I can put into PROGMEM? If so, is there a work-around or alternative technique I can use to achieve the same thing? I find it really useful to be able to log error messages to SD card, and I really don’t want to have to remove a lot of very useful data just because of some memory limits.