VS Arduino
>> >> "Error:identifier "X" is undefined" for all the arduino functions
https://www.visualmicro.com/forums/YaBB.pl?num=1435268355

Message started by Ward on Jun 25th, 2015 at 9:39pm

Title: "Error:identifier "X" is undefined" for all the arduino functions
Post by Ward on Jun 25th, 2015 at 9:39pm
Hello,
All the functions from arduino show up as errors.
Most of them say "identifier "Serial/PinMode/.." is undefined
Some such as attachInterupt show up with the error "expression preceding parentheses of apparent call must have (pointer-to-) function type"

The sketch compiles and gets uploaded fine, but the errors really distract me when I'm trying to solve other problems.
How can I solve the problem?

Thanks :)

Title: Re: "Error:identifier "X" is undefined" for all the arduino functions
Post by Visual Micro on Jun 25th, 2015 at 10:03pm
Hi,

Few questions:-

Which board do you have selected?
Which arduino ide version?
Which visual micro application do you have selected in the tool bar (Arduino 1.6)?

If you switch to a different board and then re-select your current board does the issue go away?

Thanks


Title: Re: "Error:identifier "X" is undefined" for all the arduino functions
Post by Ward on Jun 25th, 2015 at 10:36pm
Hello,
I was using Arduino 1.6.1, with nano.
Switching boards didn't solve it, so I changed the version to 1.0.5 and the problem was solved.
After that I removed 1.6.1 and updated to 1.6.3.
The errors are gone now.

Thank you for your time! (I should have known I had to try this first, but I'm glad it's solved now :))


Title: Re: "Error:identifier "X" is undefined" for all the arduino functions
Post by Visual Micro on Jun 26th, 2015 at 11:40am
Thanks for the update. I think there is a bug for 1.6.1 which we will fix however it is good that you have updated to 1.6.2+

Title: Re: "Error:identifier "X" is undefined" for all the arduino functions
Post by ttestestt on Feb 17th, 2016 at 10:41am
I have some similar errors (compiling just fine) using timer interrupt code for arduino due ide 1.6.7.

void setup {
    pmc_enable_periph_clk(ID_TC8);
    TC_Configure(TC2, channel, TC_CMR_WAVE | TC_CMR_WAVSEL_UP_RC | TC_CMR_TCCLKS_TIMER_CLOCK4);
    TC_SetRC(TC2, channel, timexyz);
    TC_Start(TC2, channel);
    TC2->TC_CHANNEL[channel].TC_IER = TC_IER_CPCS;
    TC2->TC_CHANNEL[channel].TC_IDR = ~TC_IER_CPCS;
NVIC_EnableIRQ(TC8_IRQn);
}

[...]

void TC5_Handler() {
    TC_GetStatus(TC1, 2);
    check_buttons();
}

VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.