FelipeMdeO opened a new pull request, #19998: URL: https://github.com/apache/nuttx/pull/19998
## Summary `esp-hal-3rdparty`'s `sleep_uart.c` and `bootloader_console.c` reference the ESP-IDF-style `CONFIG_ESP_CONSOLE_UART_NUM` / `CONFIG_ESP_CONSOLE_ROM_SERIAL_PORT_NUM` / `CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG` macros directly. Only `Bootloader.mk` ever defines the first two, only for the bootloader build, and only for a UART console; nothing ever defines `CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG` for the main firmware build. `sleep_uart.c`'s use is guarded (`#if (CONFIG_ESP_CONSOLE_UART_NUM != -1)`) and silently no-ops when the macro is missing. `bootloader_console.c` is not so forgiving: none of its four `#ifdef CONFIG_ESP_CONSOLE_*` blocks match when the symbol is simply absent, so `bootloader_console_init()` is never emitted at all, and linking fails with it undefined as soon as a board reaches the console-selection code -- which any board on `CONFIG_ESP32S3_USBSERIAL` (the native USB Serial/JTAG console, e.g. the Seeed XIAO ESP32-S3) does immediately. This mirrors `Bootloader.mk`'s own `CONFIG_UART0/1_SERIAL_CONSOLE` logic in `hal.mk` for the main build, and adds the missing `USB_SERIAL_JTAG` case. ## Impact New optional CFLAGS definitions gated on the board's console choice (`CONFIG_UART0/1_SERIAL_CONSOLE`, `CONFIG_ESP32S3_USBSERIAL`). Boards already on a UART console are unaffected. Boards on the native USB Serial/JTAG console -- previously unable to link at all -- now build. ## Testing Host: Ubuntu 24.04.4 LTS. `xtensa-esp-elf-gcc` (crosstool-NG esp-14.2.0_20241119) 14.2.0. `checkpatch.sh` (style + `-m` commit message) clean. Compiles clean for the XIAO ESP32-S3 target on the native USB Serial/JTAG console (`CONFIG_ESP32S3_USBSERIAL=y`). This exact fix is bundled inside #19997, where it was validated with a real build and boot on hardware; split out here as its own independent, minimal PR since it's unrelated to the IMU driver work in that PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
