-
-
Notifications
You must be signed in to change notification settings - Fork 7k
1.6 Frequently Asked Questions
IDE 1.6.x changes the location of the preferences file.
Therefore, it's using the default sketchbook location, which is C:\Users\username\Documents\Arduino
on Windows, /Users/username/Documents/Arduino
on MacOSX and /home/username/Arduino
on GNU/Linux.
Change the IDE preferences to use the same sketchbook folder IDE 1.0.x was using.
I get an error message that says: variable 'message' must be const in order to be put into read-only section by means of '__attribute__((progmem))': char message[] PROGMEM = "Hello!";
The latest avr-gcc compiler (used by Arduino 1.6.x) requires that variables in PROGMEM to be declared as const
. You must change the declaration in your sketch or in your library from
char message[] PROGMEM = "Hello!";
to
const char message[] PROGMEM = "Hello!";
I have a similar error but it seems to be already const! Here's the error: variable 'lotOfMessages' must be const in order to be put into read-only section by means of '__attribute__((progmem))': const char* lotOfMessages[] PROGMEM = {
In this case you have an array of messages (not just one) and you must tell the compiler that each one of them is const
. Here how is it done, change:
const char* lotOfMessages[] PROGMEM = {
to
const char const * lotOfMessages[] PROGMEM = {
And, yes, it's really tricky even for experts.
The compiler complains about prog_char
(or anything that begins with prog_...
). The exact error is: ISO C++ forbids declaration of 'type name' with no type
The new avr-libc has deprecated the use of prog_char
. You must replace every occurrence of prog_...
with the corresponding plain type. Here's a quick reference table:
replace... | ...with... |
---|---|
prog_char |
char |
prog_uchar |
unsigned char |
prog_int8_t |
int8_t |
prog_uint8_t |
uint8_t |
prog_int16_t |
int16_t |
prog_uint16_t |
uint16_t |
prog_int32_t |
int32_t |
prog_uint32_t |
uint32_t |
prog_int64_t |
int64_t |
prog_uint64_t |
uint64_t |