Pages: [1]   Go Down
Author Topic: Cannot Access Timer Registers  (Read 403 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

So I've had a little bit of experience with timers 0, 1 and 2 when I connected an atmega32 directly to a breadboard and used avrstudio to do my programming.

I recently got an arduino to prototype an idea of mine. I require the use of the all of the timers in my implementation. I'm using eclipse as my developing environment. When I try to compile my project, I recieve the following errors (there are many more, this is just a sample).

Code:
Symbol 'COM1A1' could not be resolved NewGraphics.cpp /NewGraphics line 44 Semantic Error
Symbol 'COM2B1' could not be resolved NewGraphics.cpp /NewGraphics line 24 Semantic Error
Symbol 'CS10' could not be resolved NewGraphics.cpp /NewGraphics line 55 Semantic Error

A post online said that it could be due to the fact that I was not specifying the correct MCU in the make file. Here is the arguments to the compiler.

Code:
avr-g++ -I"C:\Users\P\Desktop\arduino-1.0.1\hardware\arduino\cores\arduino" -I"C:\Users\P\Desktop\arduino-1.0.1\hardware\arduino\variants\standard" -I"C:\Users\P\workspace\NewGraphics" -I"C:\Users\P\Desktop\arduino-1.0.1\libraries\ST7565LCD" -D__IN_ECLIPSE__=1 -DUSB_VID= -DUSB_PID= -DARDUINO=101 -Wall -Os -ffunction-sections -fdata-sections -fno-exceptions -g -mmcu=atmega328p -DF_CPU=16000000UL

I found on another post here that recommended including the io file for the at328p directly. I tried that, but I get a
Code:
error: #error "Attempt to include more than one <avr/ioXXX.h> file."

When I get rid of the function with all of the timer register sets and clears, then it compiles just fine. I do have "Arduino.h" included in this file.

I'm completely lost. What am I doing wrong?
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 654
Posts: 50936
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'm completely lost. What am I doing wrong?
The most obvious question is what happens when you use the supported method of compiling and linking and uploading your code - the IDE?
Logged

Pages: [1]   Go Up
Jump to: