Welcome! Log In Create A New Profile

Advanced

error compiling firmware in ubuntu 12.04

Posted by dawa 
error compiling firmware in ubuntu 12.04
November 23, 2013 05:08AM
Hello,
I've just built my mendel90, and installed the software for ubuntu 12.04.
I followed the steps in nophead's manual at page 72, Extruder calibration.
I got a coefficient of 0.983. Fine, let's put it in the firmware.
I started arduino, but:
When I choose upload, the source code won't compile.
Here's the error message:

====>
In file included from /usr/lib/gcc/avr/4.5.3/../../../avr/include/util/delay.h:44:0,
from /usr/lib/gcc/avr/4.5.3/../../../avr/include/avr/delay.h:37,
from /usr/share/arduino/hardware/Melzi/cores/arduino/wiring_private.h:30,
from /usr/share/arduino/hardware/Melzi/cores/arduino/WInterrupts.c:34:
/usr/lib/gcc/avr/4.5.3/../../../avr/include/math.h:426:15: error: expected identifier or ‘(’ before ‘double’
/usr/lib/gcc/avr/4.5.3/../../../avr/include/math.h:426:15: error: expected ‘)’ before ‘>=’ token
<===

I run arduino as an ordinary user, and the first time I couldn't set the board type to Melzi, since the files copied from the SD card had the wrong permissions.
I did chown -R david Melzi in the /usr/share/arduino/hardware directory, and then it was possible to choose Melzi from within arduino.
Maybe my error is still related file permissions? (but I ran it aslo as root, and got the same error, so I don't think so)
Or do I have the wrong dependencies?

Some version info:
dpkg -l|grep arduino
ii arduino 1:1.0.5+dfsg2-1 AVR development board IDE and built-in libraries
ii arduino-core 1:1.0.5+dfsg2-1 Code, examples, and libraries for the Arduino platform

Maybe I just miss some C header files?

Another thing I did not really understand about the firmware config:
Where am I supposed to put the Marlin file tree? I guess it doesnt matter as long as arduino finds it and is able to upload it to the machine, right?


BR,
David

Edited 1 time(s). Last edit at 11/23/2013 05:15AM by dawa.
Re: error compiling firmware in ubuntu 12.04
November 23, 2013 05:24PM
The problem is solved!
By googling on the compiler error I found this:
[forum.arduino.cc]

There is an error in a re-definition of round in wiring.h in

/usr/share/arduino/hardware/Melzi/cores/arduino/wiring.h
(as copied from noppheads sd card onto my computer)

Just comment out the definition and it works.
The definition is not needed in gcc-avr >= 1.7.1 , as it seems from the link above.

Any others had this problem?

BR,
David

Edited 1 time(s). Last edit at 11/23/2013 05:27PM by dawa.
Sorry, only registered users may post in this forum.

Click here to login