Arduino-component Serial.print doesn't work over USB CDC (ESP32-S3)

akolodner25
Posts: 27
Joined: Tue Nov 22, 2022 5:15 am

Arduino-component Serial.print doesn't work over USB CDC (ESP32-S3)

Postby akolodner25 » Tue Nov 22, 2022 5:32 am

I am programming an ESP32-S3 chip connected only to USB. On the Arduino IDE, I just had to turn on "USB CDC on Boot" to get Serial output to work over it, but now I'm trying to switch to ESP-IDF with Arduino and there's no identical option in the menuconfig. In the ESP system settings, I set the output to go to USB Serial/JTAG Controller (see below for why other options don't work). Then after I build/flash the project, Serial.print doesn't give any output in the monitor. printf() works fine (as long as it has a flushing newline), so I know that serial output *can* be sent to the computer, just not with Serial.print. How do I get Serial.print to work? It would save a lot of hassle changing every print statement to printf, and keep compatibility with Arduino IDE, so this is somewhat important.

In ESP system settings, if I select UART0 as serial output, the project builds but the monitor has no output after starting the CPU scheduler (normally it says uart: queue free spaces: 20, but this does not appear). The program is still running, as evidenced by LEDs in a test program, but no output.
If I try to select USB CDC, the build fails with an error saying: static assertion failed: "usb_osglue_*_int is not multicore capable".

First post so if I'm leaving out any important information, just ask. Serial baud rate 115200 if it matters.

johnsmithespidf
Posts: 1
Joined: Wed Aug 14, 2024 9:00 am

Re: Arduino-component Serial.print doesn't work over USB CDC (ESP32-S3)

Postby johnsmithespidf » Wed Aug 14, 2024 9:03 am

It's been two years since your post on the forum, but no response yet.
I ran into the same issue today and was wondering if you found a solution?
Thanks for the help :)

akolodner25
Posts: 27
Joined: Tue Nov 22, 2022 5:15 am

Re: Arduino-component Serial.print doesn't work over USB CDC (ESP32-S3)

Postby akolodner25 » Sat Aug 17, 2024 4:40 pm

Yes, eventually somebody helped me! Just forgot to update here. The forum post with the solution is viewtopic.php?f=13&t=30926

Who is online

Users browsing this forum: Bing [Bot] and 170 guests