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).
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.
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
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?