EICRA interrupt register error

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

I am programming an ATMega328P on eclipse IDE. I tried the below program and for some reason, it says EICRA and EIMSK registers are not found. Anybody has an idea of what might have gone wrong with eclipse?

WinAVR 20100110 is installed and all other programs seem to be working fine.

 

#include <avr/io.h>
#include <avr/interrupt.h>

int main(void)
{
    DDRD &= ~(1 << DDD2);     // set as input
    PORTD |= (1 << PORTD2);    // turn On the Pull-up

    EICRA |= (1 << ISC00);    // set INT0
    EIMSK |= (1 << INT0);     // Turn on INT0
    sei();                    // turn on interrupts

    while(1)
    {
        /*main program loop here */
    }
}

ISR (INT0_vect)
{
    /* interrupt code here */
}

Also attached a screenshot of eclipse IDE throwing an error.

 

-Praveen

Attachment(s): 

Robot building is all about sharing & learning
-----------------------------------
www.robotplatform.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The obvious first thing is to ask whether you are building for the correct AVR model.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A Google search for "symbol could not be resolved" seems to find useful hits, including http://stackoverflow.com/questio...

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The obvious first thing is to ask whether you are building for the correct AVR model.

 

Yes. The correct AVR model is selected. Going through the link you sent...

Robot building is all about sharing & learning
-----------------------------------
www.robotplatform.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks a lot for the links. First link led to the second and it says the issue is with rebuild->index. Tried this and it worked.

Robot building is all about sharing & learning
-----------------------------------
www.robotplatform.com