I am trying to port over the Hardware Serial library that now comes with the Arduino 1.0 IDE. I am compiling on a ATMega2560 processor and testing the Arduino USART library “HardwareSerial” with a simple “Hello World” example, but I am left with this strange sounding error.
It tells me that I am: attempt[ing] to use poisoned "SIG_USART0_RECV"… I have never heard of such an error before. I tried to find out what it was defined to and eclipse gave me this:
#define SIG_USART0_RECV _VECTOR(25) which was found in iomxx0_1.h.
Then from there _VECTOR(n) redirected to __vector_25 via #define _VECTOR(N) __vector_ ## N. But those are in system paths, and I assume they are still valid since the current Arduino libraries still uses them.
Why would they poison their own defines? Do I need to declare something else before I try compiling the project?
Edit:
I found the poison in iomxx0_1.h stating: #pragma GCC poison SIG_USART0_RECV. So why would they poison this?
The SIG_xx interrupt vectors were deprecated several years ago. You can see an updated list at:
AVR-GCC Manual Online-Interrupt Vectors