2024-07-08 05:01:32 -04:00
|
|
|
set(srcs "")
|
2024-07-10 01:59:21 -04:00
|
|
|
set(priv_requires "soc")
|
2024-07-08 05:01:32 -04:00
|
|
|
|
2024-07-07 23:43:15 -04:00
|
|
|
if(NOT BOOTLOADER_BUILD)
|
2024-07-08 05:01:32 -04:00
|
|
|
if(CONFIG_IDF_TARGET_ESP32H2 OR CONFIG_IDF_TARGET_ESP32P4 OR CONFIG_IDF_TARGET_ESP32C5)
|
|
|
|
list(APPEND srcs "src/crypto/${IDF_TARGET}/clk.c")
|
|
|
|
endif()
|
|
|
|
|
2024-07-08 05:39:03 -04:00
|
|
|
if(CONFIG_SOC_CRYPTO_DPA_PROTECTION_SUPPORTED)
|
|
|
|
list(APPEND srcs "src/crypto/esp_dpa_protection.c")
|
|
|
|
endif()
|
|
|
|
|
2024-07-10 04:54:54 -04:00
|
|
|
list(APPEND srcs "src/crypto/esp_crypto_lock.c")
|
2024-07-07 23:43:15 -04:00
|
|
|
endif()
|
2024-07-08 05:01:32 -04:00
|
|
|
|
|
|
|
idf_component_register(SRCS ${srcs}
|
|
|
|
INCLUDE_DIRS "include"
|
|
|
|
PRIV_REQUIRES ${priv_requires})
|
2024-07-08 05:39:03 -04:00
|
|
|
|
|
|
|
if(NOT BOOTLOADER_BUILD)
|
|
|
|
if(CONFIG_SOC_CRYPTO_DPA_PROTECTION_SUPPORTED)
|
|
|
|
target_link_libraries(${COMPONENT_LIB} PRIVATE "-u esp_crypto_dpa_prot_include_impl")
|
|
|
|
endif()
|
|
|
|
endif()
|