Arduino-USBMIDI icon indicating copy to clipboard operation
Arduino-USBMIDI copied to clipboard

PluggableUSB.h

Open marchingband opened this issue 3 years ago • 15 comments

I am getting an error that I cannot resolve.

/Users/temporary/Documents/Arduino/libraries/USBMIDI/src/usbmidi_pluggableusb.cpp:13:10: fatal error: PluggableUSB.h: No such file or directory
 #include <PluggableUSB.h>

I see other posts online about this issue, but nothing that has helped me, are you able to offer some clarity or a fix or workaround? Thank you!

marchingband avatar Aug 16 '22 19:08 marchingband

What is your hardware?

lathoub avatar Aug 16 '22 20:08 lathoub

Seeed XIAO SAMD21

marchingband avatar Aug 16 '22 20:08 marchingband

I believe PluggableUSB.h is part of the standard Arduino stack when selecting SAMD based boards. Can you compile examples from the MIDIUSB dependancy library?

lathoub avatar Aug 16 '22 20:08 lathoub

No, I get the same error compiling usbMidiLoopback. Infact in the examples drop-down, USBMIDI examples are placed in the INCOMPATIBLE sub-menu. XIAO has it's own board file. https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json

marchingband avatar Aug 16 '22 20:08 marchingband

That explains the error, board not compatible :-(

lathoub avatar Aug 16 '22 20:08 lathoub

Does it come with its own usb lib?

lathoub avatar Aug 16 '22 20:08 lathoub

It's strange, because I have been compiling the same program for over a year, with no errors, it only appeared recently. I updated your library, got the error, went back to the old version I was using before (v1.0.1), but still get the error now. XIAO doesn't come with its own USB lib that I know of, you have 2 options "Arduino" or "TinyUSB" under tools->USBStack.

marchingband avatar Aug 16 '22 20:08 marchingband

Would you be interested in supporting the XIAO? It's one of the only ways to get a SAMD21 with the chip shortage.

marchingband avatar Aug 16 '22 21:08 marchingband

I installed Adafruit SAMD boards, and selected trinket_m0. I get the same error, and USBMIDI is still listed as INCOMPATIBLE. Any idea what could be going on here? Is this something about my personal installation perhaps?

marchingband avatar Aug 16 '22 22:08 marchingband

I also get the error when using Arduino zero.

/Arduino/libraries/USBMIDI/src/usbmidi_pluggableusb.cpp:15:10: fatal error: PluggableUSB.h: No such file or directory
 #include <PluggableUSB.h>

marchingband avatar Aug 16 '22 22:08 marchingband

you code does

#include <PluggableUSB.h>

other libs do something like

#if defined(ARDUINO_ARCH_AVR)
#include "PluggableUSB.h"
#elif defined(ARDUINO_ARCH_SAM)
#include "USB/PluggableUSB.h"

marchingband avatar Aug 17 '22 00:08 marchingband

I also get the error when using Arduino zero.

Not here (using Arduino SAMD Boards) and Arduino IDE 1.8.19. Maybe it is your local installation that got corrupted?

your code does

Not this lib directly, the underlying MIDIUSB.h lib does - and it does make the difference between AVR and SAM code. See here:

https://github.com/arduino-libraries/MIDIUSB/blob/578f9f535e37cf8f557bddc1d6f85540b42cfba8/src/MIDIUSB.h#L23-L35

lathoub avatar Aug 17 '22 06:08 lathoub

That's strange because MIDIUSB does compile for me. For XIAO and other boards. If your library is built on top of that, I am very confused indeed. I have 3 machines with fresh installs of Arduino and these libs, all report the error. 2 are OSX one is PC.

Do you have any tips how I could proceed? I use your lib in an open source project that has a few users. One user reported the problem, and after updating I have it as well.

marchingband avatar Aug 17 '22 06:08 marchingband

I realize before you asked me to compile the MIDIUSB examples. I misread that as USBMIDI. MIDIUSB is compatible, USBMIDI is not.

marchingband avatar Aug 17 '22 06:08 marchingband

OMG I have the wrong repo I am so so so sorry, I thought this was for USBMIDI, but its USB-MIDI. As you were.

marchingband avatar Aug 17 '22 16:08 marchingband