Good morning everyone i'm posting this here because i can't figure it out on my own. I've been trying to add ISR function in my project but it doesn't compile.
I work on Microship studio on an ATmega328p on a raw c++ project (NO ARDUINO).
I've been trying to add ISR(vect) interruption in my program but i can't manage to compile and i don't anderstand what i'm doing wrong.
In my code i'm using TIMER0_COMPA_vect but it also doesn't work with none of the 25 vectors in iom328p.h nor with _VECTOR(14).
Here's my code :
#include <avr/interrupt.h>
#include <avr/io.h>
#define F_CPU 9999999
static unsigned long long tick = 0;
static void startup(){
TCCR0B = 0x01; // set Prescaller
OCR0A = 200; //Set the flag trig at 200
TIMSK0 = (1<<OCIE0A); //interrupt
}
ISR(TIMER0_COMPA_vect){
;
}
Here is the error :
Error ld returned 1 exit status
Error multiple definition of `TIMER0_COMPA_vect' config.h 23
Error recipe for target 'project.elf' failed