----- Oorspronkelijk bericht ----- > As Thomas Carsten Franke wrote: > > > I did not restored the NVM CMD because I > > didn't know that it would has to be. > > This is correct. We recently added a note to the documentation in the > header file <avr/pgmspace.h> telling that on Xmega devices, all the > functions will only work as designed if NVM_CMD is set to 0x00 (NOP). > > As you had to manually take care to set NVM_CMD to something else > before, I think it's only fair to leave the job to the programmer to > restore it afterwards. >
Although true, I rather think this is a GCC bug. The avr instruction documentation says LPM R31, Z+ has undefined results. In the example it was oke to use LPM R31, Z. Since GCC does not know LPM, I think this might be easy to spot in the GCC code or relevant patch. Hth, Wouter _______________________________________________ AVR-libc-dev mailing list AVR-libc-dev@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-libc-dev