V-USB Build Error

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
DevMan

V-USB Build Error

Post by DevMan » Sun Jun 07, 2009 2:02 pm

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.

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

Re: V-USB Build Error

Post by christian » Sun Jun 07, 2009 8:48 pm

You probably don't link the assembler part. This routine is implemented in assembler.

vargata

Re: V-USB Build Error

Post by vargata » Sun Apr 04, 2010 5:07 pm

I have the same problem. How can i link the usbdrvasm.s to AVRStudio ?

maxi
Rank 3
Rank 3
Posts: 122
Joined: Fri Jul 24, 2009 6:13 pm

Re: V-USB Build Error

Post by maxi » Sun Apr 04, 2010 6:02 pm

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.

Alan Chatham
Rank 1
Rank 1
Posts: 28
Joined: Wed Sep 30, 2009 3:36 am
Location: Osaka, Japan
Contact:

Re: V-USB Build Error

Post by Alan Chatham » Mon Apr 05, 2010 1:53 am

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.)

masoud32

Re: V-USB Build Error

Post by masoud32 » Thu Sep 27, 2012 6:08 pm

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);

Post Reply