diff --git a/components/efuse/include/esp_efuse.h b/components/efuse/include/esp_efuse.h index 69db4a422f..ab792a49b7 100644 --- a/components/efuse/include/esp_efuse.h +++ b/components/efuse/include/esp_efuse.h @@ -21,6 +21,7 @@ extern "C" { #include #include "esp_err.h" #include "esp_log.h" +#include "soc/soc_caps.h" #include "sdkconfig.h" #if CONFIG_IDF_TARGET_ESP32 #include "esp32/esp_efuse.h" @@ -332,7 +333,7 @@ void esp_efuse_disable_basic_rom_console(void); */ esp_err_t esp_efuse_disable_rom_download_mode(void); -#ifdef CONFIG_IDF_TARGET_ESP32S2 +#if SOC_SUPPORTS_SECURE_DL_MODE /* @brief Switch ROM Download Mode to Secure Download mode via eFuse * * Permanently enables Secure Download mode. This mode limits the use of ROM Download Mode functions diff --git a/components/soc/soc/esp32s2/include/soc/soc_caps.h b/components/soc/soc/esp32s2/include/soc/soc_caps.h index 0b24ddbb14..3aa4973c3e 100644 --- a/components/soc/soc/esp32s2/include/soc/soc_caps.h +++ b/components/soc/soc/esp32s2/include/soc/soc_caps.h @@ -5,4 +5,6 @@ #pragma once -#define SOC_CPU_CORES_NUM 1 \ No newline at end of file +#define SOC_CPU_CORES_NUM 1 + +#define SOC_SUPPORTS_SECURE_DL_MODE 1