Hello all,
This is an AVR specific problem. When I write a function for timer2 overflow as follows:
// Timer 2 overflow interrupt service routine interrupt(SIG_OVERFLOW2)//SIG_INTERRUPT0)//SIG_OVERFLOW2) { // Place your code here PORTD ^= _BV(7); }
and make with winavr, I get the following warnings:
E:/AVR/WinAVR/testfiles/isr.c:6: warning: return type defaults to `int' E:/AVR/WinAVR/testfiles/isr.c:6: warning: function declaration isn't a prototype E:/AVR/WinAVR/testfiles/isr.c: In function `interrupt': E:/AVR/WinAVR/testfiles/isr.c:6: warning: type of "__vector_4" defaults to "int" E:/AVR/WinAVR/testfiles/isr.c:9: warning: control reaches end of non-void function
When I check the main.lss file, I notice that the interrupt routine is not correctly placed in the inetrrupt vector, and hence the code doesnt work,
Can someone please tell me that is wrong here? Why cant I point the interrupt vector table towards my desired routine using this syntax and WinAVR?
Thanks in advance
Mak