chegewara / EspTinyUSB

ESP32S2 native USB library. Implemented few common classes, like MIDI, CDC, HID or DFU (update).
MIT License
473 stars 70 forks source link

Can't compile, cannot open source file "class/cdc/cdc.h" #149

Closed TinkerPhu closed 8 months ago

TinkerPhu commented 8 months ago

Hi, I am desperately trying to get my old sources to run on a new environment. Don't just roll your eyes, please hear me out.

I have a ESP32S2 board (adafruit qtpy esp32s2) and I spent a year writing arduino code with a little part of esspressif code for ADC. I have now reinstalled PlatformIO and try to even get the most simple example to work. However, I seem to hit a wall: the Arduino object 'Serial' is not defined. As I understand, it should be the USBCDC device. But I haven't managed to get that working either. So now I tried this library (installed via PlatformIO) but that doesn't work either because there is no folder 'class' and the compiler ends with another error.

Any idea, how I can get this library to work?

platformio.ini:

[env:adafruit_qtpy_esp32s2] platform = espressif32 board = adafruit_qtpy_esp32s2 framework = arduino, espidf lib_deps = adafruit/Adafruit NeoPixel@^1.11.0 chegewara/ESP32TinyUSB@^2.0.2

TinkerPhu commented 8 months ago

I finally did find the solution form my issue which I solved without this library.

The solution is written here: https://community.platformio.org/t/how-to-integrate-an-esspressif-library-into-an-arduino-framework-project/32381/2

I assume that this library here is implying that one should also get and combine it with the original code of tinyUSB, https://docs.tinyusb.org/en/stable/index.html. I did not go down that rabbit hole.

It was not clear to me, when adding this library to my PlatformIO with the 'add library' function.