can't compile the driver

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
thelorax
Posts: 3
Joined: Thu Mar 12, 2009 6:07 am

can't compile the driver

Post by thelorax » Thu Mar 12, 2009 6:31 am

Hello,
this is my first time playing around with avrusb.

I'm trying to compile my project with it. Here is the output from a makefile:
(it's called usbrobot, but I'm not really making a robot)

chris@Tool ~/Projects/avr/m168usb $ make usb
avr-gcc -Wall -Os -DF_CPU=20000000 -Iusbdrv -I. -DDEBUG_LEVEL=0 -mmcu=atmega168 -c usbdrv/usbdrv.c -o usbdrv/usbdrv.o
avr-gcc -Wall -Os -DF_CPU=20000000 -Iusbdrv -I. -DDEBUG_LEVEL=0 -mmcu=atmega168 -x assembler-with-cpp -c usbdrv/usbdrvasm.S -o usbdrv/usbdrvams.o
avr-gcc -Wall -Os -DF_CPU=20000000 -Iusbdrv -I. -DDEBUG_LEVEL=0 -mmcu=atmega168 -c usbdrv/oddebug.c -o usbdrv/oddebug.o
chris@Tool ~/Projects/avr/m168usb $ make
avr-gcc -I. -I/usr/avr/include -mmcu=atmega168 -Os -fpack-struct -fshort-enums -funsigned-bitfields -funsigned-char -Wall -Wstrict-prototypes -Wa,-ahlms=main.lst -c main.c -o main.o
main.c:4: warning: function declaration isn't a prototype
avr-gcc -Wl,-Map,usbrobot.out.map -mmcu=atmega168 -lm -o usbrobot.out main.o usbdrv/usbdrv.o usbdrv/usbdrvams.o usbdrv/oddebug.o
usbdrv/usbdrv.o: In function `usbPoll':
usbdrv.c:(.text+0x56): undefined reference to `usbFunctionSetup'
make: *** [usbrobot.out] Error 1

chris@Tool ~/Projects/avr/m168usb $

I know it's probly something stoopid, but I've greped the files and can't even find usbFunctionSetup inside usbPoll...

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Re: can't compile the driver

Post by christian » Sat Apr 11, 2009 7:02 pm

You should implement usbFunctionSetup() in your code. See the examples which ship with avr-usb...

Post Reply