# AVR compile error - poisoned signal

I have this code from 2002. I had to update the macros but I still get 'poisoned' error messages from the compiler (AVR Cross Compile, MAC OS X) in Eclipse:

Description Resource    Path    Location    Type
attempt to use poisoned "SIG_2WIRE_SERIAL"  test        line 533, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h C/C++ Problem
attempt to use poisoned "SIG_ADC"   test        line 470, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h C/C++ Problem
attempt to use poisoned "SIG_COMPARATOR"    test        line 480, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h C/C++ Problem
attempt to use poisoned "SIG_EEPROM_READY"  test        line 475, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h C/C++ Problem
attempt to use poisoned "SIG_INPUT_CAPTURE1"    test        line 417, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h C/C++ Problem
attempt to use poisoned "SIG_INTERRUPT0"    test        line 367, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h C/C++ Problem
attempt to use poisoned "SIG_INTERRUPT1"    test        line 372, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h C/C++ Problem
attempt to use poisoned "SIG_INTERRUPT2"    test        line 377, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h C/C++ Problem
attempt to use poisoned "SIG_OUTPUT_COMPARE0"   test        line 437, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h C/C++ Problem
attempt to use poisoned "SIG_OUTPUT_COMPARE1A"  test        line 422, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h C/C++ Problem
attempt to use poisoned "SIG_OUTPUT_COMPARE1B"  test        line 427, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h C/C++ Problem
attempt to use poisoned "SIG_OUTPUT_COMPARE2"   test        line 407, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h
attempt to use poisoned "SIG_OVERFLOW0" test        line 442, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h
attempt to use poisoned "SIG_OVERFLOW1" test        line 432, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h
attempt to use poisoned "SIG_OVERFLOW2" test        line 412, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h
attempt to use poisoned "SIG_SPI"   test        line 447, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h
attempt to use poisoned "SIG_SPM_READY" test        line 539, external location: /usr/local/CrossPack-AVR-20131216/avr/include/avr/iom128.h


Here's the full code (Atmel128):

http://pastebin.com/uAnb2R0v

As far as I know, the SIG_ prefix means these are interrupt vectors. While there aren't interrupts in the code, it still complains. Any idea what am I doing wrong?

• Do you know what the error message means?
– pipe
Mar 13 '17 at 16:44
• Yes, it has to do with old, deprecated way of using interrupts. The code does not use any interrupts, hence my confusion. Mar 13 '17 at 16:58
• It is much easier to just redefine them to their equivalents in the new compiler. Mar 13 '17 at 17:20
• But there aren't interrupts in the code. Mar 13 '17 at 17:26
• What command are you using to compile? are the any other source files or .o files lying around? Mar 13 '17 at 17:44

I'm not sure what command you are using to compile, but I can't replicate the poisoned signal errors.

However in order to get it to compile with avr-gcc, the following changes have to be made:

1. Replace the 8 occurrences of __elpm_inline with pgm_read_byte_far. Alternatively you could add #define __elpm_inline(x) pgm_read_byte_far(x) to the top of the code, though that is ugly.

2. Replace your weird use of the address macros as functions. For example you do DDRA(0<<DDA3). That should instead be DDRA &= ~(1<<DDA3) and so forth.

3. Remove the #include <avr/iom128.h> statement. Though that doesn't stop it compiling, it shouldn't be there.

After that it compiles fine using avr-gcc with flags of -mmcu=atmega128 and -DF_CPU=....

I have gotten that before with old code. You are using old deprecated name for the interrupt signal for example the one for the ADC has changed to ADC_vect. Look where the old SIG_ names are define and you'll find the updated names for the interrupt vector names in that .h file

• Thank you for your reply. Unfortunately the code does not use any interrupts. In fact, the offending lines are array data stored in the ROM. Mysterious! Mar 13 '17 at 16:58