avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] tmr.h:15: error: `__vector_4' undeclared here (not in a


From: Günter Dannoritzer
Subject: [avr-gcc-list] tmr.h:15: error: `__vector_4' undeclared here (not in a function)
Date: Mon, 23 Aug 2004 15:29:44 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.1) Gecko/20040707

Hello,

I am a total newbie to AVR programming and try to change a project previously developed with a third party C compiler to be used with AVR-GCC.

Now, don't beat me ;-), but I installed the AVR-GCC provided by Atmel. Is that a big mistake or is this installation setup right to work? I thought having this DWARF debugging capability might be a nice feature, but maybe I overestimated it and should rather use the WINAVR installation?

Anyhow, I did some changes to the code of my project, mostly include paths. That took away most of the compile errors except for this one error:

tmr.h:15: error: `__vector_4' undeclared here (not in a function)

which has to do with the interrupt vector. I tried to find some more information about how the interrupt handling works, but had no luck getting rid of this error. I read through the AVR libc documentation concerning the INTERRUPT macro and it looks like it is used correct in my code.

My code line (line 15 of the tmr.h file) causing the error is this:

INTERRUPT [SIG_OUTPUT_COMPARE1A] void TmrTenMillisecondTick(void);

The INTERRUPT macro is defined in the sfr_defs.h file, which obviously is include, otherwise it would not replace the "INTERRUPT" macro with the "__vector_" define.

What I don't understand is, it looks like that the avr-gcc needs to know about this __vector_ which it seems like it does not. I searched through the archive but did not find any similar problems.

Can anybody give me some hints what I am doing wrong?

This is the compiler call and its output:


avr-gcc -Wall -gdwarf-2 -mmcu=at90s8515 -DAVR_GCC -ffreestanding -I../CommonSource/ -I/cygdrive/c/Programme/Atmel/AVR\ Tools/AvrGcc/avr/include/ -c -omain.o main.c
In file included from main.c:16:
tmr.h:15: error: `__vector_4' undeclared here (not in a function)
tmr.h:15: error: syntax error before "void"
main.c: In function `main':
main.c:24: warning: unused variable `quadData'
main.c:25: warning: unused variable `i'
main.c:25: warning: unused variable `j'
make: *** [main.o] Error 1

BTW, I added the path to the AVR-GCC tools to the PATH variable and I am using cygwin under Windows XP.

Thanks for the help.


Guenter




reply via email to

[Prev in Thread] Current Thread [Next in Thread]