{bp-20053} xtensa/esp32s3: Fix CONSOLE_DEV clobbered by USBSERIAL macro. - #20080
Merged
Conversation
When a real UART (CONFIG_UARTx_SERIAL_CONSOLE) is selected as the system console while CONFIG_ESP32S3_USBSERIAL is also enabled (e.g. to keep /dev/ttyACM0 available as a secondary device alongside an external console UART), the unconditional #ifdef CONFIG_ESP32S3_USBSERIAL # define CONSOLE_DEV g_uart_usbserial #endif block silently redefines CONSOLE_DEV, clobbering the correct earlier definition that pointed it at the chosen UART device. Confirmed on real hardware (Seeed XIAO ESP32-S3): with UART0 selected as console and USBSERIAL also enabled, the board boot-looped on RTCWDT_RTC_RST every ~8s, never reaching NSH. With this fix, NSH comes up normally over UART0 and /dev/ttyACM0 remains available. Signed-off-by: Felipe Moura <moura.fmo@gmail.com> Assisted-by: Claude:claude-sonnet-5
jerpelea
requested review from
acassis,
cederom,
linguini1 and
xiaoxiang781216
September 7, 2026 08:53
cederom
approved these changes
Sep 7, 2026
Contributor
Author
|
CI fix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When a real UART (CONFIG_UARTx_SERIAL_CONSOLE) is selected as the system console while CONFIG_ESP32S3_USBSERIAL is also enabled (e.g. to keep /dev/ttyACM0 available as a secondary device alongside an external console UART), the unconditional
#ifdef CONFIG_ESP32S3_USBSERIAL
define CONSOLE_DEV g_uart_usbserial
#endif
block silently redefines CONSOLE_DEV, clobbering the correct earlier definition that pointed it at the chosen UART device.
Confirmed on real hardware (Seeed XIAO ESP32-S3): with UART0 selected as console and USBSERIAL also enabled, the board boot-looped on RTCWDT_RTC_RST every ~8s, never reaching NSH. With this fix, NSH comes up normally over UART0 and /dev/ttyACM0 remains available.
Impact
RELEASE
Testing
CI