2020-05-08 18:05:39 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2021-08-10 20:44:56 +08:00
|
|
|
cmake_minimum_required(VERSION 3.20.0)
|
2020-05-08 18:05:39 +08:00
|
|
|
|
2020-05-29 12:02:17 +08:00
|
|
|
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
2020-05-08 18:05:39 +08:00
|
|
|
|
2021-11-08 18:16:08 +08:00
|
|
|
project(tfm_psa_crypto)
|
2020-05-08 18:05:39 +08:00
|
|
|
|
|
|
|
# Source files in this sample
|
|
|
|
target_sources(app PRIVATE src/main.c)
|
|
|
|
target_sources(app PRIVATE src/psa_attestation.c)
|
|
|
|
target_sources(app PRIVATE src/psa_crypto.c)
|
|
|
|
target_sources(app PRIVATE src/shell.c)
|
|
|
|
target_sources(app PRIVATE src/util_app_cfg.c)
|
|
|
|
target_sources(app PRIVATE src/util_app_log.c)
|
|
|
|
target_sources(app PRIVATE src/util_sformat.c)
|
2021-05-09 05:40:07 +08:00
|
|
|
|
|
|
|
target_include_directories(app PRIVATE
|
2021-10-19 23:57:44 +08:00
|
|
|
${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/interface/include
|
2021-05-09 05:40:07 +08:00
|
|
|
)
|
2020-05-14 02:03:30 +08:00
|
|
|
|
|
|
|
# In TF-M, default value of CRYPTO_ENGINE_BUF_SIZE is 0x2080. It causes
|
|
|
|
# insufficient memory failure while verifying signature. Increase it to 0x2400.
|
|
|
|
set_property(TARGET zephyr_property_target
|
|
|
|
APPEND PROPERTY TFM_CMAKE_OPTIONS
|
|
|
|
-DCRYPTO_ENGINE_BUF_SIZE=0x2400
|
|
|
|
)
|
2021-11-08 18:16:08 +08:00
|
|
|
|
|
|
|
zephyr_include_directories(${APPLICATION_SOURCE_DIR}/src/tls_config)
|