esp-idf/components/hal/test_apps/crypto/main/CMakeLists.txt
harshal.patil 9b15189583
change(mbedtls): replace Cache ROM APIs usage with APIs from esp_cache.h
- Only APIs used in esp_crypto_shared_gdma and aes have been replaced
- Get dcache line size using cache api instead of Kconfig
2024-03-13 15:22:07 +05:30

64 lines
2.0 KiB
CMake

set(srcs "app_main.c")
set(priv_include_dirs ".")
if(CONFIG_SOC_MPI_SUPPORTED)
list(APPEND srcs "mpi/test_mpi.c")
endif()
if(CONFIG_SOC_ECC_SUPPORTED)
list(APPEND srcs "ecc/test_ecc.c")
endif()
if(CONFIG_SOC_HMAC_SUPPORTED)
list(APPEND srcs "hmac/test_hmac.c")
endif()
if(CONFIG_SOC_DIG_SIGN_SUPPORTED)
list(APPEND srcs "ds/test_ds.c")
endif()
if(CONFIG_SOC_ECDSA_SUPPORTED)
list(APPEND srcs "ecdsa/test_ecdsa.c")
endif()
if(CONFIG_SOC_AES_SUPPORTED)
list(APPEND srcs "aes/test_aes.c"
"$ENV{IDF_PATH}/components/mbedtls/port/aes/esp_aes_common.c"
"aes/aes_block.c")
list(APPEND priv_include_dirs "$ENV{IDF_PATH}/components/mbedtls/port/include"
"$ENV{IDF_PATH}/components/mbedtls/port/aes/include")
if(CONFIG_SOC_AES_SUPPORT_DMA)
list(APPEND priv_include_dirs "$ENV{IDF_PATH}/components/mbedtls/port/aes/dma/include")
list(APPEND srcs "$ENV{IDF_PATH}/components/mbedtls/port/aes/dma/esp_aes.c")
if(NOT CONFIG_SOC_AES_GDMA)
list(APPEND srcs "$ENV{IDF_PATH}/components/mbedtls/port/aes/dma/esp_aes_crypto_dma_impl.c")
else()
list(APPEND srcs "$ENV{IDF_PATH}/components/mbedtls/port/aes/dma/esp_aes_gdma_impl.c"
"$ENV{IDF_PATH}/components/mbedtls/port/crypto_shared_gdma/esp_crypto_shared_gdma.c")
endif()
if(CONFIG_SOC_AES_SUPPORT_GCM)
list(APPEND srcs "$ENV{IDF_PATH}/components/mbedtls/port/aes/esp_aes_gcm.c")
endif()
endif()
endif()
if(CONFIG_SOC_SHA_SUPPORTED)
if(NOT CONFIG_SOC_SHA_SUPPORT_PARALLEL_ENG)
list(APPEND srcs "sha/test_sha.c"
"sha/sha_block.c")
if(CONFIG_SOC_SHA_SUPPORT_DMA)
list(APPEND srcs "sha/sha_dma.c")
endif()
endif()
endif()
idf_component_register(SRCS ${srcs}
PRIV_REQUIRES efuse mbedtls esp_mm
REQUIRES test_utils unity
WHOLE_ARCHIVE
PRIV_INCLUDE_DIRS "${priv_include_dirs}"
)