Build: Specify compiler version in every configs
To make build configs more flexible in Open CI,
specify compiler version in each configs.
This patch makes it possible to build same config
with different versions of compiler.
Signed-off-by: Xinyu Zhang <xinyu.zhang@arm.com>
Change-Id: I88eb3e927f85731376b5a0de08533765f7b8b535
diff --git a/build_helper/build_helper_configs.py b/build_helper/build_helper_configs.py
index e233707..6cbadd1 100755
--- a/build_helper/build_helper_configs.py
+++ b/build_helper/build_helper_configs.py
@@ -30,7 +30,7 @@
# variant configuration and the wildcard replacement logic in invalid
# configuration tuples
"sort_order": ["tfm_platform",
- "toolchain_file",
+ "compiler",
"lib_model",
"isolation_level",
"test_regression",
@@ -48,7 +48,7 @@
"config_template": "cmake -G Ninja " + \
"-DTFM_PLATFORM=%(tfm_platform)s " + \
- "-DTFM_TOOLCHAIN_FILE=%(codebase_root_dir)s/%(toolchain_file)s " + \
+ "-DTFM_TOOLCHAIN_FILE=%(codebase_root_dir)s/%(compiler)s " + \
"-DTFM_LIB_MODEL=%(lib_model)s " + \
"-DTFM_ISOLATION_LEVEL=%(isolation_level)s " + \
"-DTEST_NS=%(test_regression)s -DTEST_S=%(test_regression)s " + \
@@ -67,6 +67,8 @@
"%(extra_params)s " + \
"%(codebase_root_dir)s",
+ "set_compiler_path": "export PATH=$PATH:$%(compiler)s_PATH",
+
# A small subset of string substitution params is allowed in commands.
# tfm_build_manager will replace %(_tbm_build_dir_)s, %(_tbm_code_dir_)s,
# _tbm_target_platform_ with the paths set when building
@@ -160,16 +162,16 @@
# List of all build configs that are impossible under all circumstances
_common_tfm_invalid_configs = [
# LR_CODE size exceeds limit on MUSCA_B1 & MUSCA_S1 with regression tests in Debug mode built with ARMCLANG
- ("arm/musca_b1/sse_200", "toolchain_ARMCLANG.cmake", "*", "*", True, "OFF", "Debug", "*", "*", "*", "", "*", "*"),
- ("arm/musca_s1", "toolchain_ARMCLANG.cmake", "*", "*", True, "OFF", "Debug", "*", "*", "*", "", "*", "*"),
+ ("arm/musca_b1/sse_200", "ARMCLANG_6_13", "*", "*", True, "OFF", "Debug", "*", "*", "*", "", "*", "*"),
+ ("arm/musca_s1", "ARMCLANG_6_13", "*", "*", True, "OFF", "Debug", "*", "*", "*", "", "*", "*"),
# Load range overlap on Musca for IPC Debug type: T895
- ("arm/musca_b1/sse_200", "toolchain_ARMCLANG.cmake", "*", "*", "*", "IPC", "Debug", "*", "*", "*", "*", "*", "*"),
- ("arm/musca_s1", "toolchain_ARMCLANG.cmake", "*", "*", "*", "IPC", "Debug", "*", "*", "*", "*", "*", "*"),
- # Oversize issue on config lpcxpresso55s69_GNUARM_IPC_2_Relwithdebinfo_BL2_NS_MEDIUM
- ("nxp/lpcxpresso55s69", "toolchain_GNUARM.cmake", False, "2", False, "OFF",
+ ("arm/musca_b1/sse_200", "ARMCLANG_6_13", "*", "*", "*", "IPC", "Debug", "*", "*", "*", "*", "*", "*"),
+ ("arm/musca_s1", "ARMCLANG_6_13", "*", "*", "*", "IPC", "Debug", "*", "*", "*", "*", "*", "*"),
+ # Oversize issue on config lpcxpresso55s69_GCC_IPC_2_Relwithdebinfo_BL2_NS_MEDIUM
+ ("nxp/lpcxpresso55s69", "GCC_7_3_1", False, "2", False, "OFF",
"Relwithdebinfo", "off", True, True, "profile_medium", "ON", "*"),
# Oversize issue on config stm32l562e_dk_ARMCLANG_LIB_1_REG_Release_BL2_NS
- ("stm/stm32l562e_dk", "toolchain_ARMCLANG.cmake", True, "1", True, "OFF",
+ ("stm/stm32l562e_dk", "ARMCLANG_6_13", True, "1", True, "OFF",
"Release", "off", True, True, "", "ON", "*"),
# LVL2 and LVL3 requires IPC model
("*", "*", True, "2", "*", "*", "*", "*", "*", "*", "*", "*", "*"),
@@ -244,7 +246,7 @@
# stm/stm32l562e_dk does not support Debug build type
("stm/stm32l562e_dk", "*", "*", "*", "*", "*", "Debug", "*", "*", "*", "*", "*", "*"),
# nxp/lpcxpresso55s69 only build with GCC
- ("nxp/lpcxpresso55s69", "toolchain_ARMCLANG.cmake", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*"),
+ ("nxp/lpcxpresso55s69", "ARMCLANG_6_13", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*"),
# nxp/lpcxpresso55s69 only build Profile M
("nxp/lpcxpresso55s69", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_small", "*", "*"),
("nxp/lpcxpresso55s69", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_large", "*", "*"),
@@ -257,8 +259,7 @@
# Configure build manager to build several combinations
config_AN524 = {"seed_params": {
"tfm_platform": ["arm/mps3/an524"],
- "toolchain_file": ["toolchain_GNUARM.cmake",
- "toolchain_ARMCLANG.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [True, False],
"isolation_level": ["1", "2"],
"test_regression": [True, False],
@@ -277,8 +278,7 @@
config_AN521 = {"seed_params": {
"tfm_platform": ["arm/mps2/an521"],
- "toolchain_file": ["toolchain_GNUARM.cmake",
- "toolchain_ARMCLANG.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [True, False],
"isolation_level": ["1", "2"],
"test_regression": [True, False],
@@ -298,8 +298,7 @@
config_PSA_API = {"seed_params": {
"tfm_platform": ["arm/mps2/an521", "arm/musca_b1/sse_200",
"arm/musca_s1"],
- "toolchain_file": ["toolchain_GNUARM.cmake",
- "toolchain_ARMCLANG.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [True, False],
"isolation_level": ["1", "2", "3"],
"test_regression": [False],
@@ -321,8 +320,7 @@
config_PSA_FF = {"seed_params": {
"tfm_platform": ["arm/mps2/an521", "arm/musca_b1/sse_200",
"arm/musca_s1"],
- "toolchain_file": ["toolchain_GNUARM.cmake",
- "toolchain_ARMCLANG.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [False],
"isolation_level": ["1", "2", "3"],
"test_regression": [False],
@@ -341,8 +339,7 @@
config_PSA_API_OTP = {"seed_params": {
"tfm_platform": ["arm/musca_b1/sse_200"],
- "toolchain_file": ["toolchain_GNUARM.cmake",
- "toolchain_ARMCLANG.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [True, False],
"isolation_level": ["1", "2", "3"],
"test_regression": [False],
@@ -363,8 +360,7 @@
config_PSA_FF_OTP = {"seed_params": {
"tfm_platform": ["arm/musca_b1/sse_200"],
- "toolchain_file": ["toolchain_GNUARM.cmake",
- "toolchain_ARMCLANG.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [False],
"isolation_level": ["1", "2", "3"],
"test_regression": [False],
@@ -383,8 +379,7 @@
config_PSOC64 = {"seed_params": {
"tfm_platform": ["cypress/psoc64"],
- "toolchain_file": ["toolchain_GNUARM.cmake",
- "toolchain_ARMCLANG.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [False],
"isolation_level": ["1", "2"],
"test_regression": [True],
@@ -403,8 +398,7 @@
config_STM32L562E_DK = {"seed_params": {
"tfm_platform": ["stm/stm32l562e_dk"],
- "toolchain_file": ["toolchain_GNUARM.cmake",
- "toolchain_ARMCLANG.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [True, False],
"isolation_level": ["1", "2", "3"],
"test_regression": [True, False],
@@ -430,7 +424,7 @@
config_LPCXPRESSO55S69 = {"seed_params": {
"tfm_platform": ["nxp/lpcxpresso55s69"],
- "toolchain_file": ["toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1"],
"lib_model": [False],
"isolation_level": ["2"],
"test_regression": [True, False],
@@ -449,7 +443,7 @@
config_FP = {"seed_params": {
"tfm_platform": ["arm/musca_s1"],
- "toolchain_file": ["toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_10_3"],
"lib_model": [False],
"isolation_level": ["1", "2"],
"test_regression": [True],
@@ -468,7 +462,7 @@
config_corstone1000 = {"seed_params": {
"tfm_platform": ["arm/corstone1000"],
- "toolchain_file": ["toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1"],
"lib_model": [False],
"isolation_level": ["1"],
"test_regression": [False],
@@ -487,8 +481,7 @@
config_AN519 = {"seed_params": {
"tfm_platform": ["arm/mps2/an519"],
- "toolchain_file": ["toolchain_GNUARM.cmake",
- "toolchain_ARMCLANG.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [True, False],
"isolation_level": ["1", "2"],
"test_regression": [True, False],
@@ -508,8 +501,7 @@
config_IPC = {"seed_params": {
"tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
"arm/musca_b1/sse_200"],
- "toolchain_file": ["toolchain_GNUARM.cmake",
- "toolchain_ARMCLANG.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [False],
"isolation_level": ["1", "2"],
"test_regression": [True, False],
@@ -533,8 +525,7 @@
"arm/musca_b1/secure_enclave",
"stm/stm32l562e_dk",
"nxp/lpcxpresso55s69"],
- "toolchain_file": ["toolchain_GNUARM.cmake",
- "toolchain_ARMCLANG.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [True, False],
"isolation_level": ["1", "2"],
"test_regression": [True, False],
@@ -567,8 +558,7 @@
config_tfm_test = {"seed_params": {
"tfm_platform": ["arm/mps2/an521",
"arm/musca_b1/sse_200", "arm/musca_s1"],
- "toolchain_file": ["toolchain_ARMCLANG.cmake",
- "toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [True, False],
"isolation_level": ["1", "2", "3"],
"test_regression": [True, False],
@@ -587,8 +577,7 @@
config_tfm_test2 = {"seed_params": {
"tfm_platform": ["arm/mps2/an519", "arm/mps3/an524"],
- "toolchain_file": ["toolchain_ARMCLANG.cmake",
- "toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [True, False],
"isolation_level": ["1", "2", "3"],
"test_regression": [True, False],
@@ -603,7 +592,7 @@
},
"common_params": _common_tfm_builder_cfg,
"invalid": _common_tfm_invalid_configs + [
- ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*", "*", "*",
+ ("arm/mps2/an519", "GCC_7_3_1", "*", "*", "*",
"*", "Minsizerel", "*", "*", "*", "*", "*", "*"),
]
}
@@ -611,8 +600,7 @@
config_tfm_profile = {"seed_params": {
"tfm_platform": ["arm/mps2/an519", "arm/mps2/an521",
"arm/musca_b1/sse_200"],
- "toolchain_file": ["toolchain_ARMCLANG.cmake",
- "toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [False],
"isolation_level": ["2", "3"],
"test_regression": [True, False],
@@ -627,7 +615,7 @@
},
"common_params": _common_tfm_builder_cfg,
"invalid": _common_tfm_invalid_configs + [
- ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*", "*", "*",
+ ("arm/mps2/an519", "GCC_7_3_1", "*", "*", "*",
"*", "Minsizerel", "*", "*", "*", "*", "*", "*"),
# Profile Large is only supported by AN521
("arm/mps2/an519", "*", "*", "*", "*", "*", "*", "*", "*",
@@ -639,8 +627,7 @@
config_tfm_profile_s = {"seed_params": {
"tfm_platform": ["arm/mps2/an519", "arm/mps2/an521"],
- "toolchain_file": ["toolchain_ARMCLANG.cmake",
- "toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [True],
"isolation_level": ["1"],
"test_regression": [True, False],
@@ -660,15 +647,14 @@
"*", "SFN_ENABLE")
],
"invalid": _common_tfm_invalid_configs + [
- ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*", "*", "*",
+ ("arm/mps2/an519", "GCC_7_3_1", "*", "*", "*",
"*", "Minsizerel", "*", "*", "*", "*", "*", "*")
]
}
config_tfm_test_OTP = {"seed_params": {
"tfm_platform": ["arm/musca_b1/sse_200"],
- "toolchain_file": ["toolchain_ARMCLANG.cmake",
- "toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [True, False],
"isolation_level": ["1", "2", "3"],
"test_regression": [True, False],
@@ -687,8 +673,7 @@
config_MUSCA_B1 = {"seed_params": {
"tfm_platform": ["arm/musca_b1/sse_200"],
- "toolchain_file": ["toolchain_ARMCLANG.cmake",
- "toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [True, False],
"isolation_level": ["1", "2"],
"test_regression": [True, False],
@@ -707,8 +692,7 @@
config_MUSCA_B1_SE = {"seed_params": {
"tfm_platform": ["arm/musca_b1/secure_enclave"],
- "toolchain_file": ["toolchain_ARMCLANG.cmake",
- "toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [False],
"isolation_level": ["1"],
"test_regression": [False],
@@ -727,8 +711,7 @@
config_MUSCA_S1 = {"seed_params": {
"tfm_platform": ["arm/musca_s1"],
- "toolchain_file": ["toolchain_ARMCLANG.cmake",
- "toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [True, False],
"isolation_level": ["1", "2"],
"test_regression": [True, False],
@@ -749,8 +732,7 @@
"tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
"arm/musca_b1/sse_200", "arm/musca_s1",
"arm/mps3/an524"],
- "toolchain_file": ["toolchain_ARMCLANG.cmake",
- "toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [True, False],
"isolation_level": ["1", "2", "3"],
"test_regression": [True, False],
@@ -765,7 +747,7 @@
},
"common_params": _common_tfm_builder_cfg,
"invalid": _common_tfm_invalid_configs + [
- ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*", "*", "*",
+ ("arm/mps2/an519", "GCC_7_3_1", "*", "*", "*",
"*", "Minsizerel", "*", "*", "*", "*", "*", "*"),
]
}
@@ -774,8 +756,7 @@
config_AN521_PSA_API = {"seed_params": {
"tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
"arm/musca_b1/sse_200"],
- "toolchain_file": ["toolchain_GNUARM.cmake",
- "toolchain_ARMCLANG.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [True, False],
"isolation_level": ["1", "2"],
"test_regression": [False],
@@ -793,7 +774,7 @@
},
"common_params": _common_tfm_builder_cfg,
"invalid": _common_tfm_invalid_configs + [
- ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*", "*", "*",
+ ("arm/mps2/an519", "GCC_7_3_1", "*", "*", "*",
"*", "Minsizerel", "*", "*", "*", "*", "*", "*"),
]
}
@@ -801,8 +782,7 @@
config_AN521_PSA_IPC = {"seed_params": {
"tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
"arm/musca_b1/sse_200"],
- "toolchain_file": ["toolchain_GNUARM.cmake",
- "toolchain_ARMCLANG.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [False],
"isolation_level": ["1", "2"],
"test_regression": [False],
@@ -817,7 +797,7 @@
},
"common_params": _common_tfm_builder_cfg,
"invalid": _common_tfm_invalid_configs + [
- ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*", "*", "*",
+ ("arm/mps2/an519", "GCC_7_3_1", "*", "*", "*",
"*", "Minsizerel", "*", "*", "*", "*", "*", "*"),
]
}
@@ -826,8 +806,7 @@
"tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
"arm/musca_b1/sse_200", "arm/musca_s1",
"arm/mps3/an524", "arm/musca_b1/secure_enclave"],
- "toolchain_file": ["toolchain_GNUARM.cmake",
- "toolchain_ARMCLANG.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [True, False],
"isolation_level": ["1", "2", "3"],
"test_regression": [True, False],
@@ -842,17 +821,17 @@
},
"common_params": _common_tfm_builder_cfg,
"valid": [
- # MUSCA_B1_GNUARM_IPC_1_REG_Release_BL2_NS_CC_DRIVER_PSA
- ("arm/musca_b1/sse_200", "toolchain_GNUARM.cmake",
+ # MUSCA_B1_GCC_IPC_1_REG_Release_BL2_NS_CC_DRIVER_PSA
+ ("arm/musca_b1/sse_200", "GCC_7_3_1",
False, "1", True, "OFF", "Release",
"off", True, True, "", "ON", "CC_DRIVER_PSA"),
- # MUSCA_S1_GNUARM_IPC_1_REG_Release_BL2_NS_CC_DRIVER_PSA
- ("arm/musca_s1", "toolchain_GNUARM.cmake",
+ # MUSCA_S1_GCC_IPC_1_REG_Release_BL2_NS_CC_DRIVER_PSA
+ ("arm/musca_s1", "GCC_7_3_1",
False, "1", True, "OFF", "Release",
"off", True, True, "", "ON", "CC_DRIVER_PSA"),
],
"invalid": _common_tfm_invalid_configs + [
- ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*", "*", "*",
+ ("arm/mps2/an519", "GCC_7_3_1", "*", "*", "*",
"*", "Minsizerel", "*", "*", "*", "*", "*", "*"),
("cypress/psoc64", "*", "*", "*", "*", "*", "Debug", "*",
"*", "*", "*", "*", "*"),
@@ -873,8 +852,7 @@
config_nsce = {"seed_params": {
"tfm_platform": ["arm/mps2/an521"],
- "toolchain_file": ["toolchain_GNUARM.cmake",
- "toolchain_ARMCLANG.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [True, False],
"isolation_level": ["1", "2", "3"],
"test_regression": [True],
@@ -893,8 +871,7 @@
config_mmio = {"seed_params": {
"tfm_platform": ["arm/mps2/an521"],
- "toolchain_file": ["toolchain_GNUARM.cmake",
- "toolchain_ARMCLANG.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [False],
"isolation_level": ["1"],
"test_regression": [True],
@@ -914,8 +891,7 @@
config_nightly_profile = {"seed_params": {
"tfm_platform": ["arm/mps2/an519", "arm/mps2/an521",
"arm/musca_b1/sse_200"],
- "toolchain_file": ["toolchain_ARMCLANG.cmake",
- "toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [False],
"isolation_level": ["2", "3"],
"test_regression": [True, False],
@@ -930,7 +906,7 @@
},
"common_params": _common_tfm_builder_cfg,
"invalid": _common_tfm_invalid_configs + [
- ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*", "*", "*",
+ ("arm/mps2/an519", "GCC_7_3_1", "*", "*", "*",
"*", "Minsizerel", "*", "*", "*", "*", "*", "*"),
# Profile Large is only supported by AN521
("arm/mps2/an519", "*", "*", "*", "*", "*", "*", "*", "*",
@@ -943,8 +919,7 @@
config_nightly_PSA_API = {"seed_params": {
"tfm_platform": ["arm/mps2/an521", "arm/musca_b1/sse_200",
"arm/musca_s1"],
- "toolchain_file": ["toolchain_GNUARM.cmake",
- "toolchain_ARMCLANG.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [True, False],
"isolation_level": ["1", "2", "3"],
"test_regression": [False],
@@ -966,8 +941,7 @@
config_nightly_PSA_FF = {"seed_params": {
"tfm_platform": ["arm/mps2/an521", "arm/musca_b1/sse_200",
"arm/musca_s1"],
- "toolchain_file": ["toolchain_GNUARM.cmake",
- "toolchain_ARMCLANG.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [False],
"isolation_level": ["1", "2", "3"],
"test_regression": [False],
@@ -986,8 +960,7 @@
config_nightly_OTP = {"seed_params": {
"tfm_platform": ["arm/musca_b1/sse_200"],
- "toolchain_file": ["toolchain_GNUARM.cmake",
- "toolchain_ARMCLANG.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [True, False],
"isolation_level": ["1", "2", "3"],
"test_regression": [True],
@@ -1006,8 +979,7 @@
config_nightly_psoc64 = {"seed_params": {
"tfm_platform": ["cypress/psoc64"],
- "toolchain_file": ["toolchain_GNUARM.cmake",
- "toolchain_ARMCLANG.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [False],
"isolation_level": ["1", "2"],
"test_regression": [True],
@@ -1026,7 +998,7 @@
config_nightly_LPCXPRESSO55S69 = {"seed_params": {
"tfm_platform": ["nxp/lpcxpresso55s69"],
- "toolchain_file": ["toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1"],
"lib_model": [False],
"isolation_level": ["2"],
"test_regression": [True, False],
@@ -1045,7 +1017,7 @@
config_nightly_FP = {"seed_params": {
"tfm_platform": ["arm/musca_s1"],
- "toolchain_file": ["toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_10_3"],
"lib_model": [False],
"isolation_level": ["1", "2"],
"test_regression": [True],
@@ -1065,8 +1037,7 @@
config_pp_test = {"seed_params": {
"tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
"arm/musca_s1"],
- "toolchain_file": ["toolchain_GNUARM.cmake",
- "toolchain_ARMCLANG.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [True, False],
"isolation_level": ["1", "2", "3"],
"test_regression": [True],
@@ -1081,47 +1052,47 @@
},
"common_params": _common_tfm_builder_cfg,
"valid": [
- ("arm/mps2/an521", "toolchain_GNUARM.cmake",
+ ("arm/mps2/an521", "GCC_7_3_1",
True, "1", False, "OFF", "Debug",
"off", True, True, "", "ON", ""),
- ("arm/mps2/an521", "toolchain_ARMCLANG.cmake",
+ ("arm/mps2/an521", "ARMCLANG_6_13",
False, "2", False, "OFF", "Debug",
"off", True, True, "", "ON", ""),
- ("arm/mps2/an521", "toolchain_ARMCLANG.cmake",
+ ("arm/mps2/an521", "ARMCLANG_6_13",
False, "3", False, "OFF", "Release",
"off", True, True, "", "ON", ""),
- ("arm/mps2/an521", "toolchain_GNUARM.cmake",
+ ("arm/mps2/an521", "GCC_7_3_1",
False, "2", False, "OFF", "Debug",
"off", True, True, "profile_medium", "ON", ""),
- ("arm/mps2/an521", "toolchain_GNUARM.cmake",
+ ("arm/mps2/an521", "GCC_7_3_1",
False, "3", False, "OFF", "Debug",
"off", True, True, "profile_large", "ON", ""),
- # AN521_GNUARM_IPC_2_REG_Release_BL2_NS_MEDIUM_PSOFF
- ("arm/mps2/an521", "toolchain_GNUARM.cmake",
+ # AN521_GCC_IPC_2_REG_Release_BL2_NS_MEDIUM_PSOFF
+ ("arm/mps2/an521", "GCC_7_3_1",
False, "2", True, "OFF", "Release",
"off", True, True, "profile_medium", "OFF", ""),
- # MUSCA_B1_GNUARM_LIB_1_REG_Minsizerel_BL2_NS
- ("arm/musca_b1/sse_200", "toolchain_GNUARM.cmake",
+ # MUSCA_B1_GCC_LIB_1_REG_Minsizerel_BL2_NS
+ ("arm/musca_b1/sse_200", "GCC_7_3_1",
True, "1", True, "OFF", "Minsizerel",
"off", True, True, "", "ON", ""),
# stm32l562e_dk_ARMCLANG_IPC_1_REG_Release_BL2_NS
- ("stm/stm32l562e_dk", "toolchain_ARMCLANG.cmake",
+ ("stm/stm32l562e_dk", "ARMCLANG_6_13",
False, "1", True, "OFF", "Release",
"off", True, True, "", "ON", "CRYPTO_OFF"),
- # stm32l562e_dk_GNUARM_IPC_2_REG_Release_BL2_NS
- ("stm/stm32l562e_dk", "toolchain_GNUARM.cmake",
+ # stm32l562e_dk_GCC_IPC_2_REG_Release_BL2_NS
+ ("stm/stm32l562e_dk", "GCC_7_3_1",
False, "2", False, "OFF", "Release",
"off", True, True, "", "ON", "CRYPTO_ON"),
- # stm32l562e_dk_GNUARM_IPC_3_REG_Release_BL2_NS
- ("stm/stm32l562e_dk", "toolchain_GNUARM.cmake",
+ # stm32l562e_dk_GCC_IPC_3_REG_Release_BL2_NS
+ ("stm/stm32l562e_dk", "GCC_7_3_1",
False, "3", True, "OFF", "Release",
"off", True, True, "", "ON", "CRYPTO_OFF"),
- # MUSCA_S1_GNUARM_IPC_2_REG_Release_BL2_NS_FPHARD
- ("arm/musca_s1", "toolchain_GNUARM.cmake",
+ # MUSCA_S1_GCC_IPC_2_REG_Release_BL2_NS_FPHARD
+ ("arm/musca_s1", "GCC_10_3",
False, "2", True, "OFF", "Release",
"off", True, True, "", "ON", "FPHARD"),
- # MUSCA_S1_GNUARM_IPC_1_REG_Release_BL2_NS_CC_DRIVER_PSA
- ("arm/musca_s1", "toolchain_GNUARM.cmake",
+ # MUSCA_S1_GCC_IPC_1_REG_Release_BL2_NS_CC_DRIVER_PSA
+ ("arm/musca_s1", "GCC_7_3_1",
False, "1", True, "OFF", "Release",
"off", True, True, "", "ON", "CC_DRIVER_PSA"),
],
@@ -1150,18 +1121,18 @@
"*", "*", "*", "*", "profile_medium", "*", "*"),
("arm/mps2/an521", "*", "*", "*", "*", "*",
"*", "*", "*", "*", "profile_medium", "*", "*"),
- ("*", "toolchain_GNUARM.cmake", "*", "*", "*", "*",
+ ("*", "GCC_7_3_1", "*", "*", "*", "*",
"*", "*", "*", "*", "profile_small", "*", "*"),
- ("*", "toolchain_ARMCLANG.cmake", "*", "*", "*", "*",
+ ("*", "ARMCLANG_6_13", "*", "*", "*", "*",
"*", "*", "*", "*", "profile_medium", "*", "*"),
- ("*", "toolchain_ARMCLANG.cmake", True, "*", "*", "*",
+ ("*", "ARMCLANG_6_13", True, "*", "*", "*",
"*", "*", "*", "*", "*", "*", "*"),
]
}
config_pp_OTP = {"seed_params": {
"tfm_platform": ["arm/musca_b1/sse_200"],
- "toolchain_file": ["toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1"],
"lib_model": [True, False],
"isolation_level": ["1", "2"],
"test_regression": [True],
@@ -1181,7 +1152,7 @@
# Configure build manager to build several combinations
config_pp_PSA_API = {"seed_params": {
"tfm_platform": ["arm/mps2/an521"],
- "toolchain_file": ["toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1"],
"lib_model": [False],
"isolation_level": ["2"],
"test_regression": [False],
@@ -1203,7 +1174,7 @@
config_pp_PSoC64 = {"seed_params": {
"tfm_platform": ["cypress/psoc64"],
- "toolchain_file": ["toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1"],
"lib_model": [False],
"isolation_level": ["2"],
"test_regression": [True],
@@ -1222,7 +1193,7 @@
config_cov_an519 = {"seed_params": {
"tfm_platform": ["arm/mps2/an519"],
- "toolchain_file": ["toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1"],
"lib_model": [True, False],
"isolation_level": ["1", "2", "3"],
"test_regression": [True, False],
@@ -1241,7 +1212,7 @@
config_cov_an521 = {"seed_params": {
"tfm_platform": ["arm/mps2/an521"],
- "toolchain_file": ["toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1"],
"lib_model": [True, False],
"isolation_level": ["1", "2", "3"],
"test_regression": [True, False],
@@ -1277,7 +1248,7 @@
# Configuration used in testing
config_debug = {"seed_params": {
"tfm_platform": ["arm/mps2/an521"],
- "toolchain_file": ["toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1"],
"lib_model": [True],
"isolation_level": ["1"],
"test_regression": [False],
@@ -1296,7 +1267,7 @@
config_debug_PSA_API = {"seed_params": {
"tfm_platform": ["arm/mps2/an521"],
- "toolchain_file": ["toolchain_ARMCLANG.cmake"],
+ "compiler": ["ARMCLANG_6_13"],
"lib_model": [True],
"isolation_level": ["1"],
"test_regression": [False],
@@ -1318,7 +1289,7 @@
config_debug_PSA_API_nolib = {"seed_params": {
"tfm_platform": ["arm/mps2/an521"],
- "toolchain_file": ["toolchain_ARMCLANG.cmake"],
+ "compiler": ["ARMCLANG_6_13"],
"lib_model": [False],
"isolation_level": ["1"],
"test_regression": [False],
@@ -1341,8 +1312,7 @@
# Configuration used in CI
config_ci = {"seed_params": {
"tfm_platform": ["arm/mps2/an521"],
- "toolchain_file": ["toolchain_ARMCLANG.cmake",
- "toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
"lib_model": [True, False],
"isolation_level": ["1", "2"],
"test_regression": [True, False],
@@ -1357,16 +1327,16 @@
},
"common_params": _common_tfm_builder_cfg,
"invalid": _common_tfm_invalid_configs + [
- ("*", "toolchain_ARMCLANG.cmake", False, "*", "*", "*",
+ ("*", "ARMCLANG_6_13", False, "*", "*", "*",
"*", "*", "*", "*", "*", "*", "*"),
- ("*", "toolchain_ARMCLANG.cmake", True, "1", "*", "*",
+ ("*", "ARMCLANG_6_13", True, "1", "*", "*",
"*", "*", False, "*", "*", "*", "*"),
]
}
config_lava_debug = {"seed_params": {
"tfm_platform": ["arm/mps2/an521", "arm/mps2/an519"],
- "toolchain_file": ["toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1"],
"lib_model": [True, False],
"isolation_level": ["1", "2"],
"test_regression": [True],
@@ -1381,14 +1351,14 @@
},
"common_params": _common_tfm_builder_cfg,
"invalid": _common_tfm_invalid_configs + [
- ("arm/mps2/an521", "toolchain_GNUARM.cmake", False, "2", "*", "*",
+ ("arm/mps2/an521", "GCC_7_3_1", False, "2", "*", "*",
"*", "*", True, "*", "*", "*", "*")
]
}
config_an547 = {"seed_params": {
"tfm_platform": ["arm/mps3/an547"],
- "toolchain_file": ["toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1"],
"lib_model": [False],
"isolation_level": ["1"],
"test_regression": [False],
@@ -1407,7 +1377,7 @@
config_corstone_polaris = {"seed_params": {
"tfm_platform": ["arm/mps3/corstone_polaris"],
- "toolchain_file": ["toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1"],
"lib_model": [False],
"isolation_level": ["1"],
"test_regression": [False],
@@ -1426,7 +1396,7 @@
config_bl5340 = {"seed_params": {
"tfm_platform": ["lairdconnectivity/bl5340_dvk_cpuapp"],
- "toolchain_file": ["toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1"],
"lib_model": [False],
"isolation_level": ["1"],
"test_regression": [False],
@@ -1445,7 +1415,7 @@
config_nrf5340dk = {"seed_params": {
"tfm_platform": ["nordic_nrf/nrf5340dk_nrf5340_cpuapp"],
- "toolchain_file": ["toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1"],
"lib_model": [False],
"isolation_level": ["1"],
"test_regression": [False],
@@ -1464,7 +1434,7 @@
config_nrf9160dk = {"seed_params": {
"tfm_platform": ["nordic_nrf/nrf9160dk_nrf9160"],
- "toolchain_file": ["toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1"],
"lib_model": [False],
"isolation_level": ["1"],
"test_regression": [False],
@@ -1483,7 +1453,7 @@
config_m2351 = {"seed_params": {
"tfm_platform": ["nuvoton/m2351"],
- "toolchain_file": ["toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1"],
"lib_model": [False],
"isolation_level": ["1"],
"test_regression": [False],
@@ -1502,7 +1472,7 @@
config_m2354 = {"seed_params": {
"tfm_platform": ["nuvoton/m2354"],
- "toolchain_file": ["toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1"],
"lib_model": [False],
"isolation_level": ["1"],
"test_regression": [False],
@@ -1521,7 +1491,7 @@
config_b_u585i_iot02a = {"seed_params": {
"tfm_platform": ["stm/b_u585i_iot02a"],
- "toolchain_file": ["toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1"],
"lib_model": [False],
"isolation_level": ["1"],
"test_regression": [False],
@@ -1540,7 +1510,7 @@
config_nucleo_l552ze_q = {"seed_params": {
"tfm_platform": ["stm/nucleo_l552ze_q"],
- "toolchain_file": ["toolchain_GNUARM.cmake"],
+ "compiler": ["GCC_7_3_1"],
"lib_model": [False],
"isolation_level": ["1"],
"test_regression": [False],
diff --git a/jenkins/ci.jpl b/jenkins/ci.jpl
index 5655678..1c2108a 100644
--- a/jenkins/ci.jpl
+++ b/jenkins/ci.jpl
@@ -1,6 +1,6 @@
#!/usr/bin/env groovy
//-------------------------------------------------------------------------------
-// Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
+// Copyright (c) 2020-2022, Arm Limited and Contributors. All rights reserved.
//
// SPDX-License-Identifier: BSD-3-Clause
//
@@ -25,9 +25,6 @@
"arm/corstone1000": "corstone1000",
"nxp/lpcxpresso55s69": "lpcxpresso55s69"]
-mapCompiler = ["toolchain_GNUARM.cmake": "GNUARM",
- "toolchain_ARMCLANG.cmake": "ARMCLANG"]
-
mapBL2 = ["True": "--bl2",
"False": ""]
@@ -100,7 +97,7 @@
value: mapPlatform[build_params["TFM_PLATFORM"]])
}
params += string(name: "COMPILER", \
- value: mapCompiler[build_params["TOOLCHAIN_FILE"]])
+ value: build_params["COMPILER"].split('_')[0])
params += string(name: "PSA_API_SUITE", \
value: mapTestPsaApi[build_params["TEST_PSA_API"]])
@@ -247,10 +244,10 @@
}
// Only submit LAVA test for a specified OTP enabled config in nightly or release job
else if (params_collection["OTP"] == "ENABLED" && \
- params_collection["CONFIG_NAME"] != "MUSCA_B1_GNUARM_PSA_3_REG_Debug_OTP_BL2_NS") {
+ params_collection["CONFIG_NAME"] != "MUSCA_B1_GCC_PSA_3_REG_Debug_OTP_BL2_NS") {
print("LAVA is not needed for ${build_url}")
}
- else if (params_collection["CONFIG_NAME"] == "MUSCA_B1_GNUARM_PSA_3_REG_Debug_OTP_BL2_NS" && \
+ else if (params_collection["CONFIG_NAME"] == "MUSCA_B1_GCC_PSA_3_REG_Debug_OTP_BL2_NS" && \
!(env.JOB_NAME.equals("tf-m-nightly") || env.JOB_NAME.equals("tf-m-release"))) {
print("LAVA is not needed for ${build_url}")
}
@@ -348,7 +345,7 @@
resultsParam.add([result.value[1], \
result.value[0].getResult(), \
result.value[2]['TFM_PLATFORM'], \
- result.value[2]['TOOLCHAIN_FILE'], \
+ result.value[2]['COMPILER'].split('_')[0], \
result.value[2]['CMAKE_BUILD_TYPE'], \
result.value[2]['BL2'], \
result.value[2]['NS'], \
@@ -367,7 +364,7 @@
result[2] = 'arm/musca_b1/sse_200_OTP'
}
}
- result[3] = mapCompiler[result[3]]
+ result[3] = result[3].split('_')[0]
build_params = result[7..12]
configName = ""
for (map_cfg in mapConfigs) {
diff --git a/lava_helper/lava_helper_configs.py b/lava_helper/lava_helper_configs.py
index 004f0bc..50534d6 100644
--- a/lava_helper/lava_helper_configs.py
+++ b/lava_helper/lava_helper_configs.py
@@ -141,7 +141,7 @@
"poweroff_timeout": 1,
"recovery_store_url": "https://ci.trustedfirmware.org/userContent/",
"platforms": {"AN521": "mps2_sse200_an512_new.tar.gz"},
- "compilers": ["GNUARM", "ARMCLANG"],
+ "compilers": ["GCC", "ARMCLANG"],
"build_types": ["Debug", "Release", "Minsizerel"],
"boot_types": ["BL2"],
"binaries": {
@@ -222,7 +222,7 @@
"monitor_timeout": 15,
"poweroff_timeout": 1,
"platforms": {"AN521": ""},
- "compilers": ["GNUARM", "ARMCLANG"],
+ "compilers": ["GCC", "ARMCLANG"],
"build_types": ["Debug", "Release", "Minsizerel"],
"boot_types": ["BL2"],
"data_bin_offset": "0x10080000",
@@ -306,7 +306,7 @@
"monitor_timeout": 15,
"poweroff_timeout": 1,
"platforms": {"AN521": ""},
- "compilers": ["GNUARM", "ARMCLANG"],
+ "compilers": ["GCC", "ARMCLANG"],
"build_types": ["Debug", "Release", "Minsizerel"],
"boot_types": ["NOBL2"],
"data_bin_offset": "0x00100000",
@@ -374,7 +374,7 @@
"monitor_timeout": 15,
"poweroff_timeout": 1,
"platforms": {"AN519": ""},
- "compilers": ["GNUARM", "ARMCLANG"],
+ "compilers": ["GCC", "ARMCLANG"],
"build_types": ["Debug", "Release", "Minsizerel"],
"boot_types": ["BL2"],
"data_bin_offset": "0x10080000",
@@ -430,7 +430,7 @@
"monitor_timeout": 15,
"poweroff_timeout": 1,
"platforms": {"AN519": ""},
- "compilers": ["GNUARM", "ARMCLANG"],
+ "compilers": ["GCC", "ARMCLANG"],
"build_types": ["Debug", "Release", "Minsizerel"],
"boot_types": ["NOBL2"],
"data_bin_offset": "0x00100000",
@@ -483,7 +483,7 @@
"action_timeout": 300,
"poweroff_timeout": 20,
"platforms": {"AN521": ""},
- "compilers": ["GNUARM", "ARMCLANG"],
+ "compilers": ["GCC", "ARMCLANG"],
"build_types": ["Debug", "Release"],
"boot_types": ["BL2"],
"binaries": {
@@ -522,7 +522,7 @@
"monitor_timeout": 30,
"poweroff_timeout": 40,
"platforms": {"MUSCA_B1": ""},
- "compilers": ["GNUARM", "ARMCLANG"],
+ "compilers": ["GCC", "ARMCLANG"],
"build_types": ["Debug", "Release", "Minsizerel"],
"boot_types": ["BL2"],
"binaries": {
@@ -580,7 +580,7 @@
"monitor_timeout": 30,
"poweroff_timeout": 40,
"platforms": {"MUSCA_B1_OTP": ""},
- "compilers": ["GNUARM"],
+ "compilers": ["GCC"],
"build_types": ["Debug"],
"boot_types": ["BL2"],
"binaries": {
@@ -603,7 +603,7 @@
"monitor_timeout": 15,
"poweroff_timeout": 5,
"platforms": {"stm32l562e_dk": ""},
- "compilers": ["GNUARM", "ARMCLANG"],
+ "compilers": ["GCC", "ARMCLANG"],
"build_types": ["Release", "Minsizerel"],
"boot_types": ["BL2"],
"binaries": {
@@ -635,7 +635,7 @@
"monitor_timeout": 15,
"poweroff_timeout": 5,
"platforms": {"lpcxpresso55s69": ""},
- "compilers": ["GNUARM"],
+ "compilers": ["GCC"],
"build_types": ["Relwithdebinfo"],
"boot_types": ["NOBL2"],
"binaries": {
@@ -661,7 +661,7 @@
"monitor_timeout": 120,
"poweroff_timeout": 5,
"platforms": {"psoc64": ""},
- "compilers": ["GNUARM", "ARMCLANG"],
+ "compilers": ["GCC", "ARMCLANG"],
"build_types": ["Release", "Minsizerel"],
"boot_types": ["NOBL2"],
"binaries": {
diff --git a/memory_footprint.py b/memory_footprint.py
index 1447878..9aab726 100644
--- a/memory_footprint.py
+++ b/memory_footprint.py
@@ -139,7 +139,7 @@
cfg.with_bl2 and cfg.with_ns and
cfg.profile == "profile_large" and cfg.partition_ps == "ON"):
name_config = "DefaultProfileL"
- ret = [cfg.tfm_platform,cfg.toolchain_file, name_config]
+ ret = [cfg.tfm_platform,cfg.compiler, name_config]
except:
ret = ["Unknown", "Unknown", "Unknown"]
return ret
diff --git a/run-build.sh b/run-build.sh
index 20f602b..2302479 100755
--- a/run-build.sh
+++ b/run-build.sh
@@ -29,20 +29,10 @@
python --version
make --version
-# Export specific compiler path to env PATH
-compiler_path="${COMPILER_VERSION}_PATH"
-export PATH=$PATH:"${!compiler_path}"
-# Show compiler version
-if [[ $COMPILER_VERSION =~ "ARMCLANG" ]] ; then
- armclang --version
-else
- arm-none-eabi-gcc --version
-fi
-
set -ex
build_commands=$(python3 tf-m-ci-scripts/configs.py -b -g all $CONFIG_NAME)
-if [ $CODE_COVERAGE_EN = "TRUE" ] && [[ $CONFIG_NAME =~ "GNUARM" ]] ; then
+if [ $CODE_COVERAGE_EN = "TRUE" ] && [[ $CONFIG_NAME =~ "GCC" ]] ; then
build_commands=${build_commands/toolchain_GNUARM.cmake/toolchain_GNUARM.cmake -DTFM_CODE_COVERAGE=True}
echo "Flag: Add compiler flag for build with code coverage supported."
echo $build_commands
diff --git a/tfm_ci_pylib/tfm_build_manager.py b/tfm_ci_pylib/tfm_build_manager.py
index a368c3e..b00564b 100644
--- a/tfm_ci_pylib/tfm_build_manager.py
+++ b/tfm_ci_pylib/tfm_build_manager.py
@@ -5,6 +5,7 @@
Controlling class managing multiple build configruations for tfm """
from __future__ import print_function
+from json import tool
__copyright__ = """
/*
@@ -53,9 +54,6 @@
"stm/b_u585i_iot02a": "b_u585i_iot02a",
"stm/nucleo_l552ze_q": "nucleo_l552ze_q"}
-mapCompiler = {"toolchain_GNUARM.cmake": "GNUARM",
- "toolchain_ARMCLANG.cmake": "ARMCLANG"}
-
mapTestPsaApi = {"IPC": "FF",
"CRYPTO": "CRYPTO",
"INITIAL_ATTESTATION": "ATTEST",
@@ -125,22 +123,23 @@
super(TFM_Build_Manager, self).__init__(name="TFM_Build_Manager")
- def set_compiler_version(self, config):
- compiler_version = ""
- # Set GCC version
- if "GNUARM" in config.toolchain_file:
- if "FPHARD" in config.extra_params:
- # TF-M FPU feature requires GCC v10.3
- compiler_version = "GCC_10_3"
- else:
- # Use GCC v7.3.1 by default
- compiler_version = "GCC_7_3_1"
- # Set ARMClang version
- elif "ARMCLANG" in config.toolchain_file:
- # Use ARMClang v6.13 by default
- compiler_version = "ARMCLANG_6_13"
+ def choose_toolchain(self, compiler):
+ toolchain = ""
+ if "GCC"in compiler:
+ toolchain = "toolchain_GNUARM.cmake"
+ elif "ARMCLANG" in compiler:
+ toolchain = "toolchain_ARMCLANG.cmake"
- return compiler_version
+ return toolchain
+
+ def get_compiler_name(self, compiler):
+ compiler_name = ""
+ if "GCC"in compiler:
+ compiler_name = "arm-none-eabi-gcc"
+ elif "ARMCLANG" in compiler:
+ compiler_name = "armclang"
+
+ return compiler_name
def get_config(self):
return list(self._tbm_build_cfg.keys())
@@ -158,8 +157,7 @@
argument_list = [
"CONFIG_NAME={}",
"TFM_PLATFORM={}",
- "TOOLCHAIN_FILE={}",
- "COMPILER_VERSION={}",
+ "COMPILER={}",
"LIB_MODEL={}",
"ISOLATION_LEVEL={}",
"TEST_REGRESSION={}",
@@ -177,8 +175,7 @@
.format(
config,
config_details.tfm_platform,
- config_details.toolchain_file,
- self.set_compiler_version(config_details),
+ config_details.compiler,
config_details.lib_model,
config_details.isolation_level,
config_details.test_regression,
@@ -198,8 +195,12 @@
config_details = self._tbm_build_cfg[config]
codebase_dir = os.path.join(os.getcwd(),"trusted-firmware-m")
build_dir=os.path.join(os.getcwd(),"trusted-firmware-m/build")
- build_config = self.get_build_config(config_details, config, silence=silence_stderr, build_dir=build_dir, codebase_dir=codebase_dir)
- build_commands = [build_config["config_template"]]
+ build_config = self.get_build_config(config_details, config, \
+ silence=silence_stderr, \
+ build_dir=build_dir, \
+ codebase_dir=codebase_dir)
+ build_commands = [build_config["set_compiler_path"], \
+ build_config["config_template"]]
for command in build_config["build_cmds"]:
build_commands.append(command)
print(" ;\n".join(build_commands))
@@ -435,9 +436,15 @@
#run in a docker, usually docker with CPUs less than 8
thread_no = " -j " + str(os.cpu_count())
build_cfg["build_cmds"][0] += thread_no
+
+ # Overwrite command lines to set compiler
+ build_cfg["set_compiler_path"] %= {"compiler": i.compiler}
+ build_cfg["set_compiler_path"] += " ;\n{} --version".format(self.get_compiler_name(i.compiler))
+
+ # Overwrite command lines of cmake
overwrite_params = {"codebase_root_dir": build_cfg["codebase_root_dir"],
"tfm_platform": i.tfm_platform,
- "toolchain_file": i.toolchain_file,
+ "compiler": self.choose_toolchain(i.compiler),
"lib_model": i.lib_model,
"isolation_level": i.isolation_level,
"test_regression": i.test_regression,
@@ -459,6 +466,7 @@
if len(build_cfg["build_cmds"]) > 1:
overwrite_build_dir = {"_tbm_build_dir_": build_dir}
build_cfg["build_cmds"][1] %= overwrite_build_dir
+
return build_cfg
def post_eval(self):
@@ -616,7 +624,7 @@
# Convert named tuples to string in a brief format
config_param = []
config_param.append(mapPlatform[list(i)[0]])
- config_param.append(mapCompiler[list(i)[1]])
+ config_param.append(list(i)[1].split("_")[0])
if list(i)[2]: # LIB_MODEL
config_param.append("LIB")
else: