Jelajahi Sumber

esp_rom: fix esp32s3 rom ets_printf bug

jiangguangming 3 tahun lalu
induk
melakukan
4c3ce9f21d

+ 1 - 5
components/bootloader_support/src/bootloader_console.c

@@ -50,12 +50,8 @@ void bootloader_console_init(void)
 {
     const int uart_num = CONFIG_ESP_CONSOLE_UART_NUM;
 
-#if !ESP_ROM_SUPPORT_MULTIPLE_UART
-    /* esp_rom_install_channel_put is not available unless multiple UARTs are supported */
+    // Install rom uart printf as console.
     esp_rom_install_uart_printf();
-#else
-    esp_rom_install_channel_putc(1, esp_rom_uart_putc);
-#endif
 
     // Wait for UART FIFO to be empty.
     esp_rom_uart_tx_wait_idle(0);

+ 4 - 0
components/esp_rom/esp32s3/Kconfig.soc_caps.in

@@ -54,3 +54,7 @@ config ESP_ROM_HAS_LAYOUT_TABLE
 config ESP_ROM_HAS_SPI_FLASH
     bool
     default y
+
+config ESP_ROM_HAS_ETS_PRINTF_BUG
+    bool
+    default y

+ 1 - 0
components/esp_rom/esp32s3/esp_rom_caps.h

@@ -19,3 +19,4 @@
 #define ESP_ROM_NEEDS_SWSETUP_WORKAROUND    (1) // ROM uses 32-bit time_t. A workaround is required to prevent printf functions from crashing
 #define ESP_ROM_HAS_LAYOUT_TABLE            (1) // ROM has the layout table
 #define ESP_ROM_HAS_SPI_FLASH               (1) // ROM has the implementation of SPI Flash driver
+#define ESP_ROM_HAS_ETS_PRINTF_BUG          (1) // ROM has ets_printf bug when disable the ROM log either by eFuse or RTC storage register