Pages: [1]   Go Down
Author Topic: vusb and linked assembly problem  (Read 906 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm trying to get the vusb (http://code.google.com/p/vusb-for-arduino/) code (the UsbKeyboard branch) installed and working on Arduino-22 and I need some help understanding how Arduino handles linked .S (assembly) files.

What is the correct way to link a .S file to a project?  I have gone through the Sketch > Add file... dialog which appears to work -- the selected file (usbdrvasm.S) is now in the data/ subdirectory of my sketch.  But when I try to compile I get the error

Code:
undefined reference to `usbCrc16Append'

This function is defined in usbdrvasm.S and (I believe properly) prototyped in another header file:
Code:
#ifdef __cplusplus
extern "C"{
#endif
extern unsigned usbCrc16Append(unsigned data, uchar len);
#ifdef __cplusplus
} // extern "C"
#endif

Is this error a sign of the assembly not being properly linked?  Of the prototype in the header not working properly?  Some other toolchain error?
Logged

Pages: [1]   Go Up
Jump to: