Ive not been using AVRGCC frequently lately, but I had a serious hard time not to question my own abilities with this possible bug.
All ive done is place a few printf_P rapidly following each other. The end result is that when compiled only some are actually added to the elf and output hex files.
troubled code:
printf_P(PSTR("\r\n1 Test firmware t.01\r\n")); spi_Init(); printf_P(PSTR("\r\n2 Test firmware t.01 \r\n")); spi_Init(); printf_P(PSTR("3 this is a super string bladiblah Serial Peripheral Interface:")); printf("4 this is a super string bladiblah Serial Peripheral Interface:"); if (spi_Init() == 0) printf_P(PSTR("OK\r\n")); else printf_P(PSTR("ERROR\r\n")); // memtest();
output:
1 Test firmware t.01 2 Test firmware t.01 4 this is a super string bladiblah Serial Peripheral Interface:OK
3rd printf_P has gone into an other dimension? :P
Replacing printf_P for printf solves it, but thats not an option.
Help needed :D
//Steven