EspTinyUSB
EspTinyUSB copied to clipboard
hal/usb_hal.h missing in Arduino
For both ESP32S3 andESP32S2, on both MacOS and Windows, I am missing usb_hal.h Boards are up to date with esp32 boards v. 3.0.1
This is the only library where I get this compilation error, but I have no idea whether it's a dependency on another library, or a file I'm supposed to find somewhere else.
/Arduino/libraries/ESP32TinyUSB/src/esptinyusb.cpp:3:10: fatal error: hal/usb_hal.h: No such file or directory 3 | #include "hal/usb_hal.h" | ^~~~~~~~~~~~~~~ compilation terminated. exit status 1
Hi, probably my library is not compatible with arduino-esp32 v3.x. Im guessing that this header file change name in esp-idf 5.x.
Hi, Will you update your library for esp32 v3 ? It could help me. Thanks.
Not in the near future, sorry.
hi, i got the same error in that new library https://github.com/chegewara/esp32-usb-v2/issues/12
Hi, has anyone solved this issue yet? I really need a solution.
No, I always use the ESP32 lib in 2.0.17
Ran into the same issue. Anyone knows a solution?
The following settings work for me with pio:
board = esp32-s2-saola-1
framework = arduino
platform = [email protected]
board_build.mcu = esp32s2
[email protected] and newer are not working.
The best thing for me now is to switch to TinyUSB. I couldn't use it in my old code because it wasn't available yet. But now it is available.
[env:esp32-s2-saola-1]
board = esp32-s2-saola-1
framework = arduino
board_build.arduino.usb = native
platform = [email protected]
board_build.mcu = esp32s2
#include "USB.h"
#include "USBCDC.h"
USBCDC USBSerial;
void setup() {
USB.begin();
USBSerial.begin();
while (!USBSerial) delay(100);
USBSerial.println("Native USB Serial");
}
void loop() {
USBSerial.println("Ping!");
delay(1000);
}
Thanks @Steffen-W for all info.