Your 6 icons in PROGMEM are 41kb
If your sketch size is close to, or greater than 64kb, you could be pushing certain functions to far into memory.
You can work around it by putting some or all icons into far progmem space ( you are using near progmem space. ), which leaves the near range free for code.
Your 6th icon is most probably removed during compilation when you do not reference it. By adding the myGLCD.drawBitmap it is left in pushing the sketch over 64k.
The code below shows how to read from the FAR PROGMEM range. The GET_FAR_ADDRESS macro converts the 16bit pointer to a 32bit pointer.
Like the SD card option, you probably will have to manually write the image. Or you could modify the glcd function to accept another parameter to decide weather to use near or far progmem.
//#include <avr\pgmspace.h>
#define GET_FAR_ADDRESS(var) \
({ \
uint_farptr_t tmp; \
\
__asm__ __volatile__( \
\
"ldi %A0, lo8(%1)" "\n\t" \
"ldi %B0, hi8(%1)" "\n\t" \
"ldi %C0, hh8(%1)" "\n\t" \
"clr %D0" "\n\t" \
: \
"=d" (tmp) \
: \
"p" (&(var)) \
); \
tmp; \
})
#define PROGMEM_FAR __attribute__((section(".fini7")))
char pgmData[] PROGMEM_FAR = { 'T', 'e', 's', 't', 'i', 'n', 'g', ' ', 'P', 'G', 'M', '\0' };
void setup() {
Serial.begin( 9600 );
byte c, i =0;
while( c = pgm_read_byte_far( GET_FAR_ADDRESS( pgmData ) + i++ ) ){
Serial.print( ( char ) c );
}
}
void loop() {}