2023-05-11 02:50:27 -04:00
|
|
|
set(srcs "app_main.c")
|
2023-10-16 08:00:36 -04:00
|
|
|
set(priv_include_dirs ".")
|
2023-05-11 02:50:27 -04:00
|
|
|
|
|
|
|
if(CONFIG_SOC_MPI_SUPPORTED)
|
|
|
|
list(APPEND srcs "mpi/test_mpi.c")
|
|
|
|
endif()
|
|
|
|
|
2023-05-11 05:58:02 -04:00
|
|
|
if(CONFIG_SOC_ECC_SUPPORTED)
|
|
|
|
list(APPEND srcs "ecc/test_ecc.c")
|
|
|
|
endif()
|
|
|
|
|
2023-05-11 07:01:00 -04:00
|
|
|
if(CONFIG_SOC_HMAC_SUPPORTED)
|
|
|
|
list(APPEND srcs "hmac/test_hmac.c")
|
|
|
|
endif()
|
2023-05-11 02:50:27 -04:00
|
|
|
|
2023-05-11 08:34:48 -04:00
|
|
|
if(CONFIG_SOC_DIG_SIGN_SUPPORTED)
|
|
|
|
list(APPEND srcs "ds/test_ds.c")
|
|
|
|
endif()
|
|
|
|
|
2023-05-15 02:50:03 -04:00
|
|
|
if(CONFIG_SOC_ECDSA_SUPPORTED)
|
|
|
|
list(APPEND srcs "ecdsa/test_ecdsa.c")
|
|
|
|
endif()
|
|
|
|
|
2023-08-28 06:14:47 -04:00
|
|
|
if(CONFIG_SOC_AES_SUPPORTED)
|
2023-10-16 08:00:36 -04:00
|
|
|
list(APPEND srcs "aes/test_aes.c"
|
|
|
|
"$ENV{IDF_PATH}/components/mbedtls/port/aes/esp_aes_common.c"
|
|
|
|
"aes/aes_block.c")
|
2023-10-30 05:48:45 -04:00
|
|
|
list(APPEND priv_include_dirs "$ENV{IDF_PATH}/components/mbedtls/port/include"
|
|
|
|
"$ENV{IDF_PATH}/components/mbedtls/port/aes/include")
|
2023-10-16 08:00:36 -04:00
|
|
|
|
|
|
|
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()
|
2023-08-28 06:14:47 -04:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CONFIG_SOC_SHA_SUPPORTED)
|
|
|
|
if(NOT CONFIG_SOC_SHA_SUPPORT_PARALLEL_ENG)
|
2023-10-16 08:00:36 -04:00
|
|
|
list(APPEND srcs "sha/test_sha.c"
|
|
|
|
"sha/sha_block.c")
|
2024-03-08 06:19:47 -05:00
|
|
|
list(APPEND priv_include_dirs "sha/include"
|
|
|
|
"$ENV{IDF_PATH}/components/mbedtls/port/include")
|
|
|
|
|
2023-10-16 08:00:36 -04:00
|
|
|
if(CONFIG_SOC_SHA_SUPPORT_DMA)
|
2024-03-08 06:19:47 -05:00
|
|
|
list(APPEND srcs "sha/sha_dma.c"
|
|
|
|
"$ENV{IDF_PATH}/components/mbedtls/port/sha/dma/sha.c")
|
|
|
|
list(APPEND priv_include_dirs "$ENV{IDF_PATH}/components/mbedtls/port/sha/dma/include")
|
|
|
|
|
|
|
|
if(NOT CONFIG_SOC_SHA_GDMA)
|
|
|
|
list(APPEND srcs "$ENV{IDF_PATH}/components/mbedtls/port/sha/dma/esp_sha_crypto_dma_impl.c")
|
|
|
|
else()
|
|
|
|
list(APPEND srcs "$ENV{IDF_PATH}/components/mbedtls/port/sha/dma/esp_sha_gdma_impl.c"
|
|
|
|
"$ENV{IDF_PATH}/components/mbedtls/port/crypto_shared_gdma/esp_crypto_shared_gdma.c")
|
|
|
|
endif()
|
2023-10-16 08:00:36 -04:00
|
|
|
endif()
|
2023-08-28 06:14:47 -04:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2023-05-11 02:50:27 -04:00
|
|
|
idf_component_register(SRCS ${srcs}
|
2024-05-14 02:16:28 -04:00
|
|
|
PRIV_REQUIRES efuse mbedtls esp_mm bootloader_support
|
2023-05-11 02:50:27 -04:00
|
|
|
REQUIRES test_utils unity
|
2023-08-28 07:21:36 -04:00
|
|
|
WHOLE_ARCHIVE
|
2023-10-16 08:00:36 -04:00
|
|
|
PRIV_INCLUDE_DIRS "${priv_include_dirs}"
|
|
|
|
)
|