diff --git a/components/bootloader_support/src/bootloader_console.c b/components/bootloader_support/src/bootloader_console.c index 1590951818..a5afc11f31 100644 --- a/components/bootloader_support/src/bootloader_console.c +++ b/components/bootloader_support/src/bootloader_console.c @@ -27,6 +27,7 @@ #include "esp32s2/rom/usb/usb_common.h" #elif CONFIG_IDF_TARGET_ESP32C3 #include "esp32c3/rom/ets_sys.h" +#include "esp32c3/rom/uart.h" #endif #include "esp_rom_gpio.h" #include "esp_rom_uart.h" @@ -115,7 +116,7 @@ void bootloader_console_init(void) #ifdef CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG void bootloader_console_init(void) { - //Nothing to do; ROM already outputs here by default. - //(But also to the UART; should we disable that? hmm.) + UartDevice *uart = GetUartDevice(); + uart->buff_uart_no = ESP_ROM_USB_SERIAL_DEVICE_NUM; } #endif //CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG diff --git a/components/esp_rom/esp32c3/esp_rom_caps.h b/components/esp_rom/esp32c3/esp_rom_caps.h index bae770da81..6d5b8014dc 100644 --- a/components/esp_rom/esp32c3/esp_rom_caps.h +++ b/components/esp_rom/esp32c3/esp_rom_caps.h @@ -18,3 +18,4 @@ #define ESP_ROM_HAS_CRC_BE (1) // ROM CRC library supports Big Endian #define ESP_ROM_HAS_JPEG_DECODE (1) // ROM has JPEG decode library #define ESP_ROM_UART_CLK_IS_XTAL (1) // UART clock source is selected to XTAL in ROM +#define ESP_ROM_USB_SERIAL_DEVICE_NUM (3) // UART uses USB_SERIAL_JTAG port in ROM.