[En-Nut-Discussion] using Timer1 16bit interrupt

Damian Slee damian at commtech.com.au
Fri Aug 1 10:48:28 CEST 2003


Hi,
I'm trying to make use of the Timer1 interrupt.  I don't think is being used by NutOS.

I am working with the HTTPD sample, which is working.

When I add a call to NutRegisterInterrupt(), I get linker errors for multiple define interrupt vectors.  It appears that the libnutdev.a includes ivect*.c, but also irqreg.c, where NutRegisterInterrupt() exists.   Both have SIGNAL() handlers.

Is there anyway of making it use one or the other? without rebuilding the library without ivect*.c?

--------------
#include <dev\irqreg.h>
...
{
	NutRegisterInterrupt(IRQ_TIMER1_OVF, MyTimer1_Interrupt, NULL);
}
--------------------

makefile
...
LIBS =  $(LIBDIR)/nutinit.o -lnutpro -lnutfs -lnutos -lnutdev -lnutnet -lnutcrt
...

-------------
avr-gcc -c -mmcu=atmega128 -Os -Wall -Wstrict-prototypes -Wa,-ahlms=httpserv.lst
  -I../../mod/include -I../../include httpserv.c -o httpserv.o
avr-gcc httpserv.o urom.o -mmcu=atmega128 -Wl,--defsym=main=0,-Map=httpserv.map,
--cref -L../../lib/gcc/atmega128  ../../lib/gcc/atmega128/nutinit.o -lnutpro -ln
utfs -lnutos -lnutdev -lnutnet -lnutcrt -o httpserv.elf
../../lib/gcc/atmega128\libnutdev.a(ivect16.o): In function `__vector_16':
ivect16.o(.text+0x0): multiple definition of `__vector_16'
../../lib/gcc/atmega128\libnutdev.a(irqreg.o)(.text+0x474): first defined here
../../lib/gcc/atmega128\libnutdev.a(ivect06.o): In function `__vector_6':
ivect06.o(.text+0x0): multiple definition of `__vector_6'
../../lib/gcc/atmega128\libnutdev.a(irqreg.o)(.text+0x17c): first defined here
../../lib/gcc/atmega128\libnutdev.a(ivect18.o): In function `__vector_20':
ivect18.o(.text+0x0): multiple definition of `__vector_20'
../../lib/gcc/atmega128\libnutdev.a(irqreg.o)(.text+0x50c): first defined here
../../lib/gcc/atmega128\libnutdev.a(ivect20.o): In function `__vector_18':
ivect20.o(.text+0x0): multiple definition of `__vector_18'
../../lib/gcc/atmega128\libnutdev.a(irqreg.o)(.text+0x5a4): first defined here
../../lib/gcc/atmega128\libnutdev.a(ivect30.o): In function `__vector_30':
ivect30.o(.text+0x0): multiple definition of `__vector_30'
../../lib/gcc/atmega128\libnutdev.a(irqreg.o)(.text+0x89c): first defined here
../../lib/gcc/atmega128\libnutdev.a(ivect32.o): In function `__vector_32':
ivect32.o(.text+0x0): multiple definition of `__vector_32'
../../lib/gcc/atmega128\libnutdev.a(irqreg.o)(.text+0x934): first defined here
make.exe: *** [httpserv.elf] Error 1



More information about the En-Nut-Discussion mailing list