Skip to content

serial: fix tinyusb init with esp_tinyusb 2.x - #351

Closed
bota87 wants to merge 1 commit into
Blockstream:masterfrom
bota87:fix-tinyusb-init
Closed

bota87 wants to merge 1 commit into
Blockstream:masterfrom
bota87:fix-tinyusb-init

Conversation

@bota87

@bota87 bota87 commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Since the update to IDF v5.5.5 (esp_tinyusb 2.2.1), ESP32-S3 builds that use TinyUSB don't boot: they stop on the splash screen.

esp_tinyusb 2.x checks the task settings in the config passed to tinyusb_driver_install(), and the zero-initialised config fails that check ("Task size can't be 0"). serial_init() then returns false and main.c aborts.
This uses TINYUSB_DEFAULT_CONFIG() instead.

From reading the code this should affect every S3 config that uses TinyUSB (i.e. without CONFIG_JADE_USE_USB_JTAG_SERIAL), since the check only looks at the config struct, but I've only tested it on the two Waveshare boards below.

Tested on a Waveshare Touch LCD 2 with current master: without the fix it stops on the splash screen, with the fix it boots to the home screen and shows up as 303a:4001. Same result on the Touch LCD 3.5 (#330).

esp_tinyusb 2.x validates the task settings passed to
tinyusb_driver_install(), so the zero-initialised config is now rejected
("Task size can't be 0"): serial_init() fails and every ESP32-S3 build
using TinyUSB aborts at boot. Use TINYUSB_DEFAULT_CONFIG() instead.
@jgriffiths

Copy link
Copy Markdown
Collaborator

Merged (with rebase) - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants