PlatformIO Community

Building VUSB library

Hello, I recently tried to build port (tried few diffrent libraries) of VUSB library for Arduino and I didn’t succed. I just get output like this. Any ideas what may cause this?

scons: *** Multiple ways to build the same target were specified for: D:\Me\IO\MIDI - singleuc\.pioenvs\uno\UsbKeyboard\usbdrvasm.o (from ['D:\\MeI\\IO\\MIDI - singleuc\\.pioenvs\\uno\\UsbKeyboard\\usbdrvasm.S'] and from ['D:\\Me\\IO\\MIDI - singleuc\\.pioenvs\\uno\\UsbKeyboard\\usbdrvasm.asm'])File "C:\users\Me\.atom\packages\platformio-ide\penv\lib\site-packages\platformio\builder\tools\platformio.py", line 253, in BuildLibrary

Hi @LocoMatt. Could you try to delete file usbdrvasm.asm?

Nothing good happend I guess http://pastebin.com/q9VFxdeq

1 Like

I got another errors:
Linking .pioenvs\uno\firmware.elf
.pioenvs\uno\src\main.o: In function HardwareSerial::begin(unsigned long)': C:\Users\user\.platformio\packages\framework-arduinoavr\cores\arduino/HardwareSerial.h:121: undefined reference tousbInit()'
collect2.exe: error: ld returned 1 exit status
*** [.pioenvs\uno\firmware.elf] Error 1

I have usbdrv folder in /src near main.cpp

  • #define USB_PUBLIC static in usbconfig.h

Whis is another project using v-usb, without platformio http://wiki.amperka.ru/projects:keylogger
Maybe it can help.
Also this platformio lib using v-usb: https://libraries.io/platformio/Pro%20Trinket%20USB%20Keyboard%20Library

I had the same error Multiple ways to build the same target when trying to compile the EasyLogger example from https://www.obdev.at/products/vusb/easylogger.html .
I got it working by copying the contents of the file usbdrvasm.S into the file usbdrvasm.asm which is just a stub and only contains the line:
#include “usbdrvasm.S”
and an ‘end’ . Remove these lines (the #include… and the ‘end’) and paste the whole contents of the file usbdrvasm.S here. Save the usbdrvasm.asm file and remove the file usbdrvasm.S completely.
Hope this helps anyone with the same problem.

EDIT: The above was on a Windows installation. At home with Linux it is the other way round… Just remove the usbdrvasm.asm file and keep the usbdrvasm.S (without any changes).