I've been using PROGMEM prog_char text[]="hello"; for ages without problems.
With the new IDE, it complains about the prog_char. I guess it is because of the DEPRECATED status of the typedef. So I changed to const char PROGMEM text[]="hello" OK, it works on 1.0.x and 1.6.0
But then I also have SRAM arrays that store pointers (FLASH address) to various PROGMEM strings. I used to do:
PROGMEM const char *phi_prompt_lcd_ch_item[] = {phi_prompt_lcd_ch0, phi_prompt_lcd_ch1, phi_prompt_lcd_ch2, phi_prompt_lcd_ch3, phi_prompt_lcd_ch4, phi_prompt_lcd_ch5}; ///< Custom LCD character char array addresses.
This way I can save some SRAM. Now this definition is also complained upon in 1.6.0. I don't really know how to fix it. I tried to remove PROGMEM but my program didn't run (probably grabbed wrong stuff in FLASH).
Error:
error: variable 'phi_prompt_lcd_ch_item' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
PROGMEM const char * phi_prompt_lcd_ch_item[] = {phi_prompt_lcd_ch0, phi_prompt_lcd_ch1, phi_prompt_lcd_ch2, phi_prompt_lcd_ch3, phi_prompt_lcd_ch4, phi_prompt_lcd_ch5}; ///< Custom LCD character char array addresses.
So PROGMEM alone with the const char * indicates that the pointers reside in FLASH in past versions (possibly avr gcc version instead of Arduino IDE version). Now I tried a few orders and even two PROGMEM but couldn't get this line to compile. Any suggestions? Thanks.
My final version was identical to this AVR GCC 2013 tutorial I found:
const char phi_prompt_lcd_ch0[] PROGMEM ={ 4,14,31,64,31,31,31,31,0}; ///< Custom LCD character: Up triangle with block
const char phi_prompt_lcd_ch1[] PROGMEM ={ 4,14,31,64,64,64,64,64,0}; ///< Custom LCD character: Up triangle
const char phi_prompt_lcd_ch2[] PROGMEM ={31,31,31,31,64,64,64,64,0}; ///< Custom LCD character: Top block
const char phi_prompt_lcd_ch3[] PROGMEM ={64,64,64,64,31,31,31,31,0}; ///< Custom LCD character: Bottom block
const char phi_prompt_lcd_ch4[] PROGMEM ={64,64,64,64,64,31,14, 4,0}; ///< Custom LCD character: Down triangle
const char phi_prompt_lcd_ch5[] PROGMEM ={31,31,31,31,64,31,14, 4,0}; ///< Custom LCD character: Down triangle with block
const char * phi_prompt_lcd_ch_item[] PROGMEM = {phi_prompt_lcd_ch0, phi_prompt_lcd_ch1, phi_prompt_lcd_ch2, phi_prompt_lcd_ch3, phi_prompt_lcd_ch4, phi_prompt_lcd_ch5}; ///< Custom LCD character char array addresses.
http://deans-avr-tutorials.googlecode.com/svn/trunk/Progmem/Output/Progmem.pdf