blocked: can't use ESP32S3 native USB controller with tusb CDC drivers: "usb_osglue_*_int is not multicore capable"

rozzie
Posts: 12
Joined: Sat Sep 05, 2020 4:57 pm

blocked: can't use ESP32S3 native USB controller with tusb CDC drivers: "usb_osglue_*_int is not multicore capable"

Postby rozzie » Tue Dec 13, 2022 1:44 pm

I'm designing the ESP32-S3 into a product and have made significant progress.

I am at the point where I need to use the built-in hardware USB (pins 19/20) as the USB controller, in CDC ACM mode. (I cannot use the UART-based USB because that serial port is in-use for a different peripheral.)

I've followed instructions here...
https://docs.espressif.com/projects/esp ... evice.html
...and have tried to get started by building the example at...
examples/peripherals/usb/device/tusb_serial_device

However, when I attempt to build the example project, I get:
components/esp_system/port/soc/esp32s3/usb_console.c:69:1: error: static assertion failed: "usb_osglue_*_int is not multicore capable"
69 | _Static_assert(SOC_CPU_CORES_NUM == 1, "usb_osglue_*_int is not multicore capable");
(as well as some other errors related to esp_usb_console_read_available)

Via Google it looks as though this problem was discussed quite a while ago, but there has been silence lately on the topic. This port is critical to my design and is one reason why the S3 was selected.

I'm running ESP-IDF v5.1-dev-2283-gc92f2394f2-dirty
Can you please point me to a branch where the USB support is implemented, so that I might be unblocked? Or is there some workaround that I can be made aware of? (The S3 is way overkill computationally for my needs and I only need to run on a single core, if that helps.)

To be super-clear, the entirety of esp-idf is an amazing development resource and I appreciate the great work you folks have done. Thank you in advance.

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: blocked: can't use ESP32S3 native USB controller with tusb CDC drivers: "usb_osglue_*_int is not multicore capable"

Postby ESP_igrr » Tue Dec 13, 2022 4:26 pm

Hi rozzie,

Could you clarify what kind of a device will you be implementing using TinyUSB? If I remember correctly, it is still possible to use TinyUSB CDC on S3, just the console output has to go to UART. The missing feature is the "default" CDC console which can work without TinyUSB. If you are using TinyUSB, that feature is not that useful. We also have some support for redirecting the output, so if you implement USB CDC in TinyUSB it is still possible to send the logs there.

rozzie
Posts: 12
Joined: Sat Sep 05, 2020 4:57 pm

Re: blocked: can't use ESP32S3 native USB controller with tusb CDC drivers: "usb_osglue_*_int is not multicore capable"

Postby rozzie » Tue Dec 13, 2022 6:14 pm

Thanks. To be completely direct, I haven't ever used tinyUSB. My experience with USB to date has been on a different platform (stm32) which we're porting from.

The thing that I love about esp-idf is that you folks are doing all the dependency management for me as a dev in a standardized way. Whether esp-idf itself uses or incorporates tinyusb, or whether it doesn't, is neutral to me so long as I can get the native USB hardware to work as a CDC serial device (with my vid/pid, etc).

The code that I'm porting exposes its microcontroller as a "standard serial port" that, when plugged into a Mac/Windows/etc, connects to any terminal program without drivers - appearing as /dev/tty.usbXXX on mac, etc.

I began the USB journey on the S3 just by poking around in the console examples, and the two or three that I tried all gave that same error. If there's an alternative path to using the native USB hardware for a usb cdc serial device, any suggestions would indeed be much appreciated.

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: blocked: can't use ESP32S3 native USB controller with tusb CDC drivers: "usb_osglue_*_int is not multicore capable"

Postby ESP_igrr » Tue Dec 13, 2022 8:58 pm

There are two examples of USB device CDC feature you should be able to use on ESP32-S3:

https://github.com/espressif/esp-idf/bl ... ice_main.c — sets up a USB CDC device, sends and receives data; log output (ESP_LOG) and printfs still goes over to UART.

https://github.com/espressif/esp-idf/bl ... ole_main.c — sets up a USB CDC device, redirects console output there. ESP_LOG and printfs are sent over to USB CDC.

rozzie
Posts: 12
Joined: Sat Sep 05, 2020 4:57 pm

Re: blocked: can't use ESP32S3 native USB controller with tusb CDC drivers: "usb_osglue_*_int is not multicore capable"

Postby rozzie » Tue Dec 13, 2022 10:14 pm

I was unaware of this, and will try it immediately and will re-open this if necessary.

Thank you for your help and your responsiveness.

Getting me unblocked is truly appreciated.

Who is online

Users browsing this forum: Baidu [Spider], Eltrion and 151 guests