Go Down

Topic: ATtiny2313 with arduino-tiny core libs 0100-0015: compile errors (Read 1 time) previous topic - next topic

AgeBee

Hi,
I get compile errors when trying to build a simple sketch for the ATtiny2313 with the core libs which I downloaded from here:
http://code.google.com/p/arduino-tiny/downloads/detail?name=arduino-tiny-0100-0015.zip

The error reads:
Code: [Select]
In file included from /usr/lib/gcc/avr/4.7.0/../../../avr/include/util/delay.h:44:0,
                 from /usr/lib/gcc/avr/4.7.0/../../../avr/include/avr/delay.h:37,
                 from /usr/share/arduino/hardware/tiny/cores/tiny/wiring_private.h:32,
                 from /usr/share/arduino/hardware/tiny/cores/tiny/WInterrupts.c:37:
/usr/lib/gcc/avr/4.7.0/../../../avr/include/math.h:427:15: error: expected identifier or '(' before 'double'
/usr/lib/gcc/avr/4.7.0/../../../avr/include/math.h:427:15: error: expected ')' before '>=' token



I followed several suggestions uncommenting the line in math.h (http://code.google.com/p/arduino-tiny/issues/detail?id=29):

Code: [Select]
#define round(x)     ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))

That did not help me either because that produces another error:

/usr/share/arduino/hardware/tiny/cores/tiny/HardwareSerial.cpp:94:15: error: attempt to use poisoned "SIG_USART0_RECV"

I compile against avr 4.7.0 with Arduino 1.0.1 on Ubuntu 12.10.
Maybe it's the gcc-avr version which produces the error ?

Did anybody solve the problem with the above mentioned libs under Arduino 1.0.1 ?

Regards
AgeBee


AgeBee



Does this help...
http://code.google.com/p/arduino/issues/detail?id=955



Thanks for your instant reply.
I already came across this article which suggests downgrading the gcc-avr to 4.3.5.
The strange thing however is that my setup works for all other boards (controllers) like the ATtiny4313, ATtiny44, ATTiny25, ATtiny85 a.s.o.
The only one not working is the ATtiny2313. That prevented me from downgrading very quickly.

Coding Badly


No problem.  I will offer a potential solution but there is a condition.  You have to report back if the solution works (or doesn't).  Agreed?  Excellent, let's get started...

• Locate and open[font=Courier New] HardwareSerial.cpp [/font]in the [font=Courier New]{Sketch}/hardware/tiny/cores/tiny directory/[/font]

• Replace all occurrences of[font=Courier New] SIGNAL [/font]with[font=Courier New] ISR[/font]

• Save and close[font=Courier New] HardwareSerial.cpp[/font]

• Try to compile

AgeBee



No problem.  I will offer a potential solution but there is a condition.  You have to report back if the solution works (or doesn't).  Agreed?  Excellent, let's get started...

• Locate and open[font=Courier New] HardwareSerial.cpp [/font]in the [font=Courier New]{Sketch}/hardware/tiny/cores/tiny directory/[/font]

• Replace all occurrences of[font=Courier New] SIGNAL [/font]with[font=Courier New] ISR[/font]

• Save and close[font=Courier New] HardwareSerial.cpp[/font]

• Try to compile



Thanks a bunch for your quick help. Sure I will and I did as you wanted but without success:

Code: [Select]
/usr/share/arduino/hardware/tiny/cores/tiny/HardwareSerial.cpp:94:15: error: attempt to use poisoned "SIG_USART0_RECV"

In HardwareSerial.cpp line 94 reads this:
Code: [Select]
#elif defined(SIG_USART0_RECV) && defined(UDR0)

Go Up