Skip to content

Commit 37a3ac9

Browse files
committed
trusted-firmware-m: pass toolchain prefix & path to GCC toolchain
Allow the toolchain path and prefix to be passed via CMake as user configuration to the GNU ARM Embedded toolchain configuration file Signed-off-by: Ioannis Glaropoulos <[email protected]>
1 parent faf312c commit 37a3ac9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ function(trusted_firmware_build)
101101
${TFM_ISOLATION_LEVEL_ARG}
102102
${TFM_REGRESSION_ARG}
103103
-DTFM_TEST_REPO_PATH=${ZEPHYR_TFM_MODULE_DIR}/tf-m-tests
104+
-DTFM_TOOLCHAIN_PATH=${TFM_TOOLCHAIN_PATH}
105+
-DTFM_TOOLCHAIN_PREFIX=${TFM_TOOLCHAIN_PREFIX}
104106
BUILD_ALWAYS True
105107
USES_TERMINAL_BUILD True
106108
BUILD_BYPRODUCTS ${VENEERS_FILE} ${PSA_API_NS_PATH}

trusted-firmware-m/toolchain_GNUARM.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ set(TFM_CMAKE_TOOLCHAIN_FILE_LOADED YES)
1010
set(CMAKE_SYSTEM_NAME Generic)
1111
set(CMAKE_SYSTEM_PROCESSOR arm)
1212

13-
set(CMAKE_C_COMPILER arm-none-eabi-gcc)
14-
set(CMAKE_ASM_COMPILER arm-none-eabi-gcc)
13+
set(CMAKE_C_COMPILER "${TFM_TOOLCHAIN_PATH}/bin/${TFM_TOOLCHAIN_PREFIX}-gcc")
14+
set(CMAKE_ASM_COMPILER "${TFM_TOOLCHAIN_PATH}/bin/${TFM_TOOLCHAIN_PREFIX}-gcc")
1515

1616
# Tell CMake not to try to link executables during its checks
1717
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)

0 commit comments

Comments
 (0)