"Weddington, Eric" wrote: >> I have been focused on a problem for three days. >> >> >> >> My program does not work if compiled with -Os in Ubuntu Linux >> 8.10 (Avr Gcc 4.3.0), but works if compiled with -Os in >> Windows+WinAVR(20080512). > > > Version 4.3.0 of AVR GCC has known code generation problems that were fixed > with patches in WinAVR. My guess is that the Ubuntu distro of AVR GCC is not > built with these patches. You need to either build AVR GCC with those patches, > or use version 4.3.2 where these code gen bugs are fixed.
One of the code generation problems had specifically to do with saving and restoring registers in ISRs, and the symptoms described in the original message are what you would see in the unpatched 4.3.0 version of avr-gcc. So I would say it is highly likely that the Ubuntu distro does not have the needed patches for avr-gcc. -Preston _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list