File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
modules/trusted-firmware-m
samples/tfm_integration/tfm_regression_test Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -228,6 +228,8 @@ if (CONFIG_BUILD_WITH_TFM)
228228 message (FATAL_ERROR "Unsupported ZEPHYR_TOOLCHAIN_VARIANT: ${ZEPHYR_TOOLCHAIN_VARIANT} " )
229229 endif ()
230230
231+ string (REPLACE "toolchain" "toolchain_ns" TFM_TOOLCHAIN_NS_FILE ${TFM_TOOLCHAIN_FILE} )
232+
231233 if (CONFIG_TFM_QCBOR_PATH STREQUAL "DOWNLOAD" )
232234 # Change CMake cache type to string to avoid QCBOR_PATH=/absolute/path/DOWNLOAD being set.
233235 set (QCBOR_PATH_TYPE ":STRING" )
@@ -317,6 +319,11 @@ if (CONFIG_BUILD_WITH_TFM)
317319 # This is the root of all TFM build artifacts.
318320 set_target_properties (tfm PROPERTIES TFM_BINARY_DIR ${TFM_BINARY_DIR} )
319321
322+ # Set TFM toolchain properties on 'tfm'
323+ set_target_properties (tfm PROPERTIES TFM_TOOLCHAIN_NS_FILE ${TFM_TOOLCHAIN_NS_FILE} )
324+ set_target_properties (tfm PROPERTIES TFM_TOOLCHAIN_PREFIX ${TFM_TOOLCHAIN_PREFIX} )
325+ set_target_properties (tfm PROPERTIES TFM_TOOLCHAIN_PATH ${TFM_TOOLCHAIN_PATH} )
326+
320327 # Set BL2 (MCUboot) executable file paths as target properties on 'tfm'
321328 # These files are produced by the TFM build system.
322329 if (CONFIG_TFM_BL2)
Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ get_target_property(TFM_NS_BIN_FILE tfm TFM_NS_BIN_FILE)
1717get_target_property (TFM_NS_HEX_FILE tfm TFM_NS_HEX_FILE)
1818get_target_property (TFM_NS_SIGNED_BIN_FILE tfm TFM_NS_SIGNED_BIN_FILE)
1919
20+ get_target_property (TFM_TOOLCHAIN_PATH tfm TFM_TOOLCHAIN_PATH)
21+ get_target_property (TFM_TOOLCHAIN_PREFIX tfm TFM_TOOLCHAIN_PREFIX)
22+ get_target_property (TFM_TOOLCHAIN_NS_FILE tfm TFM_TOOLCHAIN_NS_FILE)
23+
2024set (TFM_TEST_REPO_PATH ${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR} /../tf-m-tests)
2125
2226set (TFM_TEST_DIR "${TFM_TEST_REPO_PATH} /tests_reg/test/secure_regression" )
@@ -43,7 +47,8 @@ ExternalProject_Add(tfm_regression_test_app
4347 -S ${TFM_TEST_REPO_PATH} /tests_reg
4448 -B ${PROJECT_BINARY_DIR} /tfm_ns
4549 -DCONFIG_SPE_PATH=${TFM_BINARY_DIR} /api_ns
46- -DTFM_TOOLCHAIN_FILE=cmake/toolchain_ns_GNUARM.cmake
50+ -DTFM_TOOLCHAIN_FILE=cmake/${TFM_TOOLCHAIN_NS_FILE}
51+ -DCROSS_COMPILE=${TFM_TOOLCHAIN_PATH} /${TFM_TOOLCHAIN_PREFIX}
4752 -DQCBOR_PATH${QCBOR_PATH_TYPE} =${CONFIG_TFM_QCBOR_PATH}
4853 -DCMAKE_BUILD_TYPE=RelWithDebInfo
4954 BUILD_COMMAND ${CMAKE_COMMAND} --build .
You can’t perform that action at this time.
0 commit comments