Author Topic: "Error: attempt to use poisoned "SIG_ADC"" Help?  (Read 1128 times)

0 Members and 1 Guest are viewing this topic.

Offline jcazzieTopic starter

  • Beginner
  • *
  • Posts: 1
  • Helpful? 0
"Error: attempt to use poisoned "SIG_ADC"" Help?
« on: January 18, 2013, 02:11:54 PM »
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:

SIGNAL(SIG_ADC)
{
        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...

Jcazzie

Offline Billy

  • Full Member
  • ***
  • Posts: 95
  • Helpful? 2
Re: "Error: attempt to use poisoned "SIG_ADC"" Help?
« Reply #1 on: January 18, 2013, 08:29:00 PM »
is attempting to use "poisoned 'SIG_ADC'.
and the "static declaration of 'SIG_ADC' follows non-static declaration."

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.

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,272
  • Helpful? 79
Re: "Error: attempt to use poisoned "SIG_ADC"" Help?
« Reply #2 on: January 19, 2013, 10:05:19 PM »
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.)


 


Get Your Ad Here

data_list