-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
[ES32-S3] USB Serial/JTAG as primary log output - Console REPL does not work (IDFGH-7840) #9369
Comments
I have been using the USB serial/jtag controller as a console for a bit now on ESP32-S3, albeit not without some problems. The best place to start is the system/console/basic example (definitely NOT the advanced_usb_cdc code). Set ESP_CONSOLE_USB_SERIAL_JTAG=y in the sdkconfig, and then build & run. This is only in quite recent revisions of esp-idf:latest. You can find the proper initialization code in the main/console_example_main.c file, in a set of #ifdef code blocks for UART vs. the serial/jtag controller. Then find the device appropriate for $ESPPORT (on my Mac, the first one plugged in will be /dev/cu.usbmodem101. I find the implementation to be buggy yet -- I've got an issue reported where lines can be lost in the output. As I run the console/basic example at the moment, the prompt output is regularly being lost but the input is being taken (but not echoed) and executed. It's functional, but definitely not fully so yet (imo). |
FWIW, the fixes to the console/basic example for USB_SERIAL_JTAG support (excluding the skipped characters issue which @davidzuhn has reported) have been backported to release/v4.4 branch in 6f57018. This commit will be part of v4.4.2 release. |
Thanks for for the responses. I'll look forward to 4.4.2. Just btw, the great support & community for the ESP32 family is the main reason I chose this ecosystem for my product. So thanks for the always prompt replies. |
I can confirm Usb Serial Jtag Console works in 4.4.2 You must set the primary console to USB Serial Jtag in menuconfig, then compile the basic console example. |
ESP32-S3 Dev Kit C w/ 2MB PSRAM
ESP-IDF v4.4.1
I Imagine this is related to #9364, #8879, #8738, but those are about USB CDC Console, not Serial/JTAG Console, which uses a different underlying USB implementation, so It's worth its own issue IMO.
Question:
Problem:
After setting
CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y
, the CDC Console VFS calls no longer compile.Compile Error:
/.espressif/tools/xtensa-esp32s3-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32s3-elf/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld: esp-idf/main/libmain.a(pd_console_api.cpp.obj):(.literal._Z19pd_console_api_initP10pd_error_t+0x24): undefined reference to esp_vfs_dev_cdcacm_set_rx_line_endings
Other Attempt:
I've also tried using
CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y
with the Console Uart initialization, just to see if there's a chance it worked.But mostly expected, it doesn't work and causes the console to go haywire with lots of
console> 4;1R Console: Unrecognized command: 4;1R[24;1R[24;14R[24;1R[24;1R[24;14R
style lines being logged, and then a WDT crash triggers.`The text was updated successfully, but these errors were encountered: