blob: bbdebb97906f3d657d4565d8ea89a2ecf7380632 [file] [log] [blame]
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001#!/usr/bin/env python3
2
3""" builtin_configs.py:
4
5 Default configuration files used as reference """
6
7from __future__ import print_function
8
9__copyright__ = """
10/*
Raef Coles61b43a42022-01-12 11:42:57 +000011 * Copyright (c) 2018-2022, Arm Limited. All rights reserved.
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +010012 *
13 * SPDX-License-Identifier: BSD-3-Clause
14 *
15 */
16 """
Karl Zhang08681e62020-10-30 13:56:03 +080017
18__author__ = "tf-m@lists.trustedfirmware.org"
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +010019__project__ = "Trusted Firmware-M Open CI"
Xinyu Zhang06286a92021-07-22 14:00:51 +080020__version__ = "1.4.0"
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +010021
Paul Sokolovsky3e8fce02022-04-07 01:23:30 +030022from copy import deepcopy
23
24
Minos Galanakisea421232019-06-20 17:11:28 +010025# common parameters for tf-m build system
26# This configuration template will be passed into the tfm-builder module after
27# the template evaluation is converted to a command
28
29_common_tfm_builder_cfg = {
30 "config_type": "tf-m",
31 "codebase_root_dir": "tf-m",
32 # Order to which the variants are evaluated. This affects the name of
33 # variant configuration and the wildcard replacement logic in invalid
34 # configuration tuples
Xinyu Zhangb708f572020-09-15 11:43:46 +080035 "sort_order": ["tfm_platform",
Xinyu Zhang433771e2022-04-01 16:49:17 +080036 "compiler",
Xinyu Zhang73ed2992021-09-15 11:38:23 +080037 "lib_model",
Xinyu Zhangb708f572020-09-15 11:43:46 +080038 "isolation_level",
39 "test_regression",
40 "test_psa_api",
Minos Galanakisea421232019-06-20 17:11:28 +010041 "cmake_build_type",
Xinyu Zhangb708f572020-09-15 11:43:46 +080042 "with_bl2",
43 "with_ns",
Xinyu Zhang9fd74242020-10-22 11:30:50 +080044 "profile",
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +080045 "partition_ps",
Xinyu Zhangfd2e1152021-12-17 18:09:01 +080046 "extra_params"],
Minos Galanakisea421232019-06-20 17:11:28 +010047
48 # Keys for the templace will come from the combinations of parameters
49 # provided in the seed dictionary.
50
Xinyu Zhangf3e19482022-01-11 15:48:13 +080051 "config_template": "cmake -G Ninja " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080052 "-DTFM_PLATFORM=%(tfm_platform)s " + \
Xinyu Zhang433771e2022-04-01 16:49:17 +080053 "-DTFM_TOOLCHAIN_FILE=%(codebase_root_dir)s/%(compiler)s " + \
Xinyu Zhang73ed2992021-09-15 11:38:23 +080054 "-DTFM_LIB_MODEL=%(lib_model)s " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080055 "-DTFM_ISOLATION_LEVEL=%(isolation_level)s " + \
56 "-DTEST_NS=%(test_regression)s -DTEST_S=%(test_regression)s " + \
Raef Coles61b43a42022-01-12 11:42:57 +000057 "-DTEST_BL2=%(test_regression)s " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080058 "-DCMAKE_BUILD_TYPE=%(cmake_build_type)s " + \
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +080059 "-DTEST_PSA_API=%(test_psa_api)s " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080060 "-DBL2=%(with_bl2)s " + \
61 "-DNS=%(with_ns)s " + \
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +080062 "-DTFM_PROFILE=%(profile)s " + \
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +080063 "-DTFM_PARTITION_PROTECTED_STORAGE=%(partition_ps)s " + \
64 "%(extra_params)s " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080065 "-DTFM_TEST_REPO_PATH=%(codebase_root_dir)s/../tf-m-tests " + \
66 "-DMBEDCRYPTO_PATH=%(codebase_root_dir)s/../mbedtls " + \
67 "-DPSA_ARCH_TESTS_PATH=%(codebase_root_dir)s/../psa-arch-tests " + \
68 "-DMCUBOOT_PATH=%(codebase_root_dir)s/../mcuboot " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080069 "%(codebase_root_dir)s",
Karl Zhangaff558a2020-05-15 14:28:23 +010070
Xinyu Zhang433771e2022-04-01 16:49:17 +080071 "set_compiler_path": "export PATH=$PATH:$%(compiler)s_PATH",
72
Minos Galanakisea421232019-06-20 17:11:28 +010073 # A small subset of string substitution params is allowed in commands.
74 # tfm_build_manager will replace %(_tbm_build_dir_)s, %(_tbm_code_dir_)s,
75 # _tbm_target_platform_ with the paths set when building
76
Xinyu Zhangb708f572020-09-15 11:43:46 +080077 "artifact_capture_rex": (r'%(_tbm_build_dir_)s/bin'
Minos Galanakisea421232019-06-20 17:11:28 +010078 r'/(\w+\.(?:axf|bin|hex))$'),
79
80 # ALL commands will be executed for every build.
81 # Other keys will append extra commands when matching target_platform
Fathi Boudra83e4f292020-12-04 22:33:40 +010082 "build_cmds": {"all": ["cmake --build ./ -- install"],
Summer Qin3c2b5722021-05-26 10:43:45 +080083 "arm/musca_b1/sse_200": [("srec_cat "
Mark Horvath8d281cd2020-12-07 15:20:26 +010084 "%(_tbm_build_dir_)s/bin/"
85 "bl2.bin "
86 "-Binary -offset 0xA000000 "
87 "-fill 0xFF 0xA000000 0xA020000 "
88 "%(_tbm_build_dir_)s/bin/"
89 "tfm_s_ns_signed.bin "
90 "-Binary -offset 0xA020000 "
91 "-fill 0xFF 0xA020000 0xA200000 "
92 "-o %(_tbm_build_dir_)s/bin/"
93 "tfm.hex -Intel")],
Summer Qin3c2b5722021-05-26 10:43:45 +080094 "arm/musca_s1": [("srec_cat "
Xinyu Zhangb708f572020-09-15 11:43:46 +080095 "%(_tbm_build_dir_)s/bin/"
96 "bl2.bin "
Karl Zhangeffed972020-06-30 15:48:01 +080097 "-Binary -offset 0xA000000 "
Raef Coles543aab32020-12-03 11:12:02 +000098 "-fill 0xFF 0xA000000 0xA020000 "
Xinyu Zhangb708f572020-09-15 11:43:46 +080099 "%(_tbm_build_dir_)s/bin/"
Xinyu Zhang694eb492020-11-04 18:29:08 +0800100 "tfm_s_ns_signed.bin "
Raef Coles543aab32020-12-03 11:12:02 +0000101 "-Binary -offset 0xA020000 "
102 "-fill 0xFF 0xA020000 0xA200000 "
103 "-o %(_tbm_build_dir_)s/bin/"
Arthur She19c0e1a2021-06-02 11:06:19 -0700104 "tfm.hex -Intel")],
105 "stm/stm32l562e_dk": [("echo 'STM32L562E-DK board post process';"
106 "%(_tbm_build_dir_)s/postbuild.sh;"
107 "pushd %(_tbm_build_dir_)s;"
Arthur She07c91b52021-07-15 15:03:10 -0700108 "BIN_FILES=$(grep -o '\/.*\.bin' TFM_UPDATE.sh | sed 's/^/bin/');"
109 "tar jcf ./bin/stm32l562e-dk-tfm.tar.bz2 regression.sh TFM_UPDATE.sh ${BIN_FILES};"
Arthur She3c0dadd2021-11-18 21:17:48 -0800110 "popd")],
111 "nxp/lpcxpresso55s69": [("echo 'LPCXpresso55S69 board post process\n';"
112 "if [ -f \"%(_tbm_build_dir_)s/bin/bl2.hex\" ]; then FLASH_FILE='flash_bl2_JLink.py'; else FLASH_FILE='flash_JLink.py'; fi;"
113 "pushd %(_tbm_build_dir_)s/../platform/ext/target/nxp/lpcxpresso55s69/scripts;"
114 "LN=$(grep -n 'JLinkExe' ${FLASH_FILE}|awk -F: '{print $1}');"
115 "sed -i \"${LN}s/.*/ print('flash.jlink generated')/\" ${FLASH_FILE};"
116 "python3 ./${FLASH_FILE};"
117 "cd %(_tbm_build_dir_)s/bin;"
118 "BIN_FILES=$(grep loadfile flash.jlink | awk '{print $2}');"
119 "tar jcf lpcxpresso55s69-tfm.tar.bz2 flash.jlink ${BIN_FILES};"
Arthur She87602dc2022-02-06 14:42:18 -0800120 "popd")],
121 "cypress/psoc64": [("echo 'Sign binaries for Cypress PSoC64 platform';"
122 "pushd %(_tbm_build_dir_)s/..;"
123 "sudo /usr/local/bin/cysecuretools "
124 "--policy platform/ext/target/cypress/psoc64/security/policy/policy_multi_CM0_CM4_tfm.json "
125 "--target cy8ckit-064s0s2-4343w "
126 "sign-image "
127 "--hex %(_tbm_build_dir_)s/bin/tfm_s.hex "
128 "--image-type BOOT --image-id 1;"
129 "sudo /usr/local/bin/cysecuretools "
130 "--policy platform/ext/target/cypress/psoc64/security/policy/policy_multi_CM0_CM4_tfm.json "
131 "--target cy8ckit-064s0s2-4343w "
132 "sign-image "
133 "--hex %(_tbm_build_dir_)s/bin/tfm_ns.hex "
134 "--image-type BOOT --image-id 16;"
135 "mv %(_tbm_build_dir_)s/bin/tfm_s.hex %(_tbm_build_dir_)s/bin/tfm_s_signed.hex;"
136 "mv %(_tbm_build_dir_)s/bin/tfm_ns.hex %(_tbm_build_dir_)s/bin/tfm_ns_signed.hex;"
137 "popd")]
Minos Galanakisea421232019-06-20 17:11:28 +0100138 },
139
140 # (Optional) If set will fail if those artefacts are missing post build
141 "required_artefacts": {"all": [
Xinyu Zhangb708f572020-09-15 11:43:46 +0800142 "%(_tbm_build_dir_)s/bin/"
143 "tfm_s.bin",
144 "%(_tbm_build_dir_)s/bin/"
145 "tfm_ns.bin"],
Summer Qin3c2b5722021-05-26 10:43:45 +0800146 "arm/musca_b1/sse_200": [
Xinyu Zhangb708f572020-09-15 11:43:46 +0800147 "%(_tbm_build_dir_)s/bin/"
148 "tfm.hex",
149 "%(_tbm_build_dir_)s/bin/"
Xinyu Zhang694eb492020-11-04 18:29:08 +0800150 "bl2.bin",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800151 "%(_tbm_build_dir_)s/bin/"
152 "tfm_sign.bin"],
Summer Qin3c2b5722021-05-26 10:43:45 +0800153 "arm/musca_s1": [
Xinyu Zhangb708f572020-09-15 11:43:46 +0800154 "%(_tbm_build_dir_)s/bin/"
155 "tfm.hex",
156 "%(_tbm_build_dir_)s/bin/"
Xinyu Zhang694eb492020-11-04 18:29:08 +0800157 "bl2.bin",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800158 "%(_tbm_build_dir_)s/bin/"
159 "tfm_sign.bin"]
Minos Galanakisea421232019-06-20 17:11:28 +0100160 }
161}
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100162
Xinyu Zhangb708f572020-09-15 11:43:46 +0800163# List of all build configs that are impossible under all circumstances
164_common_tfm_invalid_configs = [
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800165 # GCC defect
Xinyu Zhang589fd052022-04-19 17:54:16 +0800166 ("arm/mps2/an519", "GCC_7_3_1", "*", "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhang459a1982021-07-21 22:34:49 +0800167 # LR_CODE size exceeds limit on MUSCA_B1 & MUSCA_S1 with regression tests in Debug mode built with ARMCLANG
Xinyu Zhang589fd052022-04-19 17:54:16 +0800168 ("arm/musca_b1/sse_200", "ARMCLANG_6_13", "*", "*", True, "OFF", "Debug", "*", "*", "", "*", "*"),
169 ("arm/musca_s1", "ARMCLANG_6_13", "*", "*", True, "OFF", "Debug", "*", "*", "", "*", "*"),
Karl Zhangc858a722021-03-22 21:38:19 +0800170 # Load range overlap on Musca for IPC Debug type: T895
Xinyu Zhang589fd052022-04-19 17:54:16 +0800171 ("arm/musca_b1/sse_200", "ARMCLANG_6_13", "*", "*", "*", "IPC", "Debug", "*", "*", "*", "*", "*"),
172 ("arm/musca_s1", "ARMCLANG_6_13", "*", "*", "*", "IPC", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800173 # LVL2 and LVL3 requires IPC model
Xinyu Zhang589fd052022-04-19 17:54:16 +0800174 ("*", "*", True, "2", "*", "*", "*", "*", "*", "*", "*", "*"),
175 ("*", "*", True, "3", "*", "*", "*", "*", "*", "*", "*", "*"),
Paul Sokolovsky75f67e82022-05-02 15:39:41 +0300176 # FF does not support library model
177 ("*", "*", True, "*", "*", "IPC", "*", "*", "*", "*", "*", "*"),
178 # FF does not support L3
179 ("*", "*", "*", "3", "*", "IPC", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800180 # Regression requires NS
Xinyu Zhang589fd052022-04-19 17:54:16 +0800181 ("*", "*", "*", "*", True, "*", "*", "*", False, "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800182 # Musca requires BL2
Xinyu Zhang589fd052022-04-19 17:54:16 +0800183 ("arm/musca_b1/sse_200", "*", "*", "*", "*", "*", "*", False, "*", "*", "*", "*"),
184 ("arm/musca_s1", "*", "*", "*", "*", "*", "*", False, "*", "*", "*", "*"),
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800185 # Only AN521 and MUSCA_B1 support Isolation Level 3
Xinyu Zhang589fd052022-04-19 17:54:16 +0800186 ("arm/mps2/an519", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
187 ("arm/mps3/an524", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
188 ("arm/musca_s1", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800189 ]
190
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100191# Configure build manager to build several combinations
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800192# Config group for per-patch job
193config_pp_test = {"seed_params": {
194 # AN519_ARMCLANG_IPC_1_REG_Debug_BL2_NS
195 "tfm_platform": ["arm/mps2/an519"],
196 "compiler": ["ARMCLANG_6_13"],
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800197 "lib_model": [False],
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800198 "isolation_level": ["1"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800199 "test_regression": [True],
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800200 "test_psa_api": ["OFF"],
201 "cmake_build_type": ["Debug"],
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800202 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800203 "with_ns": [True],
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800204 "profile": [""],
205 "partition_ps": ["ON"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800206 "extra_params": [""]
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800207 },
208 "common_params": _common_tfm_builder_cfg,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800209 "valid": [
210 # AN519_ARMCLANG_IPC_2_REG_Release_BL2_NS
211 ("arm/mps2/an519", "ARMCLANG_6_13", False, "2", True,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800212 "OFF", "Release", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800213 # AN519_GCC_IPC_1_REG_Debug_BL2_NS
214 ("arm/mps2/an519", "GCC_7_3_1", False, "1", True,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800215 "OFF", "Debug", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800216 # AN519_GCC_IPC_2_REG_Release_BL2_NS
217 ("arm/mps2/an519", "GCC_7_3_1", False, "2", True,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800218 "OFF", "Release", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800219 # AN519_GCC_LIB_1_REG_Debug_BL2_NS
220 ("arm/mps2/an519", "GCC_7_3_1", True, "1", True,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800221 "OFF", "Debug", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800222 # AN521_ARMCLANG_IPC_1_REG_Debug_BL2_NS
223 ("arm/mps2/an521", "ARMCLANG_6_13", False, "1", True,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800224 "OFF", "Debug", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800225 # AN521_ARMCLANG_IPC_2_Debug_BL2_NS
226 ("arm/mps2/an521", "ARMCLANG_6_13", False, "2", False,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800227 "OFF", "Debug", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800228 # AN521_ARMCLANG_IPC_2_REG_Release_BL2_NS
229 ("arm/mps2/an521", "ARMCLANG_6_13", False, "2", True,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800230 "OFF", "Release", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800231 # AN521_ARMCLANG_IPC_3_REG_Minsizerel_BL2_NS
232 ("arm/mps2/an521", "ARMCLANG_6_13", False, "3", True,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800233 "OFF", "Minsizerel", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800234 # AN521_ARMCLANG_IPC_3_Release_BL2_NS
235 ("arm/mps2/an521", "ARMCLANG_6_13", False, "3", False,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800236 "OFF", "Release", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800237 # AN521_GCC_IPC_1_REG_Debug_BL2_NS
238 ("arm/mps2/an521", "GCC_7_3_1", False, "1", True,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800239 "OFF", "Debug", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800240 # AN521_GCC_IPC_2_Debug_BL2_NS_MEDIUM
241 ("arm/mps2/an521", "GCC_7_3_1", False, "2", False, "OFF",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800242 "Debug", True, True, "profile_medium", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800243 # AN521_GCC_IPC_2_REG_Release_BL2_NS
244 ("arm/mps2/an521", "GCC_7_3_1", False, "2", True,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800245 "OFF", "Release", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800246 # AN521_GCC_IPC_3_Debug_BL2_NS_LARGE
247 ("arm/mps2/an521", "GCC_7_3_1", False, "3", False, "OFF",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800248 "Debug", True, True, "profile_large", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800249 # AN521_GCC_IPC_3_REG_Minsizerel_BL2_NS
250 ("arm/mps2/an521", "GCC_7_3_1", False, "3", True,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800251 "OFF", "Minsizerel", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800252 # AN521_GCC_LIB_1_Debug_BL2_NS
253 ("arm/mps2/an521", "GCC_7_3_1", True, "1", False,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800254 "OFF", "Debug", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800255 # AN521_GCC_LIB_1_REG_Debug_BL2_NS
256 ("arm/mps2/an521", "GCC_7_3_1", True, "1", True,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800257 "OFF", "Debug", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800258 # AN521_GCC_IPC_2_REG_Release_BL2_NS_MEDIUM_PSOFF
259 ("arm/mps2/an521", "GCC_7_3_1",
260 False, "2", True, "OFF", "Release",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800261 True, True, "profile_medium", "OFF", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800262 # AN552_GNUARM_IPC_1_REG_Debug_BL2_NS
263 ("arm/mps3/an552", "GCC_10_3", False, "1", True, "OFF",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800264 "Debug", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800265 # AN552_GNUARM_IPC_1_REG_Release_BL2_NS
266 ("arm/mps3/an552", "GCC_10_3", False, "1", True, "OFF",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800267 "Release", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800268 # MUSCA_B1_GCC_LIB_1_REG_Minsizerel_BL2_NS
269 ("arm/musca_b1/sse_200", "GCC_7_3_1", True, "1", True,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800270 "OFF", "Minsizerel", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800271 # MUSCA_S1_ARMCLANG_IPC_2_REG_Release_BL2_NS
272 ("arm/musca_s1", "ARMCLANG_6_13", False, "2", True, "OFF",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800273 "Release", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800274 # MUSCA_S1_GCC_IPC_1_REG_Debug_BL2_NS
275 ("arm/musca_s1", "GCC_10_3", False, "1", True, "OFF",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800276 "Debug", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800277 # MUSCA_S1_GCC_IPC_2_REG_Release_BL2_NS
278 ("arm/musca_s1", "GCC_10_3", False, "2", True, "OFF",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800279 "Release", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800280 # MUSCA_S1_GCC_LIB_1_REG_Debug_BL2_NS
281 ("arm/musca_s1", "GCC_10_3", True, "1", True, "OFF",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800282 "Debug", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800283 # MUSCA_S1_GCC_IPC_2_REG_Release_BL2_NS_FPHARD
284 ("arm/musca_s1", "GCC_10_3", False, "2", True, "OFF",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800285 "Release", True, True, "", "ON", "FPHARD"),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800286 # MUSCA_S1_GCC_IPC_1_REG_Release_BL2_NS_CC_DRIVER_PSA
287 ("arm/musca_s1", "GCC_7_3_1", False, "1", True, "OFF",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800288 "Release", True, True, "", "ON", "CC_DRIVER_PSA"),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800289 # stm32l562e_dk_ARMCLANG_IPC_1_REG_Release_BL2_NS
290 ("stm/stm32l562e_dk", "ARMCLANG_6_13", False, "1", True,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800291 "OFF", "Release", True, True, "", "ON", "CRYPTO_OFF"),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800292 # stm32l562e_dk_GCC_IPC_2_REG_Release_BL2_NS
293 ("stm/stm32l562e_dk", "GCC_7_3_1", False, "2", False, "OFF",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800294 "Release", True, True, "", "ON", "CRYPTO_ON"),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800295 # stm32l562e_dk_GCC_IPC_3_REG_Release_BL2_NS
296 ("stm/stm32l562e_dk", "GCC_7_3_1", False, "3", True, "OFF",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800297 "Release", True, True, "", "ON", "CRYPTO_OFF"),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800298 # psoc64_GCC_IPC_2_REG_Release_NS
299 ("cypress/psoc64", "GCC_7_3_1", False, "2", True, "OFF",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800300 "Release", False, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800301 ],
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800302 "invalid": _common_tfm_invalid_configs + []
303 }
304
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800305# Config group for nightly job
306config_nightly_test = {"seed_params": {
307 "tfm_platform": ["arm/mps2/an519",
308 "arm/mps2/an521",
309 "arm/mps3/an524",
310 "arm/musca_s1",
311 "arm/musca_b1/sse_200"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800312 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800313 "lib_model": [True, False],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800314 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800315 "test_regression": [True, False],
316 "test_psa_api": ["OFF"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800317 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800318 "with_bl2": [True],
319 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800320 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800321 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800322 "extra_params": [""]
Minos Galanakisea421232019-06-20 17:11:28 +0100323 },
324 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800325 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +0100326 }
327
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800328# Config group for release job
329config_release_test = {"seed_params": {
330 "tfm_platform": ["arm/mps2/an519",
331 "arm/mps2/an521",
332 "arm/mps3/an524",
333 "arm/musca_b1/sse_200",
334 "arm/musca_s1"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800335 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800336 "lib_model": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800337 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800338 "test_regression": [True, False],
339 "test_psa_api": ["OFF"],
340 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800341 "with_bl2": [True],
342 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800343 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800344 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800345 "extra_params": [""]
Xinyu Zhangb708f572020-09-15 11:43:46 +0800346 },
347 "common_params": _common_tfm_builder_cfg,
Xinyu Zhang47bfc0e2022-04-06 17:26:59 +0800348 "valid": [
349 # sanity test for GCC v11.2
350 # AN521_GCC_IPC_3_REG_Relwithdebinfo_BL2_NS
351 ("arm/mps2/an521", "GCC_11_2",
352 False, "3", True, "OFF", "Relwithdebinfo",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800353 True, True, "", "ON", ""),
Xinyu Zhang47bfc0e2022-04-06 17:26:59 +0800354 ],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800355 "invalid": _common_tfm_invalid_configs + []
356 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800357
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800358# Config groups for TF-M features
359config_profile_s = {"seed_params": {
David Huda27ae72022-03-28 15:32:19 +0800360 "tfm_platform": ["arm/mps2/an519", "arm/mps2/an521"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800361 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
David Huda27ae72022-03-28 15:32:19 +0800362 "lib_model": [True],
363 "isolation_level": ["1"],
364 "test_regression": [True, False],
365 "test_psa_api": ["OFF"],
366 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
David Huda27ae72022-03-28 15:32:19 +0800367 "with_bl2": [True],
368 "with_ns": [True],
369 "profile": ["profile_small"],
370 "partition_ps": ["OFF"],
371 "extra_params": [""]
372 },
373 "common_params": _common_tfm_builder_cfg,
374 "valid": [
375 # Profile Small also supports SFN model
Xinyu Zhang589fd052022-04-19 17:54:16 +0800376 ("*", "*", False, "*", "*", "*", "*", "*", "*", "*",
David Huda27ae72022-03-28 15:32:19 +0800377 "*", "SFN_ENABLE")
378 ],
379 "invalid": _common_tfm_invalid_configs + [
Xinyu Zhang433771e2022-04-01 16:49:17 +0800380 ("arm/mps2/an519", "GCC_7_3_1", "*", "*", "*",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800381 "*", "Minsizerel", "*", "*", "*", "*", "*")
David Huda27ae72022-03-28 15:32:19 +0800382 ]
383 }
384
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800385config_profile_m = {"seed_params": {
386 "tfm_platform": ["arm/mps2/an519",
387 "arm/mps2/an521",
388 "arm/musca_b1/sse_200"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800389 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800390 "lib_model": [False],
391 "isolation_level": ["2"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800392 "test_regression": [True, False],
393 "test_psa_api": ["OFF"],
394 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800395 "with_bl2": [True],
396 "with_ns": [True],
397 "profile": ["profile_medium"],
398 "partition_ps": ["ON", "OFF"],
399 "extra_params": [""]
400 },
401 "common_params": _common_tfm_builder_cfg,
402 "invalid": _common_tfm_invalid_configs + []
403 }
404
405config_profile_l = {"seed_params": {
406 "tfm_platform": ["arm/mps2/an521"],
407 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
408 "lib_model": [False],
409 "isolation_level": ["3"],
410 "test_regression": [True, False],
411 "test_psa_api": ["OFF"],
412 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800413 "with_bl2": [True],
414 "with_ns": [True],
415 "profile": ["profile_large"],
416 "partition_ps": ["ON", "OFF"],
417 "extra_params": [""]
418 },
419 "common_params": _common_tfm_builder_cfg,
420 "invalid": _common_tfm_invalid_configs + []
421 }
422
423config_cc_driver_psa = {"seed_params": {
424 "tfm_platform": ["arm/musca_b1/sse_200",
425 "arm/musca_s1"],
426 "compiler": ["GCC_7_3_1"],
427 "lib_model": [False],
428 "isolation_level": ["1"],
429 "test_regression": [True],
430 "test_psa_api": ["OFF"],
431 "cmake_build_type": ["Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800432 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800433 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800434 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800435 "partition_ps": ["ON"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800436 "extra_params": ["CC_DRIVER_PSA"]
Xinyu Zhangb708f572020-09-15 11:43:46 +0800437 },
438 "common_params": _common_tfm_builder_cfg,
439 "invalid": _common_tfm_invalid_configs + []
440 }
Karl Zhangaff558a2020-05-15 14:28:23 +0100441
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800442config_fp = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800443 "tfm_platform": ["arm/musca_s1"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800444 "compiler": ["GCC_10_3"],
445 "lib_model": [False],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800446 "isolation_level": ["1", "2"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800447 "test_regression": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800448 "test_psa_api": ["OFF"],
449 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800450 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800451 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800452 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800453 "partition_ps": ["ON"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800454 "extra_params": ["FPSOFT", "FPHARD", "FPHARD_LOFF"]
Xinyu Zhangb708f572020-09-15 11:43:46 +0800455 },
456 "common_params": _common_tfm_builder_cfg,
457 "invalid": _common_tfm_invalid_configs + []
458 }
Karl Zhangeffed972020-06-30 15:48:01 +0800459
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800460config_psa_api = {"seed_params": {
461 "tfm_platform": ["arm/mps2/an521",
462 "arm/musca_b1/sse_200",
463 "arm/musca_s1"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800464 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800465 "lib_model": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800466 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800467 "test_regression": [False],
468 "test_psa_api": ["IPC",
469 "CRYPTO",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800470 "INITIAL_ATTESTATION",
Xinyu Zhang39acb412021-07-09 20:35:19 +0800471 "STORAGE"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800472 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800473 "with_bl2": [True],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800474 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800475 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800476 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800477 "extra_params": [""]
Xinyu Zhangb708f572020-09-15 11:43:46 +0800478 },
479 "common_params": _common_tfm_builder_cfg,
Paul Sokolovsky75f67e82022-05-02 15:39:41 +0300480 "invalid": _common_tfm_invalid_configs + []
Xinyu Zhangb708f572020-09-15 11:43:46 +0800481 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800482
Xinyu Zhang050e39a2021-11-16 14:38:15 +0800483config_nsce = {"seed_params": {
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +0800484 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800485 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +0800486 "lib_model": [True, False],
487 "isolation_level": ["1", "2", "3"],
488 "test_regression": [True],
489 "test_psa_api": ["OFF"],
490 "cmake_build_type": ["Debug"],
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +0800491 "with_bl2": [True],
492 "with_ns": [True],
493 "profile": [""],
494 "partition_ps": ["ON"],
Xinyu Zhang67612992021-12-20 14:11:27 +0800495 "extra_params": ["NSCE"]
Xinyu Zhanga1088e22021-11-11 18:02:45 +0800496 },
497 "common_params": _common_tfm_builder_cfg,
498 "invalid": _common_tfm_invalid_configs + []
499 }
500
Xinyu Zhang050e39a2021-11-16 14:38:15 +0800501config_mmio = {"seed_params": {
Xinyu Zhanga1088e22021-11-11 18:02:45 +0800502 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800503 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhanga1088e22021-11-11 18:02:45 +0800504 "lib_model": [False],
505 "isolation_level": ["1"],
506 "test_regression": [True],
507 "test_psa_api": ["OFF"],
508 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga1088e22021-11-11 18:02:45 +0800509 "with_bl2": [True],
510 "with_ns": [True],
511 "profile": [""],
512 "partition_ps": ["ON"],
Xinyu Zhang3bb01af2021-12-20 14:45:49 +0800513 "extra_params": ["MMIO"]
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +0800514 },
515 "common_params": _common_tfm_builder_cfg,
516 "invalid": _common_tfm_invalid_configs + []
517 }
518
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800519# Config groups for code coverage
520config_cov_profile_s = deepcopy(config_profile_s)
521config_cov_profile_s["seed_params"]["compiler"] = ["GCC_7_3_1"]
Xinyu Zhangbdc37e32022-04-06 17:47:44 +0800522
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800523config_cov_profile_m = deepcopy(config_profile_m)
524config_cov_profile_m["seed_params"]["compiler"] = ["GCC_7_3_1"]
Karl Zhang14573bc2020-06-08 09:23:21 +0800525
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800526config_cov_profile_l = deepcopy(config_profile_l)
527config_cov_profile_l["seed_params"]["compiler"] = ["GCC_7_3_1"]
Karl Zhang14573bc2020-06-08 09:23:21 +0800528
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800529config_cov_nsce = deepcopy(config_nsce)
530config_cov_nsce["seed_params"]["compiler"] = ["GCC_7_3_1"]
Karl Zhang14573bc2020-06-08 09:23:21 +0800531
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800532config_cov_mmio = deepcopy(config_mmio)
533config_cov_mmio["seed_params"]["compiler"] = ["GCC_7_3_1"]
Karl Zhang14573bc2020-06-08 09:23:21 +0800534
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800535# Config groups for platforms
536config_an519 = {"seed_params": {
Xinyu Zhangf25856a2021-06-17 14:06:46 +0800537 "tfm_platform": ["arm/mps2/an519"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800538 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800539 "lib_model": [True, False],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800540 "isolation_level": ["1", "2"],
541 "test_regression": [True, False],
542 "test_psa_api": ["OFF"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800543 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800544 "with_bl2": [True, False],
545 "with_ns": [True, False],
546 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800547 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800548 "extra_params": [""]
Xinyu Zhangb708f572020-09-15 11:43:46 +0800549 },
550 "common_params": _common_tfm_builder_cfg,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800551 "invalid": _common_tfm_invalid_configs + []
552 }
553
554config_an521 = {"seed_params": {
555 "tfm_platform": ["arm/mps2/an521"],
556 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
557 "lib_model": [True, False],
558 "isolation_level": ["1", "2", "3"],
559 "test_regression": [True, False],
560 "test_psa_api": ["OFF"],
561 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800562 "with_bl2": [True, False],
563 "with_ns": [True, False],
564 "profile": [""],
565 "partition_ps": ["ON"],
566 "extra_params": [""]
567 },
568 "common_params": _common_tfm_builder_cfg,
569 "invalid": _common_tfm_invalid_configs + []
570 }
571
572config_an524 = {"seed_params": {
573 "tfm_platform": ["arm/mps3/an524"],
574 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
575 "lib_model": [True, False],
576 "isolation_level": ["1", "2"],
577 "test_regression": [True, False],
578 "test_psa_api": ["OFF"],
579 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800580 "with_bl2": [True, False],
581 "with_ns": [True, False],
582 "profile": [""],
583 "partition_ps": ["ON"],
584 "extra_params": [""]
585 },
586 "common_params": _common_tfm_builder_cfg,
587 "invalid": _common_tfm_invalid_configs + []
Xinyu Zhangb708f572020-09-15 11:43:46 +0800588 }
Dean Birch4c6ad622020-03-13 11:28:03 +0000589
Xinyu Zhang38b76742021-11-11 13:57:56 +0800590config_an547 = {"seed_params": {
591 "tfm_platform": ["arm/mps3/an547"],
Bence Balogh176b78f2022-02-22 13:49:34 +0100592 "compiler": ["GCC_10_3"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800593 "lib_model": [False],
594 "isolation_level": ["1"],
595 "test_regression": [False],
596 "test_psa_api": ["OFF"],
597 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800598 "with_bl2": [True],
599 "with_ns": [False],
600 "profile": [""],
601 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800602 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800603 },
604 "common_params": _common_tfm_builder_cfg,
605 "invalid": _common_tfm_invalid_configs + []
606 }
607
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800608config_an552 = {"seed_params": {
609 "tfm_platform": ["arm/mps3/an552"],
610 "compiler": ["GCC_10_3"],
611 "lib_model": [True, False],
612 "isolation_level": ["1", "2"],
613 "test_regression": [True, False],
614 "test_psa_api": ["OFF"],
615 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800616 "with_bl2": [True],
617 "with_ns": [True],
618 "profile": [""],
619 "partition_ps": ["ON"],
620 "extra_params": [""]
621 },
622 "common_params": _common_tfm_builder_cfg,
623 "invalid": _common_tfm_invalid_configs + []
624 }
625
626config_musca_b1 = {"seed_params": {
627 "tfm_platform": ["arm/musca_b1/sse_200"],
628 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
629 "lib_model": [True, False],
630 "isolation_level": ["1", "2", "3"],
631 "test_regression": [True, False],
632 "test_psa_api": ["OFF"],
633 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800634 "with_bl2": [True],
635 "with_ns": [True, False],
636 "profile": [""],
637 "partition_ps": ["ON"],
638 "extra_params": [""]
639 },
640 "common_params": _common_tfm_builder_cfg,
641 "invalid": _common_tfm_invalid_configs + []
642 }
643
644config_musca_b1_se = {"seed_params": {
645 "tfm_platform": ["arm/musca_b1/secure_enclave"],
646 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
647 "lib_model": [False],
648 "isolation_level": ["1"],
649 "test_regression": [False],
650 "test_psa_api": ["OFF"],
651 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800652 "with_bl2": [True],
653 "with_ns": [False],
654 "profile": [""],
655 "partition_ps": ["ON"],
656 "extra_params": [""]
657 },
658 "common_params": _common_tfm_builder_cfg,
659 "invalid": _common_tfm_invalid_configs + []
660 }
661
662config_musca_s1 = {"seed_params": {
663 "tfm_platform": ["arm/musca_s1"],
664 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
665 "lib_model": [True, False],
666 "isolation_level": ["1", "2"],
667 "test_regression": [True, False],
668 "test_psa_api": ["OFF"],
669 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800670 "with_bl2": [True],
671 "with_ns": [True, False],
672 "profile": [""],
673 "partition_ps": ["ON"],
674 "extra_params": [""]
675 },
676 "common_params": _common_tfm_builder_cfg,
677 "invalid": _common_tfm_invalid_configs + []
678 }
679
Bence Balogh8731a092022-05-24 17:24:54 +0200680config_corstone310 = {"seed_params": {
681 "tfm_platform": ["arm/mps3/corstone310_fvp"],
Bence Balogh176b78f2022-02-22 13:49:34 +0100682 "compiler": ["GCC_10_3"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800683 "lib_model": [False],
684 "isolation_level": ["1"],
685 "test_regression": [False],
686 "test_psa_api": ["OFF"],
687 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800688 "with_bl2": [True],
689 "with_ns": [False],
690 "profile": [""],
691 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800692 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800693 },
694 "common_params": _common_tfm_builder_cfg,
695 "invalid": _common_tfm_invalid_configs + []
696 }
697
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800698config_psoc64 = {"seed_params": {
699 "tfm_platform": ["cypress/psoc64"],
700 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
701 "lib_model": [False],
702 "isolation_level": ["1", "2"],
703 "test_regression": [True],
704 "test_psa_api": ["OFF"],
705 "cmake_build_type": ["Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800706 "with_bl2": [False],
707 "with_ns": [True],
708 "profile": [""],
709 "partition_ps": ["ON"],
710 "extra_params": [""]
711 },
712 "common_params": _common_tfm_builder_cfg,
713 "invalid": _common_tfm_invalid_configs + []
714 }
715
716config_corstone1000 = {"seed_params": {
717 "tfm_platform": ["arm/corstone1000"],
718 "compiler": ["GCC_7_3_1"],
719 "lib_model": [False],
720 "isolation_level": ["1"],
721 "test_regression": [False],
722 "test_psa_api": ["OFF"],
723 "cmake_build_type": ["Debug"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800724 "with_bl2": [True],
725 "with_ns": [False],
726 "profile": [""],
727 "partition_ps": ["ON"],
728 "extra_params": ["FVP", "FPGA"]
729 },
730 "common_params": _common_tfm_builder_cfg,
731 "invalid": _common_tfm_invalid_configs + []
732 }
733
734config_stm32l562e_dk = {"seed_params": {
735 "tfm_platform": ["stm/stm32l562e_dk"],
736 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
737 "lib_model": [True, False],
738 "isolation_level": ["1", "2", "3"],
739 "test_regression": [True, False],
740 "test_psa_api": ["OFF"],
741 "cmake_build_type": ["Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800742 "with_bl2": [True],
743 "with_ns": [True],
744 "profile": [""],
745 "partition_ps": ["ON"],
746 "extra_params": ["CRYPTO_OFF", "CRYPTO_ON"]
747 },
748 "common_params": _common_tfm_builder_cfg,
749 "invalid": _common_tfm_invalid_configs + [
750 # Oversize issue on config stm32l562e_dk_ARMCLANG_LIB_1_REG_Release_BL2_NS
751 ("stm/stm32l562e_dk", "ARMCLANG_6_13", True, "1", True,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800752 "OFF", "Release", True, True, "", "ON", "*"),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800753 # all other tests are off when CRYPTO is ON
Xinyu Zhang589fd052022-04-19 17:54:16 +0800754 ("stm/stm32l562e_dk", "*", "*", "*", True, "*", "*",
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800755 "*", "*", "*", "*", "CRYPTO_ON"),
756 # all other tests are ON when CRYPTO is OFF
Xinyu Zhang589fd052022-04-19 17:54:16 +0800757 ("stm/stm32l562e_dk", "*", "*", "*", False, "*", "*",
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800758 "*", "*", "*", "*", "CRYPTO_OFF"),
759 ]
760 }
761
762config_b_u585i_iot02a = {"seed_params": {
763 "tfm_platform": ["stm/b_u585i_iot02a"],
764 "compiler": ["GCC_7_3_1"],
765 "lib_model": [False],
766 "isolation_level": ["1"],
767 "test_regression": [False],
768 "test_psa_api": ["OFF"],
769 "cmake_build_type": ["Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800770 "with_bl2": [True],
771 "with_ns": [False],
772 "profile": [""],
773 "partition_ps": ["ON"],
774 "extra_params": [""]
775 },
776 "common_params": _common_tfm_builder_cfg,
777 "invalid": _common_tfm_invalid_configs + []
778 }
779
780config_nucleo_l552ze_q = {"seed_params": {
781 "tfm_platform": ["stm/nucleo_l552ze_q"],
782 "compiler": ["GCC_7_3_1"],
783 "lib_model": [False],
784 "isolation_level": ["1"],
785 "test_regression": [False],
786 "test_psa_api": ["OFF"],
787 "cmake_build_type": ["Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800788 "with_bl2": [True],
789 "with_ns": [False],
790 "profile": [""],
791 "partition_ps": ["ON"],
792 "extra_params": [""]
793 },
794 "common_params": _common_tfm_builder_cfg,
795 "invalid": _common_tfm_invalid_configs + []
796 }
797
798config_lpcxpresso55s69 = {"seed_params": {
799 "tfm_platform": ["nxp/lpcxpresso55s69"],
800 "compiler": ["GCC_7_3_1"],
801 "lib_model": [False],
802 "isolation_level": ["2"],
803 "test_regression": [True, False],
804 "test_psa_api": ["OFF"],
805 "cmake_build_type": ["Relwithdebinfo"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800806 "with_bl2": [False],
807 "with_ns": [True],
808 "profile": ["profile_medium"],
809 "partition_ps": ["ON"],
810 "extra_params": [""]
811 },
812 "common_params": _common_tfm_builder_cfg,
813 "invalid": _common_tfm_invalid_configs + []
814 }
815
Xinyu Zhang38b76742021-11-11 13:57:56 +0800816config_bl5340 = {"seed_params": {
817 "tfm_platform": ["lairdconnectivity/bl5340_dvk_cpuapp"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800818 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800819 "lib_model": [False],
820 "isolation_level": ["1"],
821 "test_regression": [False],
822 "test_psa_api": ["OFF"],
823 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800824 "with_bl2": [True],
825 "with_ns": [False],
826 "profile": [""],
827 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800828 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800829 },
830 "common_params": _common_tfm_builder_cfg,
831 "invalid": _common_tfm_invalid_configs + []
832 }
833
834config_nrf5340dk = {"seed_params": {
835 "tfm_platform": ["nordic_nrf/nrf5340dk_nrf5340_cpuapp"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800836 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800837 "lib_model": [False],
838 "isolation_level": ["1"],
839 "test_regression": [False],
840 "test_psa_api": ["OFF"],
841 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800842 "with_bl2": [True],
843 "with_ns": [False],
844 "profile": [""],
845 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800846 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800847 },
848 "common_params": _common_tfm_builder_cfg,
849 "invalid": _common_tfm_invalid_configs + []
850 }
851
852config_nrf9160dk = {"seed_params": {
853 "tfm_platform": ["nordic_nrf/nrf9160dk_nrf9160"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800854 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800855 "lib_model": [False],
856 "isolation_level": ["1"],
857 "test_regression": [False],
858 "test_psa_api": ["OFF"],
859 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800860 "with_bl2": [True],
861 "with_ns": [False],
862 "profile": [""],
863 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800864 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800865 },
866 "common_params": _common_tfm_builder_cfg,
867 "invalid": _common_tfm_invalid_configs + []
868 }
869
870config_m2351 = {"seed_params": {
871 "tfm_platform": ["nuvoton/m2351"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800872 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800873 "lib_model": [False],
874 "isolation_level": ["1"],
875 "test_regression": [False],
876 "test_psa_api": ["OFF"],
877 "cmake_build_type": ["Release"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800878 "with_bl2": [True],
879 "with_ns": [False],
880 "profile": [""],
881 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800882 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800883 },
884 "common_params": _common_tfm_builder_cfg,
885 "invalid": _common_tfm_invalid_configs + []
886 }
887
888config_m2354 = {"seed_params": {
889 "tfm_platform": ["nuvoton/m2354"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800890 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800891 "lib_model": [False],
892 "isolation_level": ["1"],
893 "test_regression": [False],
894 "test_psa_api": ["OFF"],
895 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800896 "with_bl2": [True],
897 "with_ns": [False],
898 "profile": [""],
899 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800900 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800901 },
902 "common_params": _common_tfm_builder_cfg,
903 "invalid": _common_tfm_invalid_configs + []
904 }
905
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800906# Config groups for debug
907config_debug = {"seed_params": {
908 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800909 "compiler": ["GCC_7_3_1"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800910 "lib_model": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800911 "isolation_level": ["1"],
912 "test_regression": [False],
913 "test_psa_api": ["OFF"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800914 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800915 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800916 "with_ns": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800917 "profile": [""],
918 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800919 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800920 },
921 "common_params": _common_tfm_builder_cfg,
922 "invalid": _common_tfm_invalid_configs + []
923 }
924
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800925config_debug_regr = deepcopy(config_debug)
926config_debug_regr["seed_params"]["test_regression"] = [True]
927
928config_debug_PSA_API = {"seed_params": {
929 "tfm_platform": ["arm/mps2/an521"],
930 "compiler": ["ARMCLANG_6_13"],
931 "lib_model": [True],
932 "isolation_level": ["1"],
933 "test_regression": [False],
934 "test_psa_api": ["CRYPTO",
935 "INITIAL_ATTESTATION",
936 "STORAGE",
937 "IPC"],
938 "cmake_build_type": ["Debug"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800939 "with_bl2": [True],
940 "with_ns": [True],
941 "profile": [""],
942 "partition_ps": ["ON"],
943 "extra_params": [""]
944 },
945 "common_params": _common_tfm_builder_cfg,
946 "invalid": _common_tfm_invalid_configs + []
947 }
948
949config_debug_PSA_API_nolib = {"seed_params": {
950 "tfm_platform": ["arm/mps2/an521"],
951 "compiler": ["ARMCLANG_6_13"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800952 "lib_model": [False],
953 "isolation_level": ["1"],
954 "test_regression": [False],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800955 "test_psa_api": ["CRYPTO",
956 "INITIAL_ATTESTATION",
957 "STORAGE",
958 "IPC"],
959 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800960 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800961 "with_ns": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800962 "profile": [""],
963 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800964 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800965 },
966 "common_params": _common_tfm_builder_cfg,
967 "invalid": _common_tfm_invalid_configs + []
968 }
969
Karl Zhangaff558a2020-05-15 14:28:23 +0100970_builtin_configs = {
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800971 # per-patch test groups
972 "pp_test": config_pp_test,
973 "pp_corstone1000": config_corstone1000,
Karl Zhang14573bc2020-06-08 09:23:21 +0800974
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800975 # nightly test groups
976 "nightly_test": config_nightly_test,
977 "nightly_profile_s": config_profile_s,
978 "nightly_profile_m": config_profile_m,
979 "nightly_profile_l": config_profile_l,
980 "nightly_cc_driver_psa": config_cc_driver_psa,
981 "nightly_fp":config_fp,
982 "nightly_psa_api": config_psa_api,
Xinyu Zhang050e39a2021-11-16 14:38:15 +0800983 "nightly_nsce": config_nsce,
984 "nightly_mmio": config_mmio,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800985 "nightly_an547": config_an547,
986 "nightly_an552": config_an552,
987 "nightly_musca_b1_se": config_musca_b1_se,
Bence Balogh8731a092022-05-24 17:24:54 +0200988 "nightly_corstone310": config_corstone310,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800989 "nightly_corstone1000": config_corstone1000,
990 "nightly_psoc64": config_psoc64,
991 "nightly_stm32l562e_dk": config_stm32l562e_dk,
992 "nightly_lpcxpresso55s69": config_lpcxpresso55s69,
Karl Zhang14573bc2020-06-08 09:23:21 +0800993
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800994 # release test groups
995 "release_test": config_release_test,
996 "release_profile_s": config_profile_s,
997 "release_profile_m": config_profile_m,
998 "release_profile_l": config_profile_l,
999 "release_cc_driver_psa": config_cc_driver_psa,
1000 "release_fp": config_fp,
1001 "release_psa_api": config_psa_api,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001002 "release_nsce": config_nsce,
1003 "release_mmio": config_mmio,
1004 "release_an547": config_an547,
1005 "release_an552": config_an552,
Bence Balogh8731a092022-05-24 17:24:54 +02001006 "release_corstone310": config_corstone310,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001007 "release_psoc64": config_psoc64,
1008 "release_stm32l562e_dk": config_stm32l562e_dk,
1009 "release_lpcxpresso55s69": config_lpcxpresso55s69,
Karl Zhang14573bc2020-06-08 09:23:21 +08001010
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001011 # code coverage test groups
1012 "coverage_profile_s": config_cov_profile_s,
1013 "coverage_profile_m": config_cov_profile_m,
1014 "coverage_profile_l": config_cov_profile_l,
1015 "coverage_nsce": config_cov_nsce,
1016 "coverage_mmio": config_cov_mmio,
1017 "coverage_fp": config_fp,
Xinyu Zhangf25856a2021-06-17 14:06:46 +08001018
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001019 # platform groups
1020 "an521": config_an521,
1021 "an519": config_an519,
1022 "an524": config_an524,
1023 "an547": config_an547,
1024 "an552": config_an552,
1025 "musca_b1": config_musca_b1,
1026 "musca_b1_se": config_musca_b1_se,
1027 "musca_s1": config_musca_s1,
Bence Balogh8731a092022-05-24 17:24:54 +02001028 "corstone310": config_corstone310,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001029 "cypress_psoc64": config_psoc64,
1030 "corstone1000": config_corstone1000,
1031 "stm_stm32l562e_dk": config_stm32l562e_dk,
1032 "stm_b_u585i_iot02a": config_b_u585i_iot02a,
1033 "stm_nucleo_l552ze_q": config_nucleo_l552ze_q,
1034 "nxp_lpcxpresso55s69": config_lpcxpresso55s69,
Xinyu Zhang38b76742021-11-11 13:57:56 +08001035 "laird_bl5340": config_bl5340,
1036 "nordic_nrf5340dk": config_nrf5340dk,
1037 "nordic_nrf9160dk": config_nrf9160dk,
1038 "nuvoton_m2351": config_m2351,
1039 "nuvoton_m2354": config_m2354,
Xinyu Zhang38b76742021-11-11 13:57:56 +08001040
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001041 # config groups for debug
Dean Birch4c6ad622020-03-13 11:28:03 +00001042 "debug": config_debug,
Paul Sokolovsky6c3c6562022-04-04 23:23:02 +03001043 "debug_regr": config_debug_regr,
Paul Sokolovsky1ec752b2022-01-22 19:50:58 +03001044 "debug_PSA_API": config_debug_PSA_API,
Paul Sokolovsky49a99282022-02-02 23:43:37 +03001045 "debug_PSA_API_nolib": config_debug_PSA_API_nolib,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001046 }
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001047
1048if __name__ == '__main__':
1049 import os
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001050
Minos Galanakisea421232019-06-20 17:11:28 +01001051 # Default behavior is to export refference config when called
1052 _dir = os.getcwd()
1053 from utils import save_json
1054 for _cname, _cfg in _builtin_configs.items():
1055 _fname = os.path.join(_dir, _cname + ".json")
1056 print("Exporting config %s" % _fname)
1057 save_json(_fname, _cfg)