Automator, WinAVR, AVR Studio ELF Link Error

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

Automator, WinAVR, AVR Studio ELF Link Error

Post by Steve » Sat Sep 01, 2007 4:13 am

1st, thanks for the head start on my HID project.

I am in the initial stages of planning for a custom HID product, and need to complete a "roadmap" document describing the requirements of the project.

One requirement is to estimate how much space we will have once the USB-AVR firmware is loaded. To do this, I downloaded the Automator firmware files and after some work got the source code to compile with WinAVR and AVR Studio.

I could not get an ELF file produced until I commented out two lines in the usbdrv.c file They were lines 229 and 464 in the call to usbCrc16Append().

This should be a screen shot of the AVR Studio output during the error.

Image

I've found the function in usbdrv.h, but can't seem to figure out why the error. I've got the .h file inculded in main.c.

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

Post by christian » Sat Sep 08, 2007 8:34 pm

I guess you compiled the wrong file for the assembler module. Please enter usbdrvasm.S in your project makefile, not one of the specific files. This file contains the usbCrc16Append() function.

If you just want to evaluate the size, download PowerSwitch. If you define the TEST_DRIVER_SIZE macro, it compiles the minimum functional do-nothing USB device with the driver.

leederKrenon
Posts: 1
Joined: Mon Nov 23, 2009 10:34 pm

Re: Automator, WinAVR, AVR Studio ELF Link Error

Post by leederKrenon » Mon Nov 23, 2009 11:09 pm

Apologies in advance if this post is irrelevant or just plain dum:

I also have had to comment out calls to usbCrc16append() in order to get the UsbJoystick library to build.
I have checked (to limit of my ability) that the file usbDrvAsm.S is included in the build.

I am using arduino version 17 running on windows XP.

The UsbJoystick library seems to be a few fixes behind the usbDevice project. I had to make the fixes detailed in this thread before the usbCrc16append() problem became apparant.

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

Re: Automator, WinAVR, AVR Studio ELF Link Error

Post by christian » Tue Nov 24, 2009 12:58 pm

You probably have included assembler parts multiple times or multiple assembler parts. Please see the Makefile provided with our reference projects to see which object files must be linked.

Post Reply