blob: e0cbd8ec1e3f78c3b5cb4b408e5a07b027fe90b9 [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", ""),
Xinyu Zhangc3252782022-09-05 18:24:16 +0800229 # AN521_ARMCLANG_LIB_1_REG_Debug_BL2_SMALL_PSOFF
230 ("arm/mps2/an521", "ARMCLANG_6_13", True, "1",
231 True, "OFF", "Debug", True, "profile_small", "OFF", ""),
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800232 # AN521_ARMCLANG_IPC_1_REG_Debug_BL2
233 ("arm/mps2/an521", "ARMCLANG_6_13", False, "1",
234 True, "OFF", "Debug", True, "", "ON", ""),
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800235 # 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", ""),
Xinyu Zhangc3252782022-09-05 18:24:16 +0800241 # AN521_ARMCLANG_IPC_1_REG_Debug_BL2_SMALL_PSOFF_SFN
242 ("arm/mps2/an521", "ARMCLANG_6_13", False, "1",
243 True, "OFF", "Debug", True, "profile_small", "OFF", "SFN"),
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800244 # 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", ""),
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800253 # AN521_GCC_IPC_3_REG_Minsizerel_BL2
254 ("arm/mps2/an521", "GCC_7_3_1", False, "3",
255 True, "OFF", "Minsizerel", True, "", "ON", ""),
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800256 # AN521_GCC_LIB_1_REG_Debug_BL2
257 ("arm/mps2/an521", "GCC_7_3_1", True, "1",
258 True, "OFF", "Debug", True, "", "ON", ""),
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800259 # AN552_GNUARM_IPC_1_REG_Debug_BL2
260 ("arm/mps3/an552", "GCC_10_3", False, "1",
261 True, "OFF", "Debug", True, "", "ON", ""),
262 # AN552_GNUARM_IPC_1_REG_Release_BL2
263 ("arm/mps3/an552", "GCC_10_3", False, "1",
264 True, "OFF", "Release", True, "", "ON", ""),
265 # MUSCA_B1_GCC_LIB_1_REG_Minsizerel_BL2
266 ("arm/musca_b1/sse_200", "GCC_7_3_1", True, "1",
267 True, "OFF", "Minsizerel", True, "", "ON", ""),
268 # MUSCA_S1_ARMCLANG_IPC_2_REG_Release_BL2
269 ("arm/musca_s1", "ARMCLANG_6_13", False, "2",
270 True, "OFF", "Release", True, "", "ON", ""),
271 # MUSCA_S1_GCC_IPC_1_REG_Debug_BL2
272 ("arm/musca_s1", "GCC_10_3", False, "1",
273 True, "OFF", "Debug", True, "", "ON", ""),
274 # MUSCA_S1_GCC_IPC_2_REG_Release_BL2
275 ("arm/musca_s1", "GCC_10_3", False, "2",
276 True, "OFF", "Release", True, "", "ON", ""),
277 # MUSCA_S1_GCC_LIB_1_REG_Debug_BL2
278 ("arm/musca_s1", "GCC_10_3", True, "1",
279 True, "OFF", "Debug", True, "", "ON", ""),
Mark Horvath93cb5fb2022-09-06 17:51:24 +0200280 # MUSCA_S1_GCC_IPC_2_REG_Release_BL2_FPON
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800281 ("arm/musca_s1", "GCC_10_3", False, "2",
Mark Horvath93cb5fb2022-09-06 17:51:24 +0200282 True, "OFF", "Release", True, "", "ON", "FPON"),
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800283 # MUSCA_S1_GCC_IPC_1_REG_Release_BL2_CC_DRIVER_PSA
284 ("arm/musca_s1", "GCC_7_3_1", False, "1",
285 True, "OFF", "Release", True, "", "ON", "CC_DRIVER_PSA"),
286 # stm32l562e_dk_ARMCLANG_IPC_1_REG_Release_BL2
287 ("stm/stm32l562e_dk", "ARMCLANG_6_13", False, "1",
288 True, "OFF", "Release", True, "", "ON", "CRYPTO_OFF"),
289 # stm32l562e_dk_GCC_IPC_2_REG_Release_BL2
290 ("stm/stm32l562e_dk", "GCC_7_3_1", False, "2",
291 False, "OFF", "Release", True, "", "ON", "CRYPTO_ON"),
292 # stm32l562e_dk_GCC_IPC_3_REG_Release_BL2
293 ("stm/stm32l562e_dk", "GCC_7_3_1", False, "3",
294 True, "OFF", "Release", True, "", "ON", "CRYPTO_OFF"),
295 # psoc64_GCC_IPC_2_REG_Release
296 ("cypress/psoc64", "GCC_7_3_1", False, "2",
297 True, "OFF", "Release", False, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800298 ],
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800299 "invalid": _common_tfm_invalid_configs + []
300 }
301
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800302# Config group for nightly job
303config_nightly_test = {"seed_params": {
304 "tfm_platform": ["arm/mps2/an519",
305 "arm/mps2/an521",
306 "arm/mps3/an524",
307 "arm/musca_s1",
308 "arm/musca_b1/sse_200"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800309 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800310 "lib_model": [True, False],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800311 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800312 "test_regression": [True, False],
313 "test_psa_api": ["OFF"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800314 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800315 "with_bl2": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800316 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800317 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800318 "extra_params": [""]
Minos Galanakisea421232019-06-20 17:11:28 +0100319 },
320 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800321 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +0100322 }
323
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800324# Config group for release job
325config_release_test = {"seed_params": {
326 "tfm_platform": ["arm/mps2/an519",
327 "arm/mps2/an521",
328 "arm/mps3/an524",
329 "arm/musca_b1/sse_200",
330 "arm/musca_s1"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800331 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800332 "lib_model": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800333 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800334 "test_regression": [True, False],
335 "test_psa_api": ["OFF"],
336 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800337 "with_bl2": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800338 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800339 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800340 "extra_params": [""]
Xinyu Zhangb708f572020-09-15 11:43:46 +0800341 },
342 "common_params": _common_tfm_builder_cfg,
Xinyu Zhang47bfc0e2022-04-06 17:26:59 +0800343 "valid": [
344 # sanity test for GCC v11.2
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800345 # AN521_GCC_IPC_3_REG_Relwithdebinfo_BL2
Xinyu Zhang47bfc0e2022-04-06 17:26:59 +0800346 ("arm/mps2/an521", "GCC_11_2",
347 False, "3", True, "OFF", "Relwithdebinfo",
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800348 True, "", "ON", ""),
Xinyu Zhang47bfc0e2022-04-06 17:26:59 +0800349 ],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800350 "invalid": _common_tfm_invalid_configs + []
351 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800352
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800353# Config groups for TF-M features
354config_profile_s = {"seed_params": {
David Huda27ae72022-03-28 15:32:19 +0800355 "tfm_platform": ["arm/mps2/an519", "arm/mps2/an521"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800356 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
David Huda27ae72022-03-28 15:32:19 +0800357 "lib_model": [True],
358 "isolation_level": ["1"],
359 "test_regression": [True, False],
360 "test_psa_api": ["OFF"],
361 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
David Huda27ae72022-03-28 15:32:19 +0800362 "with_bl2": [True],
David Huda27ae72022-03-28 15:32:19 +0800363 "profile": ["profile_small"],
364 "partition_ps": ["OFF"],
365 "extra_params": [""]
366 },
367 "common_params": _common_tfm_builder_cfg,
368 "valid": [
369 # Profile Small also supports SFN model
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800370 ("*", "*", False, "*", "*", "*",
Xinyu Zhang1fa7f982022-04-20 17:46:17 +0800371 "*", "*", "*", "*", "SFN")
David Huda27ae72022-03-28 15:32:19 +0800372 ],
373 "invalid": _common_tfm_invalid_configs + [
Xinyu Zhang433771e2022-04-01 16:49:17 +0800374 ("arm/mps2/an519", "GCC_7_3_1", "*", "*", "*",
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800375 "*", "Minsizerel", "*", "*", "*", "*")
David Huda27ae72022-03-28 15:32:19 +0800376 ]
377 }
378
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800379config_profile_m = {"seed_params": {
380 "tfm_platform": ["arm/mps2/an519",
381 "arm/mps2/an521",
382 "arm/musca_b1/sse_200"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800383 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800384 "lib_model": [False],
385 "isolation_level": ["2"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800386 "test_regression": [True, False],
387 "test_psa_api": ["OFF"],
388 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800389 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800390 "profile": ["profile_medium"],
391 "partition_ps": ["ON", "OFF"],
392 "extra_params": [""]
393 },
394 "common_params": _common_tfm_builder_cfg,
395 "invalid": _common_tfm_invalid_configs + []
396 }
397
398config_profile_l = {"seed_params": {
399 "tfm_platform": ["arm/mps2/an521"],
400 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
401 "lib_model": [False],
402 "isolation_level": ["3"],
403 "test_regression": [True, False],
404 "test_psa_api": ["OFF"],
405 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800406 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800407 "profile": ["profile_large"],
408 "partition_ps": ["ON", "OFF"],
409 "extra_params": [""]
410 },
411 "common_params": _common_tfm_builder_cfg,
412 "invalid": _common_tfm_invalid_configs + []
413 }
414
415config_cc_driver_psa = {"seed_params": {
416 "tfm_platform": ["arm/musca_b1/sse_200",
417 "arm/musca_s1"],
418 "compiler": ["GCC_7_3_1"],
419 "lib_model": [False],
420 "isolation_level": ["1"],
421 "test_regression": [True],
422 "test_psa_api": ["OFF"],
423 "cmake_build_type": ["Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800424 "with_bl2": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800425 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800426 "partition_ps": ["ON"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800427 "extra_params": ["CC_DRIVER_PSA"]
Xinyu Zhangb708f572020-09-15 11:43:46 +0800428 },
429 "common_params": _common_tfm_builder_cfg,
430 "invalid": _common_tfm_invalid_configs + []
431 }
Karl Zhangaff558a2020-05-15 14:28:23 +0100432
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800433config_fp = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800434 "tfm_platform": ["arm/musca_s1"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800435 "compiler": ["GCC_10_3"],
436 "lib_model": [False],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800437 "isolation_level": ["1", "2"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800438 "test_regression": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800439 "test_psa_api": ["OFF"],
440 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800441 "with_bl2": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800442 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800443 "partition_ps": ["ON"],
Mark Horvath93cb5fb2022-09-06 17:51:24 +0200444 "extra_params": ["FPOFF", "FPON", "FPON, LZOFF"]
Xinyu Zhangb708f572020-09-15 11:43:46 +0800445 },
446 "common_params": _common_tfm_builder_cfg,
447 "invalid": _common_tfm_invalid_configs + []
448 }
Karl Zhangeffed972020-06-30 15:48:01 +0800449
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800450config_psa_api = {"seed_params": {
451 "tfm_platform": ["arm/mps2/an521",
452 "arm/musca_b1/sse_200",
453 "arm/musca_s1"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800454 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800455 "lib_model": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800456 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800457 "test_regression": [False],
458 "test_psa_api": ["IPC",
459 "CRYPTO",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800460 "INITIAL_ATTESTATION",
Xinyu Zhang39acb412021-07-09 20:35:19 +0800461 "STORAGE"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800462 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800463 "with_bl2": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800464 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800465 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800466 "extra_params": [""]
Xinyu Zhangb708f572020-09-15 11:43:46 +0800467 },
468 "common_params": _common_tfm_builder_cfg,
Paul Sokolovsky75f67e82022-05-02 15:39:41 +0300469 "invalid": _common_tfm_invalid_configs + []
Xinyu Zhangb708f572020-09-15 11:43:46 +0800470 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800471
Xinyu Zhang050e39a2021-11-16 14:38:15 +0800472config_nsce = {"seed_params": {
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +0800473 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800474 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +0800475 "lib_model": [True, False],
476 "isolation_level": ["1", "2", "3"],
477 "test_regression": [True],
478 "test_psa_api": ["OFF"],
479 "cmake_build_type": ["Debug"],
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +0800480 "with_bl2": [True],
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +0800481 "profile": [""],
482 "partition_ps": ["ON"],
Xinyu Zhang67612992021-12-20 14:11:27 +0800483 "extra_params": ["NSCE"]
Xinyu Zhanga1088e22021-11-11 18:02:45 +0800484 },
485 "common_params": _common_tfm_builder_cfg,
486 "invalid": _common_tfm_invalid_configs + []
487 }
488
Xinyu Zhang050e39a2021-11-16 14:38:15 +0800489config_mmio = {"seed_params": {
Xinyu Zhanga1088e22021-11-11 18:02:45 +0800490 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800491 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhanga1088e22021-11-11 18:02:45 +0800492 "lib_model": [False],
493 "isolation_level": ["1"],
494 "test_regression": [True],
495 "test_psa_api": ["OFF"],
496 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga1088e22021-11-11 18:02:45 +0800497 "with_bl2": [True],
Xinyu Zhanga1088e22021-11-11 18:02:45 +0800498 "profile": [""],
499 "partition_ps": ["ON"],
Xinyu Zhang3bb01af2021-12-20 14:45:49 +0800500 "extra_params": ["MMIO"]
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +0800501 },
502 "common_params": _common_tfm_builder_cfg,
503 "invalid": _common_tfm_invalid_configs + []
504 }
505
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800506# Config groups for code coverage
507config_cov_profile_s = deepcopy(config_profile_s)
508config_cov_profile_s["seed_params"]["compiler"] = ["GCC_7_3_1"]
Xinyu Zhangbdc37e32022-04-06 17:47:44 +0800509
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800510config_cov_profile_m = deepcopy(config_profile_m)
511config_cov_profile_m["seed_params"]["compiler"] = ["GCC_7_3_1"]
Karl Zhang14573bc2020-06-08 09:23:21 +0800512
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800513config_cov_profile_l = deepcopy(config_profile_l)
514config_cov_profile_l["seed_params"]["compiler"] = ["GCC_7_3_1"]
Karl Zhang14573bc2020-06-08 09:23:21 +0800515
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800516config_cov_nsce = deepcopy(config_nsce)
517config_cov_nsce["seed_params"]["compiler"] = ["GCC_7_3_1"]
Karl Zhang14573bc2020-06-08 09:23:21 +0800518
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800519config_cov_mmio = deepcopy(config_mmio)
520config_cov_mmio["seed_params"]["compiler"] = ["GCC_7_3_1"]
Karl Zhang14573bc2020-06-08 09:23:21 +0800521
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800522# Config groups for platforms
523config_an519 = {"seed_params": {
Xinyu Zhangf25856a2021-06-17 14:06:46 +0800524 "tfm_platform": ["arm/mps2/an519"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800525 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800526 "lib_model": [True, False],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800527 "isolation_level": ["1", "2"],
528 "test_regression": [True, False],
529 "test_psa_api": ["OFF"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800530 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800531 "with_bl2": [True, False],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800532 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800533 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800534 "extra_params": ["", "NSOFF"]
Xinyu Zhangb708f572020-09-15 11:43:46 +0800535 },
536 "common_params": _common_tfm_builder_cfg,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800537 "invalid": _common_tfm_invalid_configs + []
538 }
539
540config_an521 = {"seed_params": {
541 "tfm_platform": ["arm/mps2/an521"],
542 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
543 "lib_model": [True, False],
544 "isolation_level": ["1", "2", "3"],
545 "test_regression": [True, False],
546 "test_psa_api": ["OFF"],
547 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800548 "with_bl2": [True, False],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800549 "profile": [""],
550 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800551 "extra_params": ["", "NSOFF"]
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800552 },
553 "common_params": _common_tfm_builder_cfg,
554 "invalid": _common_tfm_invalid_configs + []
555 }
556
557config_an524 = {"seed_params": {
558 "tfm_platform": ["arm/mps3/an524"],
559 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
560 "lib_model": [True, False],
561 "isolation_level": ["1", "2"],
562 "test_regression": [True, False],
563 "test_psa_api": ["OFF"],
564 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800565 "with_bl2": [True, False],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800566 "profile": [""],
567 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800568 "extra_params": ["", "NSOFF"]
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800569 },
570 "common_params": _common_tfm_builder_cfg,
571 "invalid": _common_tfm_invalid_configs + []
Xinyu Zhangb708f572020-09-15 11:43:46 +0800572 }
Dean Birch4c6ad622020-03-13 11:28:03 +0000573
Xinyu Zhang38b76742021-11-11 13:57:56 +0800574config_an547 = {"seed_params": {
575 "tfm_platform": ["arm/mps3/an547"],
Bence Balogh176b78f2022-02-22 13:49:34 +0100576 "compiler": ["GCC_10_3"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800577 "lib_model": [False],
578 "isolation_level": ["1"],
579 "test_regression": [False],
580 "test_psa_api": ["OFF"],
581 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800582 "with_bl2": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800583 "profile": [""],
584 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800585 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800586 },
587 "common_params": _common_tfm_builder_cfg,
588 "invalid": _common_tfm_invalid_configs + []
589 }
590
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800591config_an552 = {"seed_params": {
592 "tfm_platform": ["arm/mps3/an552"],
593 "compiler": ["GCC_10_3"],
594 "lib_model": [True, False],
595 "isolation_level": ["1", "2"],
596 "test_regression": [True, False],
597 "test_psa_api": ["OFF"],
598 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800599 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800600 "profile": [""],
601 "partition_ps": ["ON"],
602 "extra_params": [""]
603 },
604 "common_params": _common_tfm_builder_cfg,
605 "invalid": _common_tfm_invalid_configs + []
606 }
607
608config_musca_b1 = {"seed_params": {
609 "tfm_platform": ["arm/musca_b1/sse_200"],
610 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
611 "lib_model": [True, False],
612 "isolation_level": ["1", "2", "3"],
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],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800617 "profile": [""],
618 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800619 "extra_params": ["", "NSOFF"]
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800620 },
621 "common_params": _common_tfm_builder_cfg,
622 "invalid": _common_tfm_invalid_configs + []
623 }
624
625config_musca_b1_se = {"seed_params": {
626 "tfm_platform": ["arm/musca_b1/secure_enclave"],
627 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
628 "lib_model": [False],
629 "isolation_level": ["1"],
630 "test_regression": [False],
631 "test_psa_api": ["OFF"],
632 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800633 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800634 "profile": [""],
635 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800636 "extra_params": ["NSOFF"]
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800637 },
638 "common_params": _common_tfm_builder_cfg,
639 "invalid": _common_tfm_invalid_configs + []
640 }
641
642config_musca_s1 = {"seed_params": {
643 "tfm_platform": ["arm/musca_s1"],
644 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
645 "lib_model": [True, False],
646 "isolation_level": ["1", "2"],
647 "test_regression": [True, False],
648 "test_psa_api": ["OFF"],
649 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800650 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800651 "profile": [""],
652 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800653 "extra_params": ["", "NSOFF"]
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800654 },
655 "common_params": _common_tfm_builder_cfg,
656 "invalid": _common_tfm_invalid_configs + []
657 }
658
Bence Balogh8731a092022-05-24 17:24:54 +0200659config_corstone310 = {"seed_params": {
660 "tfm_platform": ["arm/mps3/corstone310_fvp"],
Bence Balogh176b78f2022-02-22 13:49:34 +0100661 "compiler": ["GCC_10_3"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800662 "lib_model": [False],
663 "isolation_level": ["1"],
664 "test_regression": [False],
665 "test_psa_api": ["OFF"],
666 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800667 "with_bl2": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800668 "profile": [""],
669 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800670 "extra_params": ["NSOFF"]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800671 },
672 "common_params": _common_tfm_builder_cfg,
673 "invalid": _common_tfm_invalid_configs + []
674 }
675
Jamie Foxf3b8aa82022-09-08 11:52:01 +0100676config_rss = {"seed_params": {
677 "tfm_platform": ["arm/rss"],
678 "compiler": ["GCC_10_3"],
679 "lib_model": [False],
680 "isolation_level": ["1", "2"],
681 "test_regression": [True, False],
682 "test_psa_api": ["OFF"],
683 "cmake_build_type": ["Debug", "Release"],
684 "with_bl2": [True],
685 "profile": [""],
686 "partition_ps": ["OFF"],
687 "extra_params": [""]
688 },
689 "common_params": _common_tfm_builder_cfg,
690 "invalid": _common_tfm_invalid_configs + []
691 }
692
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800693config_psoc64 = {"seed_params": {
694 "tfm_platform": ["cypress/psoc64"],
695 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
696 "lib_model": [False],
697 "isolation_level": ["1", "2"],
698 "test_regression": [True],
699 "test_psa_api": ["OFF"],
700 "cmake_build_type": ["Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800701 "with_bl2": [False],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800702 "profile": [""],
703 "partition_ps": ["ON"],
704 "extra_params": [""]
705 },
706 "common_params": _common_tfm_builder_cfg,
707 "invalid": _common_tfm_invalid_configs + []
708 }
709
710config_corstone1000 = {"seed_params": {
711 "tfm_platform": ["arm/corstone1000"],
712 "compiler": ["GCC_7_3_1"],
713 "lib_model": [False],
714 "isolation_level": ["1"],
Satish Kumar1cfdd912022-08-01 09:24:07 +0100715 "test_regression": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800716 "test_psa_api": ["OFF"],
717 "cmake_build_type": ["Debug"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800718 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800719 "profile": [""],
720 "partition_ps": ["ON"],
Xinyu Zhangfc061dd2022-07-26 14:52:56 +0800721 "extra_params": ["S_PS_OFF, FVP", "FPGA"]
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800722 },
723 "common_params": _common_tfm_builder_cfg,
724 "invalid": _common_tfm_invalid_configs + []
725 }
726
727config_stm32l562e_dk = {"seed_params": {
728 "tfm_platform": ["stm/stm32l562e_dk"],
729 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
730 "lib_model": [True, False],
731 "isolation_level": ["1", "2", "3"],
732 "test_regression": [True, False],
733 "test_psa_api": ["OFF"],
734 "cmake_build_type": ["Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800735 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800736 "profile": [""],
737 "partition_ps": ["ON"],
738 "extra_params": ["CRYPTO_OFF", "CRYPTO_ON"]
739 },
740 "common_params": _common_tfm_builder_cfg,
741 "invalid": _common_tfm_invalid_configs + [
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800742 # Oversize issue on config stm32l562e_dk_ARMCLANG_LIB_1_REG_Release_BL2
743 ("stm/stm32l562e_dk", "ARMCLANG_6_13", True, "1",
744 True, "OFF", "Release", True, "", "ON", "*"),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800745 # all other tests are off when CRYPTO is ON
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800746 ("stm/stm32l562e_dk", "*", "*", "*", True, "*",
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800747 "*", "*", "*", "*", "CRYPTO_ON"),
748 # all other tests are ON when CRYPTO is OFF
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800749 ("stm/stm32l562e_dk", "*", "*", "*", False, "*",
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800750 "*", "*", "*", "*", "CRYPTO_OFF"),
751 ]
752 }
753
754config_b_u585i_iot02a = {"seed_params": {
755 "tfm_platform": ["stm/b_u585i_iot02a"],
756 "compiler": ["GCC_7_3_1"],
757 "lib_model": [False],
758 "isolation_level": ["1"],
759 "test_regression": [False],
760 "test_psa_api": ["OFF"],
761 "cmake_build_type": ["Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800762 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800763 "profile": [""],
764 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800765 "extra_params": ["NSOFF"]
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800766 },
767 "common_params": _common_tfm_builder_cfg,
768 "invalid": _common_tfm_invalid_configs + []
769 }
770
771config_nucleo_l552ze_q = {"seed_params": {
772 "tfm_platform": ["stm/nucleo_l552ze_q"],
773 "compiler": ["GCC_7_3_1"],
774 "lib_model": [False],
775 "isolation_level": ["1"],
776 "test_regression": [False],
777 "test_psa_api": ["OFF"],
778 "cmake_build_type": ["Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800779 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800780 "profile": [""],
781 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800782 "extra_params": ["NSOFF"]
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800783 },
784 "common_params": _common_tfm_builder_cfg,
785 "invalid": _common_tfm_invalid_configs + []
786 }
787
788config_lpcxpresso55s69 = {"seed_params": {
789 "tfm_platform": ["nxp/lpcxpresso55s69"],
790 "compiler": ["GCC_7_3_1"],
791 "lib_model": [False],
792 "isolation_level": ["2"],
793 "test_regression": [True, False],
794 "test_psa_api": ["OFF"],
795 "cmake_build_type": ["Relwithdebinfo"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800796 "with_bl2": [False],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800797 "profile": ["profile_medium"],
798 "partition_ps": ["ON"],
799 "extra_params": [""]
800 },
801 "common_params": _common_tfm_builder_cfg,
802 "invalid": _common_tfm_invalid_configs + []
803 }
804
Xinyu Zhang38b76742021-11-11 13:57:56 +0800805config_bl5340 = {"seed_params": {
806 "tfm_platform": ["lairdconnectivity/bl5340_dvk_cpuapp"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800807 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800808 "lib_model": [False],
809 "isolation_level": ["1"],
810 "test_regression": [False],
811 "test_psa_api": ["OFF"],
812 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800813 "with_bl2": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800814 "profile": [""],
815 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800816 "extra_params": ["NSOFF"]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800817 },
818 "common_params": _common_tfm_builder_cfg,
819 "invalid": _common_tfm_invalid_configs + []
820 }
821
822config_nrf5340dk = {"seed_params": {
823 "tfm_platform": ["nordic_nrf/nrf5340dk_nrf5340_cpuapp"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800824 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800825 "lib_model": [False],
826 "isolation_level": ["1"],
827 "test_regression": [False],
828 "test_psa_api": ["OFF"],
829 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800830 "with_bl2": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800831 "profile": [""],
832 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800833 "extra_params": ["NSOFF"]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800834 },
835 "common_params": _common_tfm_builder_cfg,
836 "invalid": _common_tfm_invalid_configs + []
837 }
838
839config_nrf9160dk = {"seed_params": {
840 "tfm_platform": ["nordic_nrf/nrf9160dk_nrf9160"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800841 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800842 "lib_model": [False],
843 "isolation_level": ["1"],
844 "test_regression": [False],
845 "test_psa_api": ["OFF"],
846 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800847 "with_bl2": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800848 "profile": [""],
849 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800850 "extra_params": ["NSOFF"]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800851 },
852 "common_params": _common_tfm_builder_cfg,
853 "invalid": _common_tfm_invalid_configs + []
854 }
855
856config_m2351 = {"seed_params": {
857 "tfm_platform": ["nuvoton/m2351"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800858 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800859 "lib_model": [False],
860 "isolation_level": ["1"],
861 "test_regression": [False],
862 "test_psa_api": ["OFF"],
863 "cmake_build_type": ["Release"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800864 "with_bl2": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800865 "profile": [""],
866 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800867 "extra_params": ["NSOFF"]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800868 },
869 "common_params": _common_tfm_builder_cfg,
870 "invalid": _common_tfm_invalid_configs + []
871 }
872
873config_m2354 = {"seed_params": {
874 "tfm_platform": ["nuvoton/m2354"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800875 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800876 "lib_model": [False],
877 "isolation_level": ["1"],
878 "test_regression": [False],
879 "test_psa_api": ["OFF"],
880 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800881 "with_bl2": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800882 "profile": [""],
883 "partition_ps": ["ON"],
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +0800884 "extra_params": ["NSOFF"]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800885 },
886 "common_params": _common_tfm_builder_cfg,
887 "invalid": _common_tfm_invalid_configs + []
888 }
889
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800890# Config groups for debug
891config_debug = {"seed_params": {
892 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800893 "compiler": ["GCC_7_3_1"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800894 "lib_model": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800895 "isolation_level": ["1"],
896 "test_regression": [False],
897 "test_psa_api": ["OFF"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800898 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800899 "with_bl2": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800900 "profile": [""],
901 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800902 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800903 },
904 "common_params": _common_tfm_builder_cfg,
905 "invalid": _common_tfm_invalid_configs + []
906 }
907
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800908config_debug_regr = deepcopy(config_debug)
909config_debug_regr["seed_params"]["test_regression"] = [True]
910
911config_debug_PSA_API = {"seed_params": {
912 "tfm_platform": ["arm/mps2/an521"],
913 "compiler": ["ARMCLANG_6_13"],
914 "lib_model": [True],
915 "isolation_level": ["1"],
916 "test_regression": [False],
917 "test_psa_api": ["CRYPTO",
918 "INITIAL_ATTESTATION",
919 "STORAGE",
920 "IPC"],
921 "cmake_build_type": ["Debug"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800922 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800923 "profile": [""],
924 "partition_ps": ["ON"],
925 "extra_params": [""]
926 },
927 "common_params": _common_tfm_builder_cfg,
928 "invalid": _common_tfm_invalid_configs + []
929 }
930
931config_debug_PSA_API_nolib = {"seed_params": {
932 "tfm_platform": ["arm/mps2/an521"],
933 "compiler": ["ARMCLANG_6_13"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800934 "lib_model": [False],
935 "isolation_level": ["1"],
936 "test_regression": [False],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800937 "test_psa_api": ["CRYPTO",
938 "INITIAL_ATTESTATION",
939 "STORAGE",
940 "IPC"],
941 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800942 "with_bl2": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800943 "profile": [""],
944 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800945 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800946 },
947 "common_params": _common_tfm_builder_cfg,
948 "invalid": _common_tfm_invalid_configs + []
949 }
950
Karl Zhangaff558a2020-05-15 14:28:23 +0100951_builtin_configs = {
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800952 # per-patch test groups
953 "pp_test": config_pp_test,
954 "pp_corstone1000": config_corstone1000,
Karl Zhang14573bc2020-06-08 09:23:21 +0800955
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800956 # nightly test groups
957 "nightly_test": config_nightly_test,
958 "nightly_profile_s": config_profile_s,
959 "nightly_profile_m": config_profile_m,
960 "nightly_profile_l": config_profile_l,
961 "nightly_cc_driver_psa": config_cc_driver_psa,
962 "nightly_fp":config_fp,
963 "nightly_psa_api": config_psa_api,
Xinyu Zhang050e39a2021-11-16 14:38:15 +0800964 "nightly_nsce": config_nsce,
965 "nightly_mmio": config_mmio,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800966 "nightly_an547": config_an547,
967 "nightly_an552": config_an552,
968 "nightly_musca_b1_se": config_musca_b1_se,
Bence Balogh8731a092022-05-24 17:24:54 +0200969 "nightly_corstone310": config_corstone310,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800970 "nightly_corstone1000": config_corstone1000,
Jamie Foxf3b8aa82022-09-08 11:52:01 +0100971 "nightly_rss": config_rss,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800972 "nightly_psoc64": config_psoc64,
973 "nightly_stm32l562e_dk": config_stm32l562e_dk,
974 "nightly_lpcxpresso55s69": config_lpcxpresso55s69,
Karl Zhang14573bc2020-06-08 09:23:21 +0800975
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800976 # release test groups
977 "release_test": config_release_test,
978 "release_profile_s": config_profile_s,
979 "release_profile_m": config_profile_m,
980 "release_profile_l": config_profile_l,
981 "release_cc_driver_psa": config_cc_driver_psa,
982 "release_fp": config_fp,
983 "release_psa_api": config_psa_api,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800984 "release_nsce": config_nsce,
985 "release_mmio": config_mmio,
986 "release_an547": config_an547,
987 "release_an552": config_an552,
Bence Balogh8731a092022-05-24 17:24:54 +0200988 "release_corstone310": config_corstone310,
Jamie Foxf3b8aa82022-09-08 11:52:01 +0100989 "release_rss": config_rss,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800990 "release_psoc64": config_psoc64,
991 "release_stm32l562e_dk": config_stm32l562e_dk,
992 "release_lpcxpresso55s69": config_lpcxpresso55s69,
Karl Zhang14573bc2020-06-08 09:23:21 +0800993
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800994 # code coverage test groups
995 "coverage_profile_s": config_cov_profile_s,
996 "coverage_profile_m": config_cov_profile_m,
997 "coverage_profile_l": config_cov_profile_l,
998 "coverage_nsce": config_cov_nsce,
999 "coverage_mmio": config_cov_mmio,
1000 "coverage_fp": config_fp,
Xinyu Zhangf25856a2021-06-17 14:06:46 +08001001
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001002 # platform groups
1003 "an521": config_an521,
1004 "an519": config_an519,
1005 "an524": config_an524,
1006 "an547": config_an547,
1007 "an552": config_an552,
1008 "musca_b1": config_musca_b1,
1009 "musca_b1_se": config_musca_b1_se,
1010 "musca_s1": config_musca_s1,
Bence Balogh8731a092022-05-24 17:24:54 +02001011 "corstone310": config_corstone310,
Jamie Foxf3b8aa82022-09-08 11:52:01 +01001012 "rss": config_rss,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001013 "cypress_psoc64": config_psoc64,
1014 "corstone1000": config_corstone1000,
1015 "stm_stm32l562e_dk": config_stm32l562e_dk,
1016 "stm_b_u585i_iot02a": config_b_u585i_iot02a,
1017 "stm_nucleo_l552ze_q": config_nucleo_l552ze_q,
1018 "nxp_lpcxpresso55s69": config_lpcxpresso55s69,
Xinyu Zhang38b76742021-11-11 13:57:56 +08001019 "laird_bl5340": config_bl5340,
1020 "nordic_nrf5340dk": config_nrf5340dk,
1021 "nordic_nrf9160dk": config_nrf9160dk,
1022 "nuvoton_m2351": config_m2351,
1023 "nuvoton_m2354": config_m2354,
Xinyu Zhang38b76742021-11-11 13:57:56 +08001024
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001025 # config groups for debug
Dean Birch4c6ad622020-03-13 11:28:03 +00001026 "debug": config_debug,
Paul Sokolovsky6c3c6562022-04-04 23:23:02 +03001027 "debug_regr": config_debug_regr,
Paul Sokolovsky1ec752b2022-01-22 19:50:58 +03001028 "debug_PSA_API": config_debug_PSA_API,
Paul Sokolovsky49a99282022-02-02 23:43:37 +03001029 "debug_PSA_API_nolib": config_debug_PSA_API_nolib,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001030 }
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001031
1032if __name__ == '__main__':
1033 import os
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001034
Minos Galanakisea421232019-06-20 17:11:28 +01001035 # Default behavior is to export refference config when called
1036 _dir = os.getcwd()
1037 from utils import save_json
1038 for _cname, _cfg in _builtin_configs.items():
1039 _fname = os.path.join(_dir, _cname + ".json")
1040 print("Exporting config %s" % _fname)
1041 save_json(_fname, _cfg)