Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Symbol 'DDRB' could not be resolved [ISSUE RESOLVED](Getting editor error with DDRB even though #include<avr/io.h> in source)
Symbol 'DDRB' could not be resolved [ISSUE RESOLVED] [message #1840751] Fri, 23 April 2021 10:12
Peter Charles-Jones is currently offline Peter Charles-JonesFriend
Messages: 11
Registered: April 2021
Junior Member
I am a newbie trying to move from Arduino IDE to Eclipse and have just followed an Instructable called 'How to Get Started With Eclipse and AVR' by a guy called Andy. I got stuck for a while with the editor as it's new to me.

I spent ages worrying about why the DDRB register name for example was throwing an editor error about being unable to resolve the symbol even though I had included io.h which stores all this information.

The issue went away as soon as I saved the project for the first time and this is how I reconcile this.

The #include <avr/io.h> statement tells the compiler how to resolve symbols but I haven't run the compiler yet. The text editor also has no clue what these symbols are. I guess when the project is saved, these is some process of look up which checks contents of avr/io.h.

I just thought I'd post this as it might save time for some other newbie.

Here's the 'blinky' code used to prove the issue and resolution (I'm a newbie so apologies if code posts are not allowed or the format is wrong.)

/*
* main.c
*
* Created on: 22 Apr 2021
* Author: Peter
*/

#include <avr/io.h>

int main ( void ){
while (1) { // endless loop
DDRB |= (1<<3);
}
return 0;
}

I also attached a screen shot where you can just make out the error I'm referring to.
Previous Topic:Migrate RCP from 4.4.2 to 4.16
Next Topic:federal MacOS Catalina: Wont start after upgrade, "An error has occurred."
Goto Forum:
  


Current Time: Sat Apr 20 14:11:11 GMT 2024

Powered by FUDForum. Page generated in 0.09147 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top