refactor(hal): Created esp_hal_security for security code

This commit is contained in:
Aditya Patwardhan
2026-01-21 09:59:46 +05:30
parent 469ead652b
commit 5ee7af3afd
220 changed files with 4098 additions and 3766 deletions
+1 -66
View File
@@ -11,19 +11,10 @@ list(APPEND includes "${target}/include")
list(APPEND includes "include")
if(CONFIG_SOC_MPU_SUPPORTED)
list(APPEND srcs "mpu_hal.c")
endif()
if(CONFIG_SOC_EFUSE_SUPPORTED)
list(APPEND srcs "efuse_hal.c" "${target}/efuse_hal.c")
endif()
if(CONFIG_SOC_KEY_MANAGER_SUPPORTED)
list(APPEND srcs "key_mgr_hal.c")
list(APPEND srcs "huk_hal.c")
endif()
if(NOT CONFIG_APP_BUILD_TYPE_PURE_RAM_APP)
if(CONFIG_SOC_MMU_PERIPH_NUM)
list(APPEND srcs "mmu_hal.c")
@@ -42,29 +33,7 @@ else()
endif()
endif()
if(esp_tee_build)
list(APPEND srcs "apm_hal.c")
if(CONFIG_SOC_AES_SUPPORTED)
list(APPEND srcs "aes_hal.c")
endif()
if(CONFIG_SOC_SHA_SUPPORTED)
list(APPEND srcs "sha_hal.c")
endif()
if(CONFIG_SOC_HMAC_SUPPORTED)
list(APPEND srcs "hmac_hal.c")
endif()
if(CONFIG_SOC_DIG_SIGN_SUPPORTED)
list(APPEND srcs "ds_hal.c")
endif()
if(CONFIG_SOC_ECC_SUPPORTED)
list(APPEND srcs "ecc_hal.c")
endif()
elseif(NOT BOOTLOADER_BUILD)
if(NOT esp_tee_build AND NOT BOOTLOADER_BUILD)
list(APPEND srcs "color_hal.c")
if(CONFIG_SOC_SYSTIMER_SUPPORTED AND NOT CONFIG_HAL_SYSTIMER_USE_ROM_IMPL)
@@ -79,26 +48,6 @@ elseif(NOT BOOTLOADER_BUILD)
list(APPEND srcs "etm_hal.c" "${target}/etm_periph.c")
endif()
if(CONFIG_SOC_ECC_SUPPORTED)
list(APPEND srcs "ecc_hal.c")
endif()
if(CONFIG_SOC_ECDSA_SUPPORTED)
list(APPEND srcs "ecdsa_hal.c")
endif()
if(CONFIG_SOC_MPI_SUPPORTED)
list(APPEND srcs "mpi_hal.c")
endif()
if(CONFIG_SOC_SHA_SUPPORTED)
list(APPEND srcs "sha_hal.c")
endif()
if(CONFIG_SOC_AES_SUPPORTED)
list(APPEND srcs "aes_hal.c")
endif()
if(CONFIG_SOC_MODEM_CLOCK_IS_INDEPENDENT AND CONFIG_SOC_MODEM_CLOCK_SUPPORTED)
list(APPEND srcs "${target}/modem_clock_hal.c")
endif()
@@ -106,20 +55,6 @@ elseif(NOT BOOTLOADER_BUILD)
if(CONFIG_SOC_SDIO_SLAVE_SUPPORTED)
list(APPEND srcs "sdio_slave_hal.c")
endif()
if(CONFIG_SOC_APM_SUPPORTED)
list(APPEND srcs "apm_hal.c")
endif()
if(CONFIG_SOC_HMAC_SUPPORTED AND NOT CONFIG_IDF_TARGET_ESP32S2)
# For ESP32-S2 we do not have HMAC HAL layer implementation yet
list(APPEND srcs "hmac_hal.c")
endif()
if(CONFIG_SOC_DIG_SIGN_SUPPORTED AND NOT CONFIG_IDF_TARGET_ESP32S2)
# For ESP32-S2 we do not have DS HAL layer implementation yet
list(APPEND srcs "ds_hal.c")
endif()
endif()
idf_component_register(SRCS ${srcs}