From 8f807d89641ce813e258bf6b27fbf917d4fa69a8 Mon Sep 17 00:00:00 2001 From: jiangguangming Date: Thu, 3 Nov 2022 16:02:22 +0800 Subject: [PATCH] bootloader_support: fix uart1 no printing in the 2nd bootloader stage --- components/bootloader_support/src/bootloader_console.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/bootloader_support/src/bootloader_console.c b/components/bootloader_support/src/bootloader_console.c index ea76d90a2f..4be09659e0 100644 --- a/components/bootloader_support/src/bootloader_console.c +++ b/components/bootloader_support/src/bootloader_console.c @@ -61,6 +61,9 @@ void bootloader_console_init(void) const int uart_tx_gpio = CONFIG_ESP_CONSOLE_UART_TX_GPIO; const int uart_rx_gpio = CONFIG_ESP_CONSOLE_UART_RX_GPIO; + // Switch to the new UART (this just changes UART number used for esp_rom_printf in ROM code). + esp_rom_uart_set_as_console(uart_num); + // If console is attached to UART1 or if non-default pins are used, // need to reconfigure pins using GPIO matrix if (uart_num != 0 ||