Software > Software

"Error: attempt to use poisoned "SIG_ADC"" Help?


Hello, everyone!
I'm fairly new to robotics and have been trying to create a robotic arm using the Axon microcontroller and modified source code.

The problem is, however, that when I attempt to compile and build my code, I get the same error repeatedly saying the line:

        a2dCompleteFlag = true;

is attempting to use "poisoned 'SIG_ADC'.
and the "static declaration of 'SIG_ADC' follows non-static declaration."

I'm sorry if this is a waste of anyone's time as I'm quite new, but I can't find any relevant solutions elsewhere on the internet.

Thank you so much for any help you can give me, I need to have this sorted out by tonight...



--- Quote from: jcazzie on January 18, 2013, 02:11:54 PM ---is attempting to use "poisoned 'SIG_ADC'.
and the "static declaration of 'SIG_ADC' follows non-static declaration."

--- End quote ---

I can't help with the "poisoned" term as that seems to be a compiler I am not familiar with.
The 2nd one though is easy.  It is saying that the variable SIG_ADC has been declared twice. Given that it is declared in a different manner (static, and not static) it is likely intended to actually be two different variables.  Find the two declarations and see if it really refers to the same intended variable. If not intentionally the same intended variable, change the name of one of them. If it is intended to be the same, then delete the declaration that is not static, assuming that the static flag is the only difference in the declarations.

The AVR libc used with AVR GCC updated the way it declares interrupt vectors. They are no longer signals, they are vectors, and you should use the new ISR() syntax to declare them. This happened several years ago, but lots of old code is still out there, because many developers are reluctant to actually update their tools and libraries. Also, the web never forgets :-)

To make sure that all old code is updated, the GCC-specific feature of "poisoning" a symbol was used with the old symbols, so any attempt to use those symbols will give that error.

You need to update the code that uses the old symbols to use it with modern versions of avr-gcc and avr-libc (which is also what the Arduino IDE uses.)


[0] Message Index

Go to full version