blob: 67512e8a3eb8aca01c2d4d2b9361d206c25bc6dd [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",
Xinyu Zhang9fd74242020-10-22 11:30:50 +080043 "profile",
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +080044 "partition_ps",
Xinyu Zhangfd2e1152021-12-17 18:09:01 +080045 "extra_params"],
Minos Galanakisea421232019-06-20 17:11:28 +010046
47 # Keys for the templace will come from the combinations of parameters
48 # provided in the seed dictionary.
49
Xinyu Zhangf3e19482022-01-11 15:48:13 +080050 "config_template": "cmake -G Ninja " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080051 "-DTFM_PLATFORM=%(tfm_platform)s " + \
Xinyu Zhang433771e2022-04-01 16:49:17 +080052 "-DTFM_TOOLCHAIN_FILE=%(codebase_root_dir)s/%(compiler)s " + \
Xinyu Zhang73ed2992021-09-15 11:38:23 +080053 "-DTFM_LIB_MODEL=%(lib_model)s " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080054 "-DTFM_ISOLATION_LEVEL=%(isolation_level)s " + \
55 "-DTEST_NS=%(test_regression)s -DTEST_S=%(test_regression)s " + \
Raef Coles61b43a42022-01-12 11:42:57 +000056 "-DTEST_BL2=%(test_regression)s " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080057 "-DCMAKE_BUILD_TYPE=%(cmake_build_type)s " + \
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +080058 "-DTEST_PSA_API=%(test_psa_api)s " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080059 "-DBL2=%(with_bl2)s " + \
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +080060 "-DTFM_PROFILE=%(profile)s " + \
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +080061 "-DTFM_PARTITION_PROTECTED_STORAGE=%(partition_ps)s " + \
62 "%(extra_params)s " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080063 "-DTFM_TEST_REPO_PATH=%(codebase_root_dir)s/../tf-m-tests " + \
64 "-DMBEDCRYPTO_PATH=%(codebase_root_dir)s/../mbedtls " + \
65 "-DPSA_ARCH_TESTS_PATH=%(codebase_root_dir)s/../psa-arch-tests " + \
66 "-DMCUBOOT_PATH=%(codebase_root_dir)s/../mcuboot " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080067 "%(codebase_root_dir)s",
Karl Zhangaff558a2020-05-15 14:28:23 +010068
Xinyu Zhang433771e2022-04-01 16:49:17 +080069 "set_compiler_path": "export PATH=$PATH:$%(compiler)s_PATH",
70
Minos Galanakisea421232019-06-20 17:11:28 +010071 # A small subset of string substitution params is allowed in commands.
72 # tfm_build_manager will replace %(_tbm_build_dir_)s, %(_tbm_code_dir_)s,
73 # _tbm_target_platform_ with the paths set when building
74
Xinyu Zhangb708f572020-09-15 11:43:46 +080075 "artifact_capture_rex": (r'%(_tbm_build_dir_)s/bin'
Minos Galanakisea421232019-06-20 17:11:28 +010076 r'/(\w+\.(?:axf|bin|hex))$'),
77
78 # ALL commands will be executed for every build.
79 # Other keys will append extra commands when matching target_platform
Fathi Boudra83e4f292020-12-04 22:33:40 +010080 "build_cmds": {"all": ["cmake --build ./ -- install"],
Summer Qin3c2b5722021-05-26 10:43:45 +080081 "arm/musca_b1/sse_200": [("srec_cat "
Mark Horvath8d281cd2020-12-07 15:20:26 +010082 "%(_tbm_build_dir_)s/bin/"
83 "bl2.bin "
84 "-Binary -offset 0xA000000 "
85 "-fill 0xFF 0xA000000 0xA020000 "
86 "%(_tbm_build_dir_)s/bin/"
87 "tfm_s_ns_signed.bin "
88 "-Binary -offset 0xA020000 "
89 "-fill 0xFF 0xA020000 0xA200000 "
90 "-o %(_tbm_build_dir_)s/bin/"
91 "tfm.hex -Intel")],
Satish Kumar1cfdd912022-08-01 09:24:07 +010092 "arm/corstone1000": [("cat "
93 "%(_tbm_build_dir_)s/bin/"
94 "bl2_signed.bin "
95 "%(_tbm_build_dir_)s/bin/"
96 "bl2_signed.bin "
97 "%(_tbm_build_dir_)s/bin/"
98 "tfm_s_signed.bin "
99 "%(_tbm_build_dir_)s/bin/"
100 "tfm_s_signed.bin "
101 "> "
102 "%(_tbm_build_dir_)s/bin/"
103 "flash.bin")],
Summer Qin3c2b5722021-05-26 10:43:45 +0800104 "arm/musca_s1": [("srec_cat "
Xinyu Zhangb708f572020-09-15 11:43:46 +0800105 "%(_tbm_build_dir_)s/bin/"
106 "bl2.bin "
Karl Zhangeffed972020-06-30 15:48:01 +0800107 "-Binary -offset 0xA000000 "
Raef Coles543aab32020-12-03 11:12:02 +0000108 "-fill 0xFF 0xA000000 0xA020000 "
Xinyu Zhangb708f572020-09-15 11:43:46 +0800109 "%(_tbm_build_dir_)s/bin/"
Xinyu Zhang694eb492020-11-04 18:29:08 +0800110 "tfm_s_ns_signed.bin "
Raef Coles543aab32020-12-03 11:12:02 +0000111 "-Binary -offset 0xA020000 "
112 "-fill 0xFF 0xA020000 0xA200000 "
113 "-o %(_tbm_build_dir_)s/bin/"
Arthur She19c0e1a2021-06-02 11:06:19 -0700114 "tfm.hex -Intel")],
115 "stm/stm32l562e_dk": [("echo 'STM32L562E-DK board post process';"
116 "%(_tbm_build_dir_)s/postbuild.sh;"
117 "pushd %(_tbm_build_dir_)s;"
Arthur She07c91b52021-07-15 15:03:10 -0700118 "BIN_FILES=$(grep -o '\/.*\.bin' TFM_UPDATE.sh | sed 's/^/bin/');"
119 "tar jcf ./bin/stm32l562e-dk-tfm.tar.bz2 regression.sh TFM_UPDATE.sh ${BIN_FILES};"
Arthur She3c0dadd2021-11-18 21:17:48 -0800120 "popd")],
121 "nxp/lpcxpresso55s69": [("echo 'LPCXpresso55S69 board post process\n';"
122 "if [ -f \"%(_tbm_build_dir_)s/bin/bl2.hex\" ]; then FLASH_FILE='flash_bl2_JLink.py'; else FLASH_FILE='flash_JLink.py'; fi;"
123 "pushd %(_tbm_build_dir_)s/../platform/ext/target/nxp/lpcxpresso55s69/scripts;"
124 "LN=$(grep -n 'JLinkExe' ${FLASH_FILE}|awk -F: '{print $1}');"
125 "sed -i \"${LN}s/.*/ print('flash.jlink generated')/\" ${FLASH_FILE};"
126 "python3 ./${FLASH_FILE};"
127 "cd %(_tbm_build_dir_)s/bin;"
128 "BIN_FILES=$(grep loadfile flash.jlink | awk '{print $2}');"
129 "tar jcf lpcxpresso55s69-tfm.tar.bz2 flash.jlink ${BIN_FILES};"
Arthur She87602dc2022-02-06 14:42:18 -0800130 "popd")],
131 "cypress/psoc64": [("echo 'Sign binaries for Cypress PSoC64 platform';"
132 "pushd %(_tbm_build_dir_)s/..;"
133 "sudo /usr/local/bin/cysecuretools "
134 "--policy platform/ext/target/cypress/psoc64/security/policy/policy_multi_CM0_CM4_tfm.json "
135 "--target cy8ckit-064s0s2-4343w "
136 "sign-image "
137 "--hex %(_tbm_build_dir_)s/bin/tfm_s.hex "
138 "--image-type BOOT --image-id 1;"
139 "sudo /usr/local/bin/cysecuretools "
140 "--policy platform/ext/target/cypress/psoc64/security/policy/policy_multi_CM0_CM4_tfm.json "
141 "--target cy8ckit-064s0s2-4343w "
142 "sign-image "
143 "--hex %(_tbm_build_dir_)s/bin/tfm_ns.hex "
144 "--image-type BOOT --image-id 16;"
145 "mv %(_tbm_build_dir_)s/bin/tfm_s.hex %(_tbm_build_dir_)s/bin/tfm_s_signed.hex;"
146 "mv %(_tbm_build_dir_)s/bin/tfm_ns.hex %(_tbm_build_dir_)s/bin/tfm_ns_signed.hex;"
147 "popd")]
Minos Galanakisea421232019-06-20 17:11:28 +0100148 },
149
150 # (Optional) If set will fail if those artefacts are missing post build
151 "required_artefacts": {"all": [
Xinyu Zhangb708f572020-09-15 11:43:46 +0800152 "%(_tbm_build_dir_)s/bin/"
153 "tfm_s.bin",
154 "%(_tbm_build_dir_)s/bin/"
155 "tfm_ns.bin"],
Summer Qin3c2b5722021-05-26 10:43:45 +0800156 "arm/musca_b1/sse_200": [
Xinyu Zhangb708f572020-09-15 11:43:46 +0800157 "%(_tbm_build_dir_)s/bin/"
158 "tfm.hex",
159 "%(_tbm_build_dir_)s/bin/"
Xinyu Zhang694eb492020-11-04 18:29:08 +0800160 "bl2.bin",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800161 "%(_tbm_build_dir_)s/bin/"
162 "tfm_sign.bin"],
Summer Qin3c2b5722021-05-26 10:43:45 +0800163 "arm/musca_s1": [
Xinyu Zhangb708f572020-09-15 11:43:46 +0800164 "%(_tbm_build_dir_)s/bin/"
165 "tfm.hex",
166 "%(_tbm_build_dir_)s/bin/"
Xinyu Zhang694eb492020-11-04 18:29:08 +0800167 "bl2.bin",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800168 "%(_tbm_build_dir_)s/bin/"
169 "tfm_sign.bin"]
Minos Galanakisea421232019-06-20 17:11:28 +0100170 }
171}
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100172
Xinyu Zhangb708f572020-09-15 11:43:46 +0800173# List of all build configs that are impossible under all circumstances
174_common_tfm_invalid_configs = [
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800175 # GCC defect
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800176 ("arm/mps2/an519", "GCC_7_3_1", "*", "*", "*", "*", "Minsizerel", "*", "*", "*", "*"),
Xinyu Zhang459a1982021-07-21 22:34:49 +0800177 # LR_CODE size exceeds limit on MUSCA_B1 & MUSCA_S1 with regression tests in Debug mode built with ARMCLANG
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800178 ("arm/musca_b1/sse_200", "ARMCLANG_6_13", "*", "*", True, "OFF", "Debug", "*", "", "*", "*"),
179 ("arm/musca_s1", "ARMCLANG_6_13", "*", "*", True, "OFF", "Debug", "*", "", "*", "*"),
Karl Zhangc858a722021-03-22 21:38:19 +0800180 # Load range overlap on Musca for IPC Debug type: T895
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800181 ("arm/musca_b1/sse_200", "ARMCLANG_6_13", "*", "*", "*", "IPC", "Debug", "*", "*", "*", "*"),
182 ("arm/musca_s1", "ARMCLANG_6_13", "*", "*", "*", "IPC", "Debug", "*", "*", "*", "*"),
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800183 # LVL2 and LVL3 requires IPC model
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800184 ("*", "*", True, "2", "*", "*", "*", "*", "*", "*", "*"),
185 ("*", "*", True, "3", "*", "*", "*", "*", "*", "*", "*"),
Paul Sokolovsky75f67e82022-05-02 15:39:41 +0300186 # FF does not support library model
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800187 ("*", "*", True, "*", "*", "IPC", "*", "*", "*", "*", "*"),
Paul Sokolovsky75f67e82022-05-02 15:39:41 +0300188 # FF does not support L3
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800189 ("*", "*", "*", "3", "*", "IPC", "*", "*", "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800190 # Musca requires BL2
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800191 ("arm/musca_b1/sse_200", "*", "*", "*", "*", "*", "*", False, "*", "*", "*"),
192 ("arm/musca_s1", "*", "*", "*", "*", "*", "*", False, "*", "*", "*"),
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800193 # Only AN521 and MUSCA_B1 support Isolation Level 3
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800194 ("arm/mps2/an519", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*"),
195 ("arm/mps3/an524", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*"),
196 ("arm/musca_s1", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800197 ]
198
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100199# Configure build manager to build several combinations
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800200# Config group for per-patch job
201config_pp_test = {"seed_params": {
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800202 # AN519_ARMCLANG_IPC_1_REG_Debug_BL2
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800203 "tfm_platform": ["arm/mps2/an519"],
204 "compiler": ["ARMCLANG_6_13"],
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800205 "lib_model": [False],
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800206 "isolation_level": ["1"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800207 "test_regression": [True],
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800208 "test_psa_api": ["OFF"],
209 "cmake_build_type": ["Debug"],
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800210 "with_bl2": [True],
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800211 "profile": [""],
212 "partition_ps": ["ON"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800213 "extra_params": [""]
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800214 },
215 "common_params": _common_tfm_builder_cfg,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800216 "valid": [
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800217 # AN519_ARMCLANG_IPC_2_REG_Release_BL2
218 ("arm/mps2/an519", "ARMCLANG_6_13", False, "2",
219 True, "OFF", "Release", True, "", "ON", ""),
220 # AN519_GCC_IPC_1_REG_Debug_BL2
221 ("arm/mps2/an519", "GCC_7_3_1", False, "1",
222 True, "OFF", "Debug", True, "", "ON", ""),
223 # AN519_GCC_IPC_2_REG_Release_BL2
224 ("arm/mps2/an519", "GCC_7_3_1", False, "2",
225 True, "OFF", "Release", True, "", "ON", ""),
226 # AN519_GCC_LIB_1_REG_Debug_BL2
227 ("arm/mps2/an519", "GCC_7_3_1", True, "1",
228 True, "OFF", "Debug", True, "", "ON", ""),
229 # AN521_ARMCLANG_IPC_1_REG_Debug_BL2
230 ("arm/mps2/an521", "ARMCLANG_6_13", False, "1",
231 True, "OFF", "Debug", True, "", "ON", ""),
232 # AN521_ARMCLANG_IPC_2_Debug_BL2
233 ("arm/mps2/an521", "ARMCLANG_6_13", False, "2",
234 False, "OFF", "Debug", True, "", "ON", ""),
235 # AN521_ARMCLANG_IPC_2_REG_Release_BL2
236 ("arm/mps2/an521", "ARMCLANG_6_13", False, "2",
237 True, "OFF", "Release", True, "", "ON", ""),
238 # AN521_ARMCLANG_IPC_3_REG_Minsizerel_BL2
239 ("arm/mps2/an521", "ARMCLANG_6_13", False, "3",
240 True, "OFF", "Minsizerel", True, "", "ON", ""),
241 # AN521_ARMCLANG_IPC_3_Release_BL2
242 ("arm/mps2/an521", "ARMCLANG_6_13", False, "3",
243 False, "OFF", "Release", True, "", "ON", ""),
244 # AN521_GCC_IPC_1_REG_Debug_BL2
245 ("arm/mps2/an521", "GCC_7_3_1", False, "1",
246 True, "OFF", "Debug", True, "", "ON", ""),
247 # AN521_GCC_IPC_2_Debug_BL2_MEDIUM
248 ("arm/mps2/an521", "GCC_7_3_1", False, "2",
249 False, "OFF", "Debug", True, "profile_medium", "ON", ""),
250 # AN521_GCC_IPC_2_REG_Release_BL2
251 ("arm/mps2/an521", "GCC_7_3_1", False, "2",
252 True, "OFF", "Release", True, "", "ON", ""),
253 # AN521_GCC_IPC_3_Debug_BL2_LARGE
254 ("arm/mps2/an521", "GCC_7_3_1", False, "3",
255 False, "OFF", "Debug", True, "profile_large", "ON", ""),
256 # AN521_GCC_IPC_3_REG_Minsizerel_BL2
257 ("arm/mps2/an521", "GCC_7_3_1", False, "3",
258 True, "OFF", "Minsizerel", True, "", "ON", ""),
259 # AN521_GCC_LIB_1_Debug_BL2
260 ("arm/mps2/an521", "GCC_7_3_1", True, "1",
261 False, "OFF", "Debug", True, "", "ON", ""),
262 # AN521_GCC_LIB_1_REG_Debug_BL2
263 ("arm/mps2/an521", "GCC_7_3_1", True, "1",
264 True, "OFF", "Debug", True, "", "ON", ""),
265 # AN521_GCC_IPC_2_REG_Release_BL2_MEDIUM_PSOFF
266 ("arm/mps2/an521", "GCC_7_3_1", False, "2",
267 True, "OFF", "Release", True, "profile_medium", "OFF", ""),
268 # AN552_GNUARM_IPC_1_REG_Debug_BL2
269 ("arm/mps3/an552", "GCC_10_3", False, "1",
270 True, "OFF", "Debug", True, "", "ON", ""),
271 # AN552_GNUARM_IPC_1_REG_Release_BL2
272 ("arm/mps3/an552", "GCC_10_3", False, "1",
273 True, "OFF", "Release", True, "", "ON", ""),
274 # MUSCA_B1_GCC_LIB_1_REG_Minsizerel_BL2
275 ("arm/musca_b1/sse_200", "GCC_7_3_1", True, "1",
276 True, "OFF", "Minsizerel", True, "", "ON", ""),
277 # MUSCA_S1_ARMCLANG_IPC_2_REG_Release_BL2
278 ("arm/musca_s1", "ARMCLANG_6_13", False, "2",
279 True, "OFF", "Release", True, "", "ON", ""),
280 # MUSCA_S1_GCC_IPC_1_REG_Debug_BL2
281 ("arm/musca_s1", "GCC_10_3", False, "1",
282 True, "OFF", "Debug", True, "", "ON", ""),
283 # MUSCA_S1_GCC_IPC_2_REG_Release_BL2
284 ("arm/musca_s1", "GCC_10_3", False, "2",
285 True, "OFF", "Release", True, "", "ON", ""),
286 # MUSCA_S1_GCC_LIB_1_REG_Debug_BL2
287 ("arm/musca_s1", "GCC_10_3", True, "1",
288 True, "OFF", "Debug", True, "", "ON", ""),
Mark Horvath93cb5fb2022-09-06 17:51:24 +0200289 # MUSCA_S1_GCC_IPC_2_REG_Release_BL2_FPON
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800290 ("arm/musca_s1", "GCC_10_3", False, "2",
Mark Horvath93cb5fb2022-09-06 17:51:24 +0200291 True, "OFF", "Release", True, "", "ON", "FPON"),
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800292 # MUSCA_S1_GCC_IPC_1_REG_Release_BL2_CC_DRIVER_PSA
293 ("arm/musca_s1", "GCC_7_3_1", False, "1",
294 True, "OFF", "Release", True, "", "ON", "CC_DRIVER_PSA"),
295 # stm32l562e_dk_ARMCLANG_IPC_1_REG_Release_BL2
296 ("stm/stm32l562e_dk", "ARMCLANG_6_13", False, "1",
297 True, "OFF", "Release", True, "", "ON", "CRYPTO_OFF"),
298 # stm32l562e_dk_GCC_IPC_2_REG_Release_BL2
299 ("stm/stm32l562e_dk", "GCC_7_3_1", False, "2",
300 False, "OFF", "Release", True, "", "ON", "CRYPTO_ON"),
301 # stm32l562e_dk_GCC_IPC_3_REG_Release_BL2
302 ("stm/stm32l562e_dk", "GCC_7_3_1", False, "3",
303 True, "OFF", "Release", True, "", "ON", "CRYPTO_OFF"),
304 # psoc64_GCC_IPC_2_REG_Release
305 ("cypress/psoc64", "GCC_7_3_1", False, "2",
306 True, "OFF", "Release", False, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800307 ],
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800308 "invalid": _common_tfm_invalid_configs + []
309 }
310
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800311# Config group for nightly job
312config_nightly_test = {"seed_params": {
313 "tfm_platform": ["arm/mps2/an519",
314 "arm/mps2/an521",
315 "arm/mps3/an524",
316 "arm/musca_s1",
317 "arm/musca_b1/sse_200"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800318 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800319 "lib_model": [True, False],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800320 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800321 "test_regression": [True, False],
322 "test_psa_api": ["OFF"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800323 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800324 "with_bl2": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800325 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800326 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800327 "extra_params": [""]
Minos Galanakisea421232019-06-20 17:11:28 +0100328 },
329 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800330 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +0100331 }
332
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800333# Config group for release job
334config_release_test = {"seed_params": {
335 "tfm_platform": ["arm/mps2/an519",
336 "arm/mps2/an521",
337 "arm/mps3/an524",
338 "arm/musca_b1/sse_200",
339 "arm/musca_s1"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800340 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800341 "lib_model": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800342 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800343 "test_regression": [True, False],
344 "test_psa_api": ["OFF"],
345 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800346 "with_bl2": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800347 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800348 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800349 "extra_params": [""]
Xinyu Zhangb708f572020-09-15 11:43:46 +0800350 },
351 "common_params": _common_tfm_builder_cfg,
Xinyu Zhang47bfc0e2022-04-06 17:26:59 +0800352 "valid": [
353 # sanity test for GCC v11.2
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800354 # AN521_GCC_IPC_3_REG_Relwithdebinfo_BL2
Xinyu Zhang47bfc0e2022-04-06 17:26:59 +0800355 ("arm/mps2/an521", "GCC_11_2",
356 False, "3", True, "OFF", "Relwithdebinfo",
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800357 True, "", "ON", ""),
Xinyu Zhang47bfc0e2022-04-06 17:26:59 +0800358 ],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800359 "invalid": _common_tfm_invalid_configs + []
360 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800361
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800362# Config groups for TF-M features
363config_profile_s = {"seed_params": {
David Huda27ae72022-03-28 15:32:19 +0800364 "tfm_platform": ["arm/mps2/an519", "arm/mps2/an521"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800365 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
David Huda27ae72022-03-28 15:32:19 +0800366 "lib_model": [True],
367 "isolation_level": ["1"],
368 "test_regression": [True, False],
369 "test_psa_api": ["OFF"],
370 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
David Huda27ae72022-03-28 15:32:19 +0800371 "with_bl2": [True],
David Huda27ae72022-03-28 15:32:19 +0800372 "profile": ["profile_small"],
373 "partition_ps": ["OFF"],
374 "extra_params": [""]
375 },
376 "common_params": _common_tfm_builder_cfg,
377 "valid": [
378 # Profile Small also supports SFN model
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800379 ("*", "*", False, "*", "*", "*",
Xinyu Zhang1fa7f982022-04-20 17:46:17 +0800380 "*", "*", "*", "*", "SFN")
David Huda27ae72022-03-28 15:32:19 +0800381 ],
382 "invalid": _common_tfm_invalid_configs + [
Xinyu Zhang433771e2022-04-01 16:49:17 +0800383 ("arm/mps2/an519", "GCC_7_3_1", "*", "*", "*",
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800384 "*", "Minsizerel", "*", "*", "*", "*")
David Huda27ae72022-03-28 15:32:19 +0800385 ]
386 }
387
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800388config_profile_m = {"seed_params": {
389 "tfm_platform": ["arm/mps2/an519",
390 "arm/mps2/an521",
391 "arm/musca_b1/sse_200"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800392 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800393 "lib_model": [False],
394 "isolation_level": ["2"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800395 "test_regression": [True, False],
396 "test_psa_api": ["OFF"],
397 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800398 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800399 "profile": ["profile_medium"],
400 "partition_ps": ["ON", "OFF"],
401 "extra_params": [""]
402 },
403 "common_params": _common_tfm_builder_cfg,
404 "invalid": _common_tfm_invalid_configs + []
405 }
406
407config_profile_l = {"seed_params": {
408 "tfm_platform": ["arm/mps2/an521"],
409 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
410 "lib_model": [False],
411 "isolation_level": ["3"],
412 "test_regression": [True, False],
413 "test_psa_api": ["OFF"],
414 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800415 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800416 "profile": ["profile_large"],
417 "partition_ps": ["ON", "OFF"],
418 "extra_params": [""]
419 },
420 "common_params": _common_tfm_builder_cfg,
421 "invalid": _common_tfm_invalid_configs + []
422 }
423
424config_cc_driver_psa = {"seed_params": {
425 "tfm_platform": ["arm/musca_b1/sse_200",
426 "arm/musca_s1"],
427 "compiler": ["GCC_7_3_1"],
428 "lib_model": [False],
429 "isolation_level": ["1"],
430 "test_regression": [True],
431 "test_psa_api": ["OFF"],
432 "cmake_build_type": ["Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800433 "with_bl2": [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 Zhangb708f572020-09-15 11:43:46 +0800451 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800452 "partition_ps": ["ON"],
Mark Horvath93cb5fb2022-09-06 17:51:24 +0200453 "extra_params": ["FPOFF", "FPON", "FPON, LZOFF"]
Xinyu Zhangb708f572020-09-15 11:43:46 +0800454 },
455 "common_params": _common_tfm_builder_cfg,
456 "invalid": _common_tfm_invalid_configs + []
457 }
Karl Zhangeffed972020-06-30 15:48:01 +0800458
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800459config_psa_api = {"seed_params": {
460 "tfm_platform": ["arm/mps2/an521",
461 "arm/musca_b1/sse_200",
462 "arm/musca_s1"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800463 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800464 "lib_model": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800465 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800466 "test_regression": [False],
467 "test_psa_api": ["IPC",
468 "CRYPTO",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800469 "INITIAL_ATTESTATION",
Xinyu Zhang39acb412021-07-09 20:35:19 +0800470 "STORAGE"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800471 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800472 "with_bl2": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800473 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800474 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800475 "extra_params": [""]
Xinyu Zhangb708f572020-09-15 11:43:46 +0800476 },
477 "common_params": _common_tfm_builder_cfg,
Paul Sokolovsky75f67e82022-05-02 15:39:41 +0300478 "invalid": _common_tfm_invalid_configs + []
Xinyu Zhangb708f572020-09-15 11:43:46 +0800479 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800480
Xinyu Zhang050e39a2021-11-16 14:38:15 +0800481config_nsce = {"seed_params": {
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +0800482 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800483 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +0800484 "lib_model": [True, False],
485 "isolation_level": ["1", "2", "3"],
486 "test_regression": [True],
487 "test_psa_api": ["OFF"],
488 "cmake_build_type": ["Debug"],
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +0800489 "with_bl2": [True],
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +0800490 "profile": [""],
491 "partition_ps": ["ON"],
Xinyu Zhang67612992021-12-20 14:11:27 +0800492 "extra_params": ["NSCE"]
Xinyu Zhanga1088e22021-11-11 18:02:45 +0800493 },
494 "common_params": _common_tfm_builder_cfg,
495 "invalid": _common_tfm_invalid_configs + []
496 }
497
Xinyu Zhang050e39a2021-11-16 14:38:15 +0800498config_mmio = {"seed_params": {
Xinyu Zhanga1088e22021-11-11 18:02:45 +0800499 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800500 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhanga1088e22021-11-11 18:02:45 +0800501 "lib_model": [False],
502 "isolation_level": ["1"],
503 "test_regression": [True],
504 "test_psa_api": ["OFF"],
505 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga1088e22021-11-11 18:02:45 +0800506 "with_bl2": [True],
Xinyu Zhanga1088e22021-11-11 18:02:45 +0800507 "profile": [""],
508 "partition_ps": ["ON"],
Xinyu Zhang3bb01af2021-12-20 14:45:49 +0800509 "extra_params": ["MMIO"]
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +0800510 },
511 "common_params": _common_tfm_builder_cfg,
512 "invalid": _common_tfm_invalid_configs + []
513 }
514
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800515# Config groups for code coverage
516config_cov_profile_s = deepcopy(config_profile_s)
517config_cov_profile_s["seed_params"]["compiler"] = ["GCC_7_3_1"]
Xinyu Zhangbdc37e32022-04-06 17:47:44 +0800518
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800519config_cov_profile_m = deepcopy(config_profile_m)
520config_cov_profile_m["seed_params"]["compiler"] = ["GCC_7_3_1"]
Karl Zhang14573bc2020-06-08 09:23:21 +0800521
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800522config_cov_profile_l = deepcopy(config_profile_l)
523config_cov_profile_l["seed_params"]["compiler"] = ["GCC_7_3_1"]
Karl Zhang14573bc2020-06-08 09:23:21 +0800524
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800525config_cov_nsce = deepcopy(config_nsce)
526config_cov_nsce["seed_params"]["compiler"] = ["GCC_7_3_1"]
Karl Zhang14573bc2020-06-08 09:23:21 +0800527
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800528config_cov_mmio = deepcopy(config_mmio)
529config_cov_mmio["seed_params"]["compiler"] = ["GCC_7_3_1"]
Karl Zhang14573bc2020-06-08 09:23:21 +0800530
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800531# Config groups for platforms
532config_an519 = {"seed_params": {
Xinyu Zhangf25856a2021-06-17 14:06:46 +0800533 "tfm_platform": ["arm/mps2/an519"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800534 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800535 "lib_model": [True, False],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800536 "isolation_level": ["1", "2"],
537 "test_regression": [True, False],
538 "test_psa_api": ["OFF"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800539 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800540 "with_bl2": [True, False],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800541 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800542 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800543 "extra_params": ["", "NSOFF"]
Xinyu Zhangb708f572020-09-15 11:43:46 +0800544 },
545 "common_params": _common_tfm_builder_cfg,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800546 "invalid": _common_tfm_invalid_configs + []
547 }
548
549config_an521 = {"seed_params": {
550 "tfm_platform": ["arm/mps2/an521"],
551 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
552 "lib_model": [True, False],
553 "isolation_level": ["1", "2", "3"],
554 "test_regression": [True, False],
555 "test_psa_api": ["OFF"],
556 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800557 "with_bl2": [True, False],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800558 "profile": [""],
559 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800560 "extra_params": ["", "NSOFF"]
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800561 },
562 "common_params": _common_tfm_builder_cfg,
563 "invalid": _common_tfm_invalid_configs + []
564 }
565
566config_an524 = {"seed_params": {
567 "tfm_platform": ["arm/mps3/an524"],
568 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
569 "lib_model": [True, False],
570 "isolation_level": ["1", "2"],
571 "test_regression": [True, False],
572 "test_psa_api": ["OFF"],
573 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800574 "with_bl2": [True, False],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800575 "profile": [""],
576 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800577 "extra_params": ["", "NSOFF"]
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800578 },
579 "common_params": _common_tfm_builder_cfg,
580 "invalid": _common_tfm_invalid_configs + []
Xinyu Zhangb708f572020-09-15 11:43:46 +0800581 }
Dean Birch4c6ad622020-03-13 11:28:03 +0000582
Xinyu Zhang38b76742021-11-11 13:57:56 +0800583config_an547 = {"seed_params": {
584 "tfm_platform": ["arm/mps3/an547"],
Bence Balogh176b78f2022-02-22 13:49:34 +0100585 "compiler": ["GCC_10_3"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800586 "lib_model": [False],
587 "isolation_level": ["1"],
588 "test_regression": [False],
589 "test_psa_api": ["OFF"],
590 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800591 "with_bl2": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800592 "profile": [""],
593 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800594 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800595 },
596 "common_params": _common_tfm_builder_cfg,
597 "invalid": _common_tfm_invalid_configs + []
598 }
599
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800600config_an552 = {"seed_params": {
601 "tfm_platform": ["arm/mps3/an552"],
602 "compiler": ["GCC_10_3"],
603 "lib_model": [True, False],
604 "isolation_level": ["1", "2"],
605 "test_regression": [True, False],
606 "test_psa_api": ["OFF"],
607 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800608 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800609 "profile": [""],
610 "partition_ps": ["ON"],
611 "extra_params": [""]
612 },
613 "common_params": _common_tfm_builder_cfg,
614 "invalid": _common_tfm_invalid_configs + []
615 }
616
617config_musca_b1 = {"seed_params": {
618 "tfm_platform": ["arm/musca_b1/sse_200"],
619 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
620 "lib_model": [True, False],
621 "isolation_level": ["1", "2", "3"],
622 "test_regression": [True, False],
623 "test_psa_api": ["OFF"],
624 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800625 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800626 "profile": [""],
627 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800628 "extra_params": ["", "NSOFF"]
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800629 },
630 "common_params": _common_tfm_builder_cfg,
631 "invalid": _common_tfm_invalid_configs + []
632 }
633
634config_musca_b1_se = {"seed_params": {
635 "tfm_platform": ["arm/musca_b1/secure_enclave"],
636 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
637 "lib_model": [False],
638 "isolation_level": ["1"],
639 "test_regression": [False],
640 "test_psa_api": ["OFF"],
641 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800642 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800643 "profile": [""],
644 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800645 "extra_params": ["NSOFF"]
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800646 },
647 "common_params": _common_tfm_builder_cfg,
648 "invalid": _common_tfm_invalid_configs + []
649 }
650
651config_musca_s1 = {"seed_params": {
652 "tfm_platform": ["arm/musca_s1"],
653 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
654 "lib_model": [True, False],
655 "isolation_level": ["1", "2"],
656 "test_regression": [True, False],
657 "test_psa_api": ["OFF"],
658 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800659 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800660 "profile": [""],
661 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800662 "extra_params": ["", "NSOFF"]
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800663 },
664 "common_params": _common_tfm_builder_cfg,
665 "invalid": _common_tfm_invalid_configs + []
666 }
667
Bence Balogh8731a092022-05-24 17:24:54 +0200668config_corstone310 = {"seed_params": {
669 "tfm_platform": ["arm/mps3/corstone310_fvp"],
Bence Balogh176b78f2022-02-22 13:49:34 +0100670 "compiler": ["GCC_10_3"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800671 "lib_model": [False],
672 "isolation_level": ["1"],
673 "test_regression": [False],
674 "test_psa_api": ["OFF"],
675 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800676 "with_bl2": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800677 "profile": [""],
678 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800679 "extra_params": ["NSOFF"]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800680 },
681 "common_params": _common_tfm_builder_cfg,
682 "invalid": _common_tfm_invalid_configs + []
683 }
684
Jamie Foxf3b8aa82022-09-08 11:52:01 +0100685config_rss = {"seed_params": {
686 "tfm_platform": ["arm/rss"],
687 "compiler": ["GCC_10_3"],
688 "lib_model": [False],
689 "isolation_level": ["1", "2"],
690 "test_regression": [True, False],
691 "test_psa_api": ["OFF"],
692 "cmake_build_type": ["Debug", "Release"],
693 "with_bl2": [True],
694 "profile": [""],
695 "partition_ps": ["OFF"],
696 "extra_params": [""]
697 },
698 "common_params": _common_tfm_builder_cfg,
699 "invalid": _common_tfm_invalid_configs + []
700 }
701
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800702config_psoc64 = {"seed_params": {
703 "tfm_platform": ["cypress/psoc64"],
704 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
705 "lib_model": [False],
706 "isolation_level": ["1", "2"],
707 "test_regression": [True],
708 "test_psa_api": ["OFF"],
709 "cmake_build_type": ["Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800710 "with_bl2": [False],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800711 "profile": [""],
712 "partition_ps": ["ON"],
713 "extra_params": [""]
714 },
715 "common_params": _common_tfm_builder_cfg,
716 "invalid": _common_tfm_invalid_configs + []
717 }
718
719config_corstone1000 = {"seed_params": {
720 "tfm_platform": ["arm/corstone1000"],
721 "compiler": ["GCC_7_3_1"],
722 "lib_model": [False],
723 "isolation_level": ["1"],
Satish Kumar1cfdd912022-08-01 09:24:07 +0100724 "test_regression": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800725 "test_psa_api": ["OFF"],
726 "cmake_build_type": ["Debug"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800727 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800728 "profile": [""],
729 "partition_ps": ["ON"],
Xinyu Zhangfc061dd2022-07-26 14:52:56 +0800730 "extra_params": ["S_PS_OFF, FVP", "FPGA"]
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800731 },
732 "common_params": _common_tfm_builder_cfg,
733 "invalid": _common_tfm_invalid_configs + []
734 }
735
736config_stm32l562e_dk = {"seed_params": {
737 "tfm_platform": ["stm/stm32l562e_dk"],
738 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
739 "lib_model": [True, False],
740 "isolation_level": ["1", "2", "3"],
741 "test_regression": [True, False],
742 "test_psa_api": ["OFF"],
743 "cmake_build_type": ["Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800744 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800745 "profile": [""],
746 "partition_ps": ["ON"],
747 "extra_params": ["CRYPTO_OFF", "CRYPTO_ON"]
748 },
749 "common_params": _common_tfm_builder_cfg,
750 "invalid": _common_tfm_invalid_configs + [
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800751 # Oversize issue on config stm32l562e_dk_ARMCLANG_LIB_1_REG_Release_BL2
752 ("stm/stm32l562e_dk", "ARMCLANG_6_13", True, "1",
753 True, "OFF", "Release", True, "", "ON", "*"),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800754 # all other tests are off when CRYPTO is ON
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800755 ("stm/stm32l562e_dk", "*", "*", "*", True, "*",
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800756 "*", "*", "*", "*", "CRYPTO_ON"),
757 # all other tests are ON when CRYPTO is OFF
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800758 ("stm/stm32l562e_dk", "*", "*", "*", False, "*",
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800759 "*", "*", "*", "*", "CRYPTO_OFF"),
760 ]
761 }
762
763config_b_u585i_iot02a = {"seed_params": {
764 "tfm_platform": ["stm/b_u585i_iot02a"],
765 "compiler": ["GCC_7_3_1"],
766 "lib_model": [False],
767 "isolation_level": ["1"],
768 "test_regression": [False],
769 "test_psa_api": ["OFF"],
770 "cmake_build_type": ["Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800771 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800772 "profile": [""],
773 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800774 "extra_params": ["NSOFF"]
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800775 },
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],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800789 "profile": [""],
790 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800791 "extra_params": ["NSOFF"]
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800792 },
793 "common_params": _common_tfm_builder_cfg,
794 "invalid": _common_tfm_invalid_configs + []
795 }
796
797config_lpcxpresso55s69 = {"seed_params": {
798 "tfm_platform": ["nxp/lpcxpresso55s69"],
799 "compiler": ["GCC_7_3_1"],
800 "lib_model": [False],
801 "isolation_level": ["2"],
802 "test_regression": [True, False],
803 "test_psa_api": ["OFF"],
804 "cmake_build_type": ["Relwithdebinfo"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800805 "with_bl2": [False],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800806 "profile": ["profile_medium"],
807 "partition_ps": ["ON"],
808 "extra_params": [""]
809 },
810 "common_params": _common_tfm_builder_cfg,
811 "invalid": _common_tfm_invalid_configs + []
812 }
813
Xinyu Zhang38b76742021-11-11 13:57:56 +0800814config_bl5340 = {"seed_params": {
815 "tfm_platform": ["lairdconnectivity/bl5340_dvk_cpuapp"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800816 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800817 "lib_model": [False],
818 "isolation_level": ["1"],
819 "test_regression": [False],
820 "test_psa_api": ["OFF"],
821 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800822 "with_bl2": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800823 "profile": [""],
824 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800825 "extra_params": ["NSOFF"]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800826 },
827 "common_params": _common_tfm_builder_cfg,
828 "invalid": _common_tfm_invalid_configs + []
829 }
830
831config_nrf5340dk = {"seed_params": {
832 "tfm_platform": ["nordic_nrf/nrf5340dk_nrf5340_cpuapp"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800833 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800834 "lib_model": [False],
835 "isolation_level": ["1"],
836 "test_regression": [False],
837 "test_psa_api": ["OFF"],
838 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800839 "with_bl2": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800840 "profile": [""],
841 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800842 "extra_params": ["NSOFF"]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800843 },
844 "common_params": _common_tfm_builder_cfg,
845 "invalid": _common_tfm_invalid_configs + []
846 }
847
848config_nrf9160dk = {"seed_params": {
849 "tfm_platform": ["nordic_nrf/nrf9160dk_nrf9160"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800850 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800851 "lib_model": [False],
852 "isolation_level": ["1"],
853 "test_regression": [False],
854 "test_psa_api": ["OFF"],
855 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800856 "with_bl2": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800857 "profile": [""],
858 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800859 "extra_params": ["NSOFF"]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800860 },
861 "common_params": _common_tfm_builder_cfg,
862 "invalid": _common_tfm_invalid_configs + []
863 }
864
865config_m2351 = {"seed_params": {
866 "tfm_platform": ["nuvoton/m2351"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800867 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800868 "lib_model": [False],
869 "isolation_level": ["1"],
870 "test_regression": [False],
871 "test_psa_api": ["OFF"],
872 "cmake_build_type": ["Release"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800873 "with_bl2": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800874 "profile": [""],
875 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800876 "extra_params": ["NSOFF"]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800877 },
878 "common_params": _common_tfm_builder_cfg,
879 "invalid": _common_tfm_invalid_configs + []
880 }
881
882config_m2354 = {"seed_params": {
883 "tfm_platform": ["nuvoton/m2354"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800884 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800885 "lib_model": [False],
886 "isolation_level": ["1"],
887 "test_regression": [False],
888 "test_psa_api": ["OFF"],
889 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800890 "with_bl2": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800891 "profile": [""],
892 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800893 "extra_params": ["NSOFF"]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800894 },
895 "common_params": _common_tfm_builder_cfg,
896 "invalid": _common_tfm_invalid_configs + []
897 }
898
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800899# Config groups for debug
900config_debug = {"seed_params": {
901 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800902 "compiler": ["GCC_7_3_1"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800903 "lib_model": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800904 "isolation_level": ["1"],
905 "test_regression": [False],
906 "test_psa_api": ["OFF"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800907 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800908 "with_bl2": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800909 "profile": [""],
910 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800911 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800912 },
913 "common_params": _common_tfm_builder_cfg,
914 "invalid": _common_tfm_invalid_configs + []
915 }
916
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800917config_debug_regr = deepcopy(config_debug)
918config_debug_regr["seed_params"]["test_regression"] = [True]
919
920config_debug_PSA_API = {"seed_params": {
921 "tfm_platform": ["arm/mps2/an521"],
922 "compiler": ["ARMCLANG_6_13"],
923 "lib_model": [True],
924 "isolation_level": ["1"],
925 "test_regression": [False],
926 "test_psa_api": ["CRYPTO",
927 "INITIAL_ATTESTATION",
928 "STORAGE",
929 "IPC"],
930 "cmake_build_type": ["Debug"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800931 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800932 "profile": [""],
933 "partition_ps": ["ON"],
934 "extra_params": [""]
935 },
936 "common_params": _common_tfm_builder_cfg,
937 "invalid": _common_tfm_invalid_configs + []
938 }
939
940config_debug_PSA_API_nolib = {"seed_params": {
941 "tfm_platform": ["arm/mps2/an521"],
942 "compiler": ["ARMCLANG_6_13"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800943 "lib_model": [False],
944 "isolation_level": ["1"],
945 "test_regression": [False],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800946 "test_psa_api": ["CRYPTO",
947 "INITIAL_ATTESTATION",
948 "STORAGE",
949 "IPC"],
950 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800951 "with_bl2": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800952 "profile": [""],
953 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800954 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800955 },
956 "common_params": _common_tfm_builder_cfg,
957 "invalid": _common_tfm_invalid_configs + []
958 }
959
Karl Zhangaff558a2020-05-15 14:28:23 +0100960_builtin_configs = {
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800961 # per-patch test groups
962 "pp_test": config_pp_test,
963 "pp_corstone1000": config_corstone1000,
Karl Zhang14573bc2020-06-08 09:23:21 +0800964
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800965 # nightly test groups
966 "nightly_test": config_nightly_test,
967 "nightly_profile_s": config_profile_s,
968 "nightly_profile_m": config_profile_m,
969 "nightly_profile_l": config_profile_l,
970 "nightly_cc_driver_psa": config_cc_driver_psa,
971 "nightly_fp":config_fp,
972 "nightly_psa_api": config_psa_api,
Xinyu Zhang050e39a2021-11-16 14:38:15 +0800973 "nightly_nsce": config_nsce,
974 "nightly_mmio": config_mmio,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800975 "nightly_an547": config_an547,
976 "nightly_an552": config_an552,
977 "nightly_musca_b1_se": config_musca_b1_se,
Bence Balogh8731a092022-05-24 17:24:54 +0200978 "nightly_corstone310": config_corstone310,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800979 "nightly_corstone1000": config_corstone1000,
Jamie Foxf3b8aa82022-09-08 11:52:01 +0100980 "nightly_rss": config_rss,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800981 "nightly_psoc64": config_psoc64,
982 "nightly_stm32l562e_dk": config_stm32l562e_dk,
983 "nightly_lpcxpresso55s69": config_lpcxpresso55s69,
Karl Zhang14573bc2020-06-08 09:23:21 +0800984
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800985 # release test groups
986 "release_test": config_release_test,
987 "release_profile_s": config_profile_s,
988 "release_profile_m": config_profile_m,
989 "release_profile_l": config_profile_l,
990 "release_cc_driver_psa": config_cc_driver_psa,
991 "release_fp": config_fp,
992 "release_psa_api": config_psa_api,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800993 "release_nsce": config_nsce,
994 "release_mmio": config_mmio,
995 "release_an547": config_an547,
996 "release_an552": config_an552,
Bence Balogh8731a092022-05-24 17:24:54 +0200997 "release_corstone310": config_corstone310,
Jamie Foxf3b8aa82022-09-08 11:52:01 +0100998 "release_rss": config_rss,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800999 "release_psoc64": config_psoc64,
1000 "release_stm32l562e_dk": config_stm32l562e_dk,
1001 "release_lpcxpresso55s69": config_lpcxpresso55s69,
Karl Zhang14573bc2020-06-08 09:23:21 +08001002
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001003 # code coverage test groups
1004 "coverage_profile_s": config_cov_profile_s,
1005 "coverage_profile_m": config_cov_profile_m,
1006 "coverage_profile_l": config_cov_profile_l,
1007 "coverage_nsce": config_cov_nsce,
1008 "coverage_mmio": config_cov_mmio,
1009 "coverage_fp": config_fp,
Xinyu Zhangf25856a2021-06-17 14:06:46 +08001010
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001011 # platform groups
1012 "an521": config_an521,
1013 "an519": config_an519,
1014 "an524": config_an524,
1015 "an547": config_an547,
1016 "an552": config_an552,
1017 "musca_b1": config_musca_b1,
1018 "musca_b1_se": config_musca_b1_se,
1019 "musca_s1": config_musca_s1,
Bence Balogh8731a092022-05-24 17:24:54 +02001020 "corstone310": config_corstone310,
Jamie Foxf3b8aa82022-09-08 11:52:01 +01001021 "rss": config_rss,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001022 "cypress_psoc64": config_psoc64,
1023 "corstone1000": config_corstone1000,
1024 "stm_stm32l562e_dk": config_stm32l562e_dk,
1025 "stm_b_u585i_iot02a": config_b_u585i_iot02a,
1026 "stm_nucleo_l552ze_q": config_nucleo_l552ze_q,
1027 "nxp_lpcxpresso55s69": config_lpcxpresso55s69,
Xinyu Zhang38b76742021-11-11 13:57:56 +08001028 "laird_bl5340": config_bl5340,
1029 "nordic_nrf5340dk": config_nrf5340dk,
1030 "nordic_nrf9160dk": config_nrf9160dk,
1031 "nuvoton_m2351": config_m2351,
1032 "nuvoton_m2354": config_m2354,
Xinyu Zhang38b76742021-11-11 13:57:56 +08001033
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001034 # config groups for debug
Dean Birch4c6ad622020-03-13 11:28:03 +00001035 "debug": config_debug,
Paul Sokolovsky6c3c6562022-04-04 23:23:02 +03001036 "debug_regr": config_debug_regr,
Paul Sokolovsky1ec752b2022-01-22 19:50:58 +03001037 "debug_PSA_API": config_debug_PSA_API,
Paul Sokolovsky49a99282022-02-02 23:43:37 +03001038 "debug_PSA_API_nolib": config_debug_PSA_API_nolib,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001039 }
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001040
1041if __name__ == '__main__':
1042 import os
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001043
Minos Galanakisea421232019-06-20 17:11:28 +01001044 # Default behavior is to export refference config when called
1045 _dir = os.getcwd()
1046 from utils import save_json
1047 for _cname, _cfg in _builtin_configs.items():
1048 _fname = os.path.join(_dir, _cname + ".json")
1049 print("Exporting config %s" % _fname)
1050 save_json(_fname, _cfg)