I'm using an Atmega328p and coding from Eclipse with the AVR plugin.
I tried to edit the TIMSK1 register, only for Eclipse to throw an error saying "Symbol 'TIMSK1' could not be resolved". I could access the other registers just fine.
Pressing F3 on the registers that work, I noticed that io.h was importing iom16.h instead of iom328p.h.
I tried adding the code:
before including io.h.
io.h now highlights the correct MCU:
but when I press F3 on the registers from earlier they still lead to iom16.h. TIMSK1 still can't be detected.
I then tried to build the project through Eclipse. The compiler has the argument:
I guess it must have to do with the project's settings, even though I made sure to set the correct MCU when creating the project.
Any ideas how to fix this? Thanks