I hope I'm posting this in the proper place.
I recently got an arduino uno (atmega328p) 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
I read on another forum that maybe the build arguments were incorrect. The common issue was that the MCU was not defined so when you included <avr/io.h>, it didn't know which specific io____.h version to load (ex: iom328p.h, the one I'm using). But I'm sure mine is proper. I've pasted it below.
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 even another post that said to #include iom328p.h directly into the file where I was accessing the timer registers. When I did that, the compiler gave an error with the following:
error: #error "Attempt to include more than one <avr/ioXXX.h> file."
which made total sense because I was already including with <avr/io.h> in a different 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. It includes <avr/io.h>.
Does anyone have an idea what might be going on? Thanks in advance.