Traumflug/Generation_7_Electronics — Issue #5: Arduino IDE Gen7 round macro vs. math.h compilation issue
Author: RobertFach
Created: 2011-11-14 23:30:31+00:00
State: open

Hi,

after upgrading my system to Ubuntu Ocelot 11.10 I realized that the firmware (Teacup) doesn't compile anymore. The problem shows up as an eventually missleading error...

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 /home/scott/Arduino Sketches/hardware/tiny/cores/tiny/wiring_private.h:32,
from /home/scott/Arduino Sketches/hardware/tiny/cores/tiny/WInterrupts.c:37:
/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

´The problem is due to a redefinition of the round macro in wiring.h. This has been already fixed in latest arduino IDE releases, however, as the Gen7 ships also an arduino IDE support, you need to comment out the round macro found in your hardware/cores / arduino/wiring.h as well.

Further information can be found by searching for the above error message.