From 53682edd6d1af45b9bf463cae13ba5b9ff633d26 Mon Sep 17 00:00:00 2001 From: Marius Vikhammer Date: Tue, 2 Jan 2024 17:56:07 +0800 Subject: [PATCH] fix(startup): fixed failing to boot if rom log ctrl efuse was burned Closes https://github.com/espressif/esp-idf/issues/12894 --- components/esp_system/startup_funcs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/esp_system/startup_funcs.c b/components/esp_system/startup_funcs.c index 85cb9eee4b..6d887a670a 100644 --- a/components/esp_system/startup_funcs.c +++ b/components/esp_system/startup_funcs.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -248,7 +248,12 @@ ESP_SYSTEM_INIT_FN(init_secure, CORE, BIT(0), 150) #ifdef ROM_LOG_MODE ESP_SYSTEM_INIT_FN(init_rom_log, CORE, BIT(0), 160) { + if(ets_efuse_get_uart_print_control() == ROM_LOG_MODE) { + return ESP_OK; + } + esp_err_t err = esp_efuse_set_rom_log_scheme(ROM_LOG_MODE); + if (err == ESP_ERR_NOT_SUPPORTED) { err = ESP_OK; }