Page 1 of 1

V-USB Build Error

Posted: Sun Jun 07, 2009 2:02 pm
by DevMan
Hello
When i try to build V-USB project in Eclipse AVR i have an error:
i try to compile and build this project that i dont manipulate it after download from obdev.at!
undefined reference to usbCrc16Append(&usbTxBuf[1], len) in line 536 of usbdrv.c file! why this error occurred when i see anything is true!
usbdrv.h is included too.

Re: V-USB Build Error

Posted: Sun Jun 07, 2009 8:48 pm
by christian
You probably don't link the assembler part. This routine is implemented in assembler.

Re: V-USB Build Error

Posted: Sun Apr 04, 2010 5:07 pm
by vargata
I have the same problem. How can i link the usbdrvasm.s to AVRStudio ?

Re: V-USB Build Error

Posted: Sun Apr 04, 2010 6:02 pm
by maxi
vargata wrote:How can i link the usbdrvasm.s to AVRStudio ?

I would recommend you take a look at the AVR-CDC project for a good example of how it should be done. An AVR Studio project .aps is included with the source code.

Re: V-USB Build Error

Posted: Mon Apr 05, 2010 1:53 am
by Alan Chatham
I have the same problem. How can i link the usbdrvasm.s to AVRStudio ?

A big thing I noticed when using AVR Studio is that you might need to change the source code to include the full relative path of the V-USB files, i.e.,

Code: Select all

#include "usbdrv.h" 

should be

Code: Select all

#include "usbdrv/usbdrv.h


Also, in order to have the files complied along with your project, make sure you add usbdrvasm.s into the Source Files folder in the file view in AVR Studio (along with your main, usbdrv.c, etc.)

Re: V-USB Build Error

Posted: Thu Sep 27, 2012 6:08 pm
by masoud32
In Atmel studio 6 i just add usbdrvasm.S to the project, then add a "C" in front of extern in usbdrv.h and that's it.


extern "C" unsigned usbCrc16Append(unsigned data, uchar len);