I'm using the SD library that comes with the IDE (Arduino 1.0.5 + Ubuntu 14.04 LTS) and I'm getting these warnings:
In file included from /usr/share/arduino/libraries/SD/SD.h:20:0,
from AlphaPrototypeV1_1.ino:57:
/usr/share/arduino/libraries/SD/utility/SdFat.h:289:25: warning: ‘prog_char’ is deprecated [-Wdeprecated-declarations]
void write_P(PGM_P str);
^
/usr/share/arduino/libraries/SD/utility/SdFat.h:290:27: warning: ‘prog_char’ is deprecated [-Wdeprecated-declarations]
void writeln_P(PGM_P str);
^
In file included from /usr/share/arduino/libraries/SD/SD.h:21:0,
from AlphaPrototypeV1_1.ino:57:
/usr/share/arduino/libraries/SD/utility/SdFatUtil.h:58:45: warning: ‘prog_char’ is deprecated [-Wdeprecated-declarations]
static NOINLINE void SerialPrint_P(PGM_P str) {
^
/usr/share/arduino/libraries/SD/utility/SdFatUtil.h:67:47: warning: ‘prog_char’ is deprecated [-Wdeprecated-declarations]
static NOINLINE void SerialPrintln_P(PGM_P str) {
Although my code compiles normally, I'm still confused by these warnings. What is the meaning of this? Does it has something to do with this bug?
This typedef is now deprecated because the usage of the progmem attribute on a type is not supported in GCC. However, the use of the progmem attribute on a variable declaration is supported, and this is now the recommended usage.
The typedef is only visible if the macro PROG_TYPES_COMPAT has been defined before including <avr/pgmspace.h> (either by a define directive, or by a -D compiler option.)
Type of a “char” object located in flash ROM.
Use the 1.0.6 or 1.5.8 IDE downloads from the Arduino site they seem to work with the SD library w/o warnings. Ubuntu has, it seems, bundled a toolchain and library that are not compatable.
Warnings do not stop compilation perhaps the program will operate properly. Ignore the warnings and test it.
I just came to realized that in order to get no warnings you must run it twice: the first time with the 1.0.5 and the second one with the 1.0.6. At least this seems to work for me.
The problem with the Arduino IDE's from Ubuntu is they seem to be compelled to add their own toolchain. That is the reason your 1.0.5 has problems with the SD Lib. I have never had problems with the SD Lib using the Arduino IDE's from Arduino.
When you switch between different versions of the IDE you may want to clear the old build folders from /tmp as they will be reused by the IDE.