[Bug c++/44617] New: Serial Output on the atmega1280 does not work
There appears to be some sort of regression with avr-gcc 4.5.0. When compiling a sketch for the atmega1280 everything works except for serial output. The fix is to revert to 4.3.x The issue is documented here: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1276727004/15 and http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1250084886 Everything else (that I've tested) works fine. This issue appears to *only* affect the atmega1280 chip. As the atmega328 chip does not exhibit this bug when doing serial output. -- Summary: Serial Output on the atmega1280 does not work Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: scott at perturb dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44617
[Bug c++/44617] Serial Output on the atmega1280 does not work
--- Comment #2 from scott at perturb dot org 2010-06-21 18:07 --- * the exact version of GCC; avr-gcc-c++-4.5.0-1.fc13.x86_64 avr-gcc-4.5.0-1.fc13.x86_64 * the system type; Compiled on 2.6.33.5-112.fc13.x86_64 but the target was an atmega1280 * the options given when GCC was configured/built; :avr-g++ -v Using built-in specs. COLLECT_GCC=/usr/bin/avr-g++ COLLECT_LTO_WRAPPER=/usr/libexec/gcc/avr/4.5.0/lto-wrapper Target: avr Configured with: ../gcc-4.5.0/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --target=avr --enable-languages=c,c++ --disable-nls --disable-libssp --with-system-zlib --enable-version-specific-runtime-libs --with-pkgversion='Fedora 4.5.0-1.fc13' --with-bugurl=https://bugzilla.redhat.com/ Thread model: single gcc version 4.5.0 (Fedora 4.5.0-1.fc13) * the complete command line that triggers the bug; * the compiler output (error messages, warnings, etc.); and * the preprocessed file (*.i*) that triggers the bug, generated by adding -save-temps to the complete compilation command, or, in the case of a bug report for the GNAT front end, a complete set of source files (see below). It's on my machine at home so I'll have to get this information for you at a later time. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44617
[Bug target/44617] Serial Output on the atmega1280 does not work
--- Comment #4 from scott at perturb dot org 2010-06-21 18:13 --- (In reply to comment #3) > Can you also try on a FSF released GCC rather than one that has been modified > by the Fedora project? That might be harder... I do see from the two forum posts that the bug persists in GCC from Mandrake, OpenSuse, Ubuntu, and Mac OSX. I'll see what I can come up with. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44617
[Bug target/44617] Serial Output on the atmega1280 does not work
--- Comment #5 from scott at perturb dot org 2010-06-21 18:38 --- * the complete command line that triggers the bug; avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega1280 -DF_CPU=1600L -DARDUINO=18 -I/home/bakers/arduino-0018/hardware/arduino/cores/arduino /tmp/build4637782385548929954.tmp/sketch_jun21a.cpp -o/tmp/build4637782385548929954.tmp/sketch_jun21a.cpp.o * the compiler output (error messages, warnings, etc.); and I don't get any? Not sure if this is right, but it appears to compile 100% clean. * the preprocessed file (*.i*) that triggers the bug, generated by adding -save-temps to the complete compilation command, or, in the case of a bug report for the GNAT front end, a complete set of source files (see below). If I add -v -save-temps I do not get any *.i* files created. Perhaps my syntax is wrong? avr-g++ -v -save-temps -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega1280 -DF_CPU=1600L -DARDUINO=18 -I/home/bakers/arduino-0018/hardware/arduino/cores/arduino /tmp/build4637782385548929954.tmp/sketch_jun21a.cpp -o/tmp/build4637782385548929954.tmp/sketch_jun21a.cpp.o -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44617
[Bug target/44617] Serial Output on the atmega1280 does not work
--- Comment #6 from scott at perturb dot org 2010-06-21 18:39 --- For the record, the code I'm attempting to compile is extremely simple. Might explain why it compiles so cleanly: --- void setup() { Serial.begin(9600); } void loop() { Serial.println("Hello world"); delay(1000); } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44617
[Bug target/44617] Serial Output on the atmega1280 does not work
--- Comment #8 from scott at perturb dot org 2010-06-21 19:03 --- Here is the full command the arduino ide generates when it compiles code. I just took the last command for sketch_jun21a.cpp.o (my code) and added the -v and -save-temps. avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega1280 -DF_CPU=1600L -DARDUINO=18 -I/home/bakers/arduino-0018/hardware/arduino/cores/arduino /home/bakers/arduino-0018/hardware/arduino/cores/arduino/wiring.c -o/tmp/build4637782385548929954.tmp/wiring.c.o avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega1280 -DF_CPU=1600L -DARDUINO=18 -I/home/bakers/arduino-0018/hardware/arduino/cores/arduino /home/bakers/arduino-0018/hardware/arduino/cores/arduino/wiring_analog.c -o/tmp/build4637782385548929954.tmp/wiring_analog.c.o avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega1280 -DF_CPU=1600L -DARDUINO=18 -I/home/bakers/arduino-0018/hardware/arduino/cores/arduino /home/bakers/arduino-0018/hardware/arduino/cores/arduino/pins_arduino.c -o/tmp/build4637782385548929954.tmp/pins_arduino.c.o avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega1280 -DF_CPU=1600L -DARDUINO=18 -I/home/bakers/arduino-0018/hardware/arduino/cores/arduino /home/bakers/arduino-0018/hardware/arduino/cores/arduino/wiring_shift.c -o/tmp/build4637782385548929954.tmp/wiring_shift.c.o avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega1280 -DF_CPU=1600L -DARDUINO=18 -I/home/bakers/arduino-0018/hardware/arduino/cores/arduino /home/bakers/arduino-0018/hardware/arduino/cores/arduino/wiring_digital.c -o/tmp/build4637782385548929954.tmp/wiring_digital.c.o avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega1280 -DF_CPU=1600L -DARDUINO=18 -I/home/bakers/arduino-0018/hardware/arduino/cores/arduino /home/bakers/arduino-0018/hardware/arduino/cores/arduino/wiring_pulse.c -o/tmp/build4637782385548929954.tmp/wiring_pulse.c.o avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega1280 -DF_CPU=1600L -DARDUINO=18 -I/home/bakers/arduino-0018/hardware/arduino/cores/arduino /home/bakers/arduino-0018/hardware/arduino/cores/arduino/WInterrupts.c -o/tmp/build4637782385548929954.tmp/WInterrupts.c.o avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega1280 -DF_CPU=1600L -DARDUINO=18 -I/home/bakers/arduino-0018/hardware/arduino/cores/arduino /home/bakers/arduino-0018/hardware/arduino/cores/arduino/HardwareSerial.cpp -o/tmp/build4637782385548929954.tmp/HardwareSerial.cpp.o avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega1280 -DF_CPU=1600L -DARDUINO=18 -I/home/bakers/arduino-0018/hardware/arduino/cores/arduino /home/bakers/arduino-0018/hardware/arduino/cores/arduino/Print.cpp -o/tmp/build4637782385548929954.tmp/Print.cpp.o avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega1280 -DF_CPU=1600L -DARDUINO=18 -I/home/bakers/arduino-0018/hardware/arduino/cores/arduino /home/bakers/arduino-0018/hardware/arduino/cores/arduino/WMath.cpp -o/tmp/build4637782385548929954.tmp/WMath.cpp.o avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega1280 -DF_CPU=1600L -DARDUINO=18 -I/home/bakers/arduino-0018/hardware/arduino/cores/arduino /home/bakers/arduino-0018/hardware/arduino/cores/arduino/main.cpp -o/tmp/build4637782385548929954.tmp/main.cpp.o avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega1280 -DF_CPU=1600L -DARDUINO=18 -I/home/bakers/arduino-0018/hardware/arduino/cores/arduino /home/bakers/arduino-0018/hardware/arduino/cores/arduino/Tone.cpp -o/tmp/build4637782385548929954.tmp/Tone.cpp.o avr-ar rcs /tmp/build4637782385548929954.tmp/core.a /tmp/build4637782385548929954.tmp/wiring.c.o avr-ar rcs /tmp/build4637782385548929954.tmp/core.a /tmp/build4637782385548929954.tmp/wiring_analog.c.o avr-ar rcs /tmp/build4637782385548929954.tmp/core.a /tmp/build4637782385548929954.tmp/pins_arduino.c.o avr-ar rcs /tmp/build4637782385548929954.tmp/core.a /tmp/build4637782385548929954.tmp/wiring_shift.c.o avr-ar rcs /tmp/build4637782385548929954.tmp/core.a /tmp/build4637782385548929954.tmp/wiring_digital.c.o avr-ar rcs /tmp/build4637782385548929954.tmp/core.a /tmp/build4637782385548929954.tmp/wiring_pulse.c.o avr-ar rcs /tmp/build4637782385548929954.tmp/core.a /tmp/build4637782385548929954.tmp/WInterrupts.c.o avr-ar rcs /tmp/build4637782385548929954.tmp/core.a /tmp/build4637782385548929954.tmp/HardwareSerial.cpp.o avr-ar rcs /tmp/build4637782385548929954.tmp/core.a /tmp/build4637782385548929954.tmp/Print.cpp.o avr-ar rcs /tmp/build4637782385548929954.tmp/core.a /tmp/build4637782385548929954.tmp/WMath.cpp.o avr-ar rcs /tmp/build4637782385548929954.tmp/core.a /tmp/build4637782385548929954.tmp/main.cpp.o avr-ar rcs /tmp/build4637782385548929954.tmp/core.a /tmp/build4637782385548929954.tmp/Tone.cpp.o avr-g