ricovangenugten/Arduino-Blink-Eclipse-Project — Issue #2: compiling ArduinoCore: error with crosspack avr 20120217
Author: arneboon
Created: 2012-03-06 19:06:04+00:00
State: open

Hi Rico,

Thanks for your excellent tutorial on getting arduino running in eclipse, great!

I followed all the steps carefully up to loading the MCU type, when i try to build it all there is a nasty error popping up.

My system: mac osx lion 10.7.2, eclipse 20120216-1857, arduino mega2560 16AU 1121, crosspack avr 20120217

This is what the console puts out:

//---------------------------

**** Clean-only build of configuration Release for project ArduinoCore ****

make clean
rm -rf ./HardwareSerial.o ./Print.o ./Tone.o ./WInterrupts.o ./WMath.o ./WString.o ./pins_arduino.o ./wiring.o ./wiring_analog.o ./wiring_digital.o ./wiring_pulse.o ./wiring_shift.o ./WInterrupts.d ./pins_arduino.d ./wiring.d ./wiring_analog.d ./wiring_digital.d ./wiring_pulse.d ./wiring_shift.d ./HardwareSerial.d ./Print.d ./Tone.d ./WMath.d ./WString.d libArduinoCore.a

**** Build of configuration Release for project ArduinoCore ****

make all
Building file: ../HardwareSerial.cpp
Invoking: AVR C++ Compiler
In file included from /usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/../../../../avr/include/util/delay.h:44:0,
from /usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/../../../../avr/include/avr/delay.h:37,
from ../wiring_private.h:30,
from ../HardwareSerial.cpp:28:
/usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/../../../../avr/include/math.h:426:15: error: expected unqualified-id before 'double'
/usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/../../../../avr/include/math.h:426:15: error: expected ')' before 'double'
/usr/local/CrossPack-AVR-20120217/lib/gcc/avr/4.5.1/../../../../avr/include/math.h:426:15: error: expected ')' before 'double'
make: *** [HardwareSerial.o] Error 1

//---------------------------

i reached this after commenting out some lines in HardwareSerial.cpp: 92, 145, 155, 165 to kill some errors

it seems there is some issue with the crosspack avr from 20120217.

so i tried to get it done with the crosspack avr from 2010 and after that i tried the 2009 version.
these give errors with HardwareSerial.h too, listed below:

>>> 2010:
**** Build of configuration Release for project ArduinoCore ****

make all
Building file: ../HardwareSerial.cpp
Invoking: AVR C++ Compiler
make: *** [HardwareSerial.o] Broken pipe: 13
make: *** Deleting file `HardwareSerial.o'

>>> 2009:
make all
Building file: ../HardwareSerial.cpp
Invoking: AVR C++ Compiler
unknown MCU `atmega2560' specified
Known MCU names:
..

../HardwareSerial.cpp:1: error: MCU `atmega2560' supported for assembler only

Would you have any idea to fix this?? I have the feeling to be super close to get it done but just this last step is very frustrating. ;)

Hoping for your reply,

Thanks and regards,

Arne.