I saw the earlier forum posts regarding this bug, but I would like to confirm that it is still present in AVR Studio 4.12 SP4 build 498.
Here is asm code that generates the bug, when simulated in AVR Studio:
; Reset vector
; Main function loop
; Initialise stack pointer to end of RAM
; Initialise Z
This bug actually crops up when using the stream routines, e.g. printf, putchar,..., because the FILE structure contains a function pointer to the "putchar(...)" function. Here is C code that demonstrates the bug when simulated in AVR Studio:
int PRINTF_iPutChar(char cData, FILE* pxStream);
static FILE PRINTF_xStream = FDEV_SETUP_STREAM(PRINTF_iPutChar,NULL,_FDEV_SETUP_WRITE);
int PRINTF_iPutChar(char cData, FILE* pxStream)
stdout = &PRINTF_xStream;
What is the ETA on Service Pack 5?