Skip to content

TinyUSB stack fails to come up on ESP32-S3 device #106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
i-am-shodan opened this issue Jan 14, 2025 · 4 comments
Closed

TinyUSB stack fails to come up on ESP32-S3 device #106

i-am-shodan opened this issue Jan 14, 2025 · 4 comments
Labels
Arduino / IDF issue not an issue from pioarduino

Comments

@i-am-shodan
Copy link

When using platform = https://github.com/platformio/platform-espressif32.git I am able to use TinyUSB to create a USB serial device that appears on Windows. When I change my platform to use pioarduino platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip the USB stack doesn't come up. There is no error in Windows device manager.

Here is a very simple test case to reproduce. I'm using a LilyGo Dongle S3 which uses an ESP32-S3.

main.cpp

#include <Arduino.h>
#include <Adafruit_TinyUSB.h>

void setup() {
  TinyUSBDevice.begin(0);
  Serial.begin(115200);
}

void loop() {
  Serial.println("Loop!");
  Serial.flush();
  delay(1000);
}

platformio.ini

[env:esp-32-s3]
#platform = https://github.com/platformio/platform-espressif32.git # works
platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip # does not work
board = esp32-s3-devkitc-1
framework = arduino
monitor_filters = esp32_exception_decoder
monitor_speed = 115200
build_unflags = 
	-DARDUINO_USB_MODE=1
build_flags = 
	-std=gnu++2a
	-DARDUINO_USB_MODE=0
	-DARDUINO_USB_CDC_ON_BOOT=1
	-Wl,-z,muldefs
	-D CFG_TUD_ENABLED
lib_deps = 
	adafruit/Adafruit TinyUSB Library@3.3.4
@TD-er
Copy link

TD-er commented Jan 14, 2025

Probably related: espressif/arduino-esp32#10836

I always use USB HWCDC except for the ESP32-S2.
TinyUSB isn't working very well. If you only need to add some serial port, then please use HWCDC where possible.

By the way, this is very likely not a pioarduino issue, but should be dealt with here: https://github.com/espressif/arduino-esp32/issues

@i-am-shodan
Copy link
Author

Well I actually need USB HID, MSC and a load of others but I wanted to give you a tiny test case.

@Jason2866
Copy link

Wrong github for this issue. pioarduino is "just" the build system. There is no change in Arduino Core.
Please open an issue in espressif32 Arduino github with an example that fails.

@Jason2866 Jason2866 added the Arduino / IDF issue not an issue from pioarduino label Jan 14, 2025
@i-am-shodan
Copy link
Author

Also I don't think that issue is relevant here, the entire USB stack doesn't come up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arduino / IDF issue not an issue from pioarduino
Projects
None yet
Development

No branches or pull requests

3 participants