blob: ea6e16e0df49267d7edf6b6d322f62fceaa883e8 [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/*
Xinyu Zhangeb442a12021-02-01 15:16:19 +080011 * Copyright (c) 2018-2021, 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"
Karl Zhang08681e62020-10-30 13:56:03 +080020__version__ = "1.2.0"
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +010021
Minos Galanakisea421232019-06-20 17:11:28 +010022# common parameters for tf-m build system
23# This configuration template will be passed into the tfm-builder module after
24# the template evaluation is converted to a command
25
26_common_tfm_builder_cfg = {
27 "config_type": "tf-m",
28 "codebase_root_dir": "tf-m",
29 # Order to which the variants are evaluated. This affects the name of
30 # variant configuration and the wildcard replacement logic in invalid
31 # configuration tuples
Xinyu Zhangb708f572020-09-15 11:43:46 +080032 "sort_order": ["tfm_platform",
33 "toolchain_file",
34 "psa_api",
35 "isolation_level",
36 "test_regression",
37 "test_psa_api",
Minos Galanakisea421232019-06-20 17:11:28 +010038 "cmake_build_type",
Xinyu Zhangb708f572020-09-15 11:43:46 +080039 "with_otp",
40 "with_bl2",
41 "with_ns",
Xinyu Zhang9fd74242020-10-22 11:30:50 +080042 "profile",
43 "partition_ps"],
Minos Galanakisea421232019-06-20 17:11:28 +010044
45 # Keys for the templace will come from the combinations of parameters
46 # provided in the seed dictionary.
47
Xinyu Zhangb708f572020-09-15 11:43:46 +080048 "config_template": "cmake " + \
49 "-DTFM_PLATFORM=%(tfm_platform)s " + \
Fathi Boudra324fee72020-11-20 10:31:12 +010050 "-DTFM_TOOLCHAIN_FILE=%(codebase_root_dir)s/%(toolchain_file)s " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080051 "-DTFM_PSA_API=%(psa_api)s " + \
52 "-DTFM_ISOLATION_LEVEL=%(isolation_level)s " + \
53 "-DTEST_NS=%(test_regression)s -DTEST_S=%(test_regression)s " + \
54 "-DTEST_PSA_API=%(test_psa_api)s " + \
55 "-DCMAKE_BUILD_TYPE=%(cmake_build_type)s " + \
56 "-DCRYPTO_HW_ACCELERATOR_OTP_STATE=%(with_otp)s " + \
57 "-DBL2=%(with_bl2)s " + \
58 "-DNS=%(with_ns)s " + \
59 "-DTFM_TEST_REPO_PATH=%(codebase_root_dir)s/../tf-m-tests " + \
60 "-DMBEDCRYPTO_PATH=%(codebase_root_dir)s/../mbedtls " + \
61 "-DPSA_ARCH_TESTS_PATH=%(codebase_root_dir)s/../psa-arch-tests " + \
62 "-DMCUBOOT_PATH=%(codebase_root_dir)s/../mcuboot " + \
63 "-DTFM_PROFILE=%(profile)s " + \
Xinyu Zhangb5bbb692020-10-26 10:14:33 +080064 "-DTFM_PARTITION_PROTECTED_STORAGE=%(partition_ps)s " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080065 "%(codebase_root_dir)s",
Karl Zhangaff558a2020-05-15 14:28:23 +010066
Minos Galanakisea421232019-06-20 17:11:28 +010067 # A small subset of string substitution params is allowed in commands.
68 # tfm_build_manager will replace %(_tbm_build_dir_)s, %(_tbm_code_dir_)s,
69 # _tbm_target_platform_ with the paths set when building
70
Xinyu Zhangb708f572020-09-15 11:43:46 +080071 "artifact_capture_rex": (r'%(_tbm_build_dir_)s/bin'
Minos Galanakisea421232019-06-20 17:11:28 +010072 r'/(\w+\.(?:axf|bin|hex))$'),
73
74 # ALL commands will be executed for every build.
75 # Other keys will append extra commands when matching target_platform
Fathi Boudra83e4f292020-12-04 22:33:40 +010076 "build_cmds": {"all": ["cmake --build ./ -- install"],
Xinyu Zhang694eb492020-11-04 18:29:08 +080077 "musca_a": [("srec_cat "
Xinyu Zhangb708f572020-09-15 11:43:46 +080078 "%(_tbm_build_dir_)s/bin/"
79 "bl2.bin "
Minos Galanakisea421232019-06-20 17:11:28 +010080 "-Binary -offset 0x200000 "
Raef Coles543aab32020-12-03 11:12:02 +000081 "-fill 0xFF 0x200000 0x220000 "
Xinyu Zhangb708f572020-09-15 11:43:46 +080082 "%(_tbm_build_dir_)s/bin/"
Xinyu Zhang694eb492020-11-04 18:29:08 +080083 "tfm_s_ns_signed.bin "
Raef Coles543aab32020-12-03 11:12:02 +000084 "-Binary -offset 0x220000 "
85 "-fill 0xFF 0x220000 0xA00000 "
86 "-o %(_tbm_build_dir_)s/bin/"
Xinyu Zhang694eb492020-11-04 18:29:08 +080087 "tfm.hex -Intel")],
Mark Horvath8d281cd2020-12-07 15:20:26 +010088 "musca_b1/sse_200": [("srec_cat "
89 "%(_tbm_build_dir_)s/bin/"
90 "bl2.bin "
91 "-Binary -offset 0xA000000 "
92 "-fill 0xFF 0xA000000 0xA020000 "
93 "%(_tbm_build_dir_)s/bin/"
94 "tfm_s_ns_signed.bin "
95 "-Binary -offset 0xA020000 "
96 "-fill 0xFF 0xA020000 0xA200000 "
97 "-o %(_tbm_build_dir_)s/bin/"
98 "tfm.hex -Intel")],
Xinyu Zhang694eb492020-11-04 18:29:08 +080099 "musca_s1": [("srec_cat "
Xinyu Zhangb708f572020-09-15 11:43:46 +0800100 "%(_tbm_build_dir_)s/bin/"
101 "bl2.bin "
Karl Zhangeffed972020-06-30 15:48:01 +0800102 "-Binary -offset 0xA000000 "
Raef Coles543aab32020-12-03 11:12:02 +0000103 "-fill 0xFF 0xA000000 0xA020000 "
Xinyu Zhangb708f572020-09-15 11:43:46 +0800104 "%(_tbm_build_dir_)s/bin/"
Xinyu Zhang694eb492020-11-04 18:29:08 +0800105 "tfm_s_ns_signed.bin "
Raef Coles543aab32020-12-03 11:12:02 +0000106 "-Binary -offset 0xA020000 "
107 "-fill 0xFF 0xA020000 0xA200000 "
108 "-o %(_tbm_build_dir_)s/bin/"
Xinyu Zhang694eb492020-11-04 18:29:08 +0800109 "tfm.hex -Intel")]
Minos Galanakisea421232019-06-20 17:11:28 +0100110 },
111
112 # (Optional) If set will fail if those artefacts are missing post build
113 "required_artefacts": {"all": [
Xinyu Zhangb708f572020-09-15 11:43:46 +0800114 "%(_tbm_build_dir_)s/bin/"
115 "tfm_s.bin",
116 "%(_tbm_build_dir_)s/bin/"
117 "tfm_ns.bin"],
Xinyu Zhang694eb492020-11-04 18:29:08 +0800118 "musca_a": [
Xinyu Zhangb708f572020-09-15 11:43:46 +0800119 "%(_tbm_build_dir_)s/bin/"
120 "tfm.hex",
121 "%(_tbm_build_dir_)s/bin/"
Xinyu Zhang694eb492020-11-04 18:29:08 +0800122 "bl2.bin",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800123 "%(_tbm_build_dir_)s/bin/"
124 "tfm_sign.bin"],
Mark Horvath8d281cd2020-12-07 15:20:26 +0100125 "musca_b1/sse_200": [
Xinyu Zhangb708f572020-09-15 11:43:46 +0800126 "%(_tbm_build_dir_)s/bin/"
127 "tfm.hex",
128 "%(_tbm_build_dir_)s/bin/"
Xinyu Zhang694eb492020-11-04 18:29:08 +0800129 "bl2.bin",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800130 "%(_tbm_build_dir_)s/bin/"
131 "tfm_sign.bin"],
Xinyu Zhang694eb492020-11-04 18:29:08 +0800132 "musca_s1": [
Xinyu Zhangb708f572020-09-15 11:43:46 +0800133 "%(_tbm_build_dir_)s/bin/"
134 "tfm.hex",
135 "%(_tbm_build_dir_)s/bin/"
Xinyu Zhang694eb492020-11-04 18:29:08 +0800136 "bl2.bin",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800137 "%(_tbm_build_dir_)s/bin/"
138 "tfm_sign.bin"]
Minos Galanakisea421232019-06-20 17:11:28 +0100139 }
140}
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100141
Xinyu Zhangb708f572020-09-15 11:43:46 +0800142# List of all build configs that are impossible under all circumstances
143_common_tfm_invalid_configs = [
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800144 # LVL2 and LVL3 requires PSA api
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800145 ("*", "*", False, "2", "*", "*", "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800146 ("*", "*", False, "3", "*", "*", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800147 # Regression requires NS
148 ("*", "*", "*", "*", True, "*", "*", "*", "*", False, "*", "*"),
Xinyu Zhang11d66112020-11-04 15:38:29 +0800149 # psoc64 requires PSA api
150 ("cypress/psoc64", "*", False, "*", "*", "*", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800151 # No PSA_ACK with regression
152 ("*", "*", "*", "*", True, "IPC", "*", "*", "*", "*", "*", "*"),
153 ("*", "*", "*", "*", True, "CRYPTO", "*", "*", "*", "*", "*", "*"),
154 ("*", "*", "*", "*", True, "PROTECTED_STORAGE", "*", "*", "*", "*", "*", "*"),
155 ("*", "*", "*", "*", True, "INITIAL_ATTESTATION", "*", "*", "*", "*", "*", "*"),
156 ("*", "*", "*", "*", True, "INTERNAL_TRUSTED_STORAGE", "*", "*", "*", "*", "*", "*"),
157 # PSA_ACK requires NS
158 ("*", "*", "*", "*", "*", "IPC", "*", "*", "*", False, "*", "*"),
159 ("*", "*", "*", "*", "*", "CRYPTO", "*", "*", "*", False, "*", "*"),
160 ("*", "*", "*", "*", "*", "PROTECTED_STORAGE", "*", "*", "*", False, "*", "*"),
161 ("*", "*", "*", "*", "*", "INITIAL_ATTESTATION", "*", "*", "*", False, "*", "*"),
162 ("*", "*", "*", "*", "*", "INTERNAL_TRUSTED_STORAGE", "*", "*", "*", False, "*", "*"),
163 # Musca requires BL2
164 ("musca_a", "*", "*", "*", "*", "*", "*", "*", False, "*", "*", "*"),
Mark Horvath8d281cd2020-12-07 15:20:26 +0100165 ("musca_b1/sse_200", "*", "*", "*", "*", "*", "*", "*", False, "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800166 ("musca_s1", "*", "*", "*", "*", "*", "*", "*", False, "*", "*", "*"),
167 # psoc64 cannot use BL2
168 ("cypress/psoc64", "*", "*", "*", "*", "*", "*", "*", True, "*", "*", "*"),
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800169 # psoc64 does not support Debug build type
170 ("cypress/psoc64", "*", "*", "*", "*", "*", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800171 # Musca b1 does not support Profile S
Mark Horvath8d281cd2020-12-07 15:20:26 +0100172 ("musca_b1/sse_200", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_small", "*"),
173 # Musca B1 Secure Enclave requires PSA api, BL2, and supports only Isolation Level 1
174 ("musca_b1/secure_enclave", "*", False, "*", "*", "*", "*", "*", "*", "*", "*", "*"),
175 ("musca_b1/secure_enclave", "*", "*", "*", "*", "*", "*", "*", False, "*", "*", "*"),
176 ("musca_b1/secure_enclave", "*", "*", "2", "*", "*", "*", "*", "*", "*", "*", "*"),
177 # Musca B1 Secure Enclave does not support tests, profiles, NS side building
178 ("musca_b1/secure_enclave", "*", "*", "*", True, "*", "*", "*", "*", "*", "*", "*"),
179 ("musca_b1/secure_enclave", "*", "*", "*", "*", "IPC", "*", "*", "*", "*", "*", "*"),
180 ("musca_b1/secure_enclave", "*", "*", "*", "*", "CRYPTO", "*", "*", "*", "*", "*", "*"),
181 ("musca_b1/secure_enclave", "*", "*", "*", "*", "PROTECTED_STORAGE", "*", "*", "*", "*", "*", "*"),
182 ("musca_b1/secure_enclave", "*", "*", "*", "*", "INITIAL_ATTESTATION", "*", "*", "*", "*", "*", "*"),
183 ("musca_b1/secure_enclave", "*", "*", "*", "*", "INTERNAL_TRUSTED_STORAGE", "*", "*", "*", "*", "*", "*"),
184 ("musca_b1/secure_enclave", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_small", "*"),
185 ("musca_b1/secure_enclave", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_medium", "*"),
186 ("musca_b1/secure_enclave", "*", "*", "*", "*", "*", "*", "*", "*", True, "*", "*"),
Xinyu Zhang709c1542020-11-02 18:41:07 +0800187 # PARTITION_PS could be OFF only for Profile S and M
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800188 ("*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "", "OFF"),
Xinyu Zhang709c1542020-11-02 18:41:07 +0800189 # PARTITION_PS should be OFF for Profile S
190 ("*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_small", "ON"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800191 # Proile M only support for PSA_API
192 ("*", "*", False, "*", "*", "*", "*", "*", "*", "*", "profile_medium", "*"),
193 # Profile M only support for Isolation Level 2
194 ("*", "*", "*", "1", "*", "*", "*", "*", "*", "*", "profile_medium", "*"),
Xinyu Zhange8de4512020-11-13 10:37:56 +0800195 ("*", "*", "*", "3", "*", "*", "*", "*", "*", "*", "profile_medium", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800196 # Profile S does not support PSA_API
197 ("*", "*", True, "*", "*", "*", "*", "*", "*", "*", "profile_small", "*"),
198 # Profile S only supports Isolation Level 2
199 ("*", "*", "*", "2", "*", "*", "*", "*", "*", "*", "profile_small", "*"),
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800200 # Only AN521 and MUSCA_B1 support Isolation Level 3
201 ("mps2/an519", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800202 ("mps3/an524", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800203 ("musca_a", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
204 ("musca_s1", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
205 ("cypress/psoc64", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
Mark Horvath8d281cd2020-12-07 15:20:26 +0100206 ("musca_b1/secure_enclave", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800207 ]
208
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100209# Configure build manager to build several combinations
Karl Zhangaff558a2020-05-15 14:28:23 +0100210config_AN524 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800211 "tfm_platform": ["mps3/an524"],
212 "toolchain_file": ["toolchain_GNUARM.cmake",
213 "toolchain_ARMCLANG.cmake"],
214 "psa_api": [True, False],
215 "isolation_level": ["1", "2"],
216 "test_regression": [True, False],
217 "test_psa_api": ["OFF"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100218 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800219 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800220 "with_bl2": [True, False],
221 "with_ns": [True, False],
222 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800223 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100224 },
225 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800226 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100227 }
228
Karl Zhangaff558a2020-05-15 14:28:23 +0100229config_AN521 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800230 "tfm_platform": ["mps2/an521"],
231 "toolchain_file": ["toolchain_GNUARM.cmake",
232 "toolchain_ARMCLANG.cmake"],
233 "psa_api": [True, False],
234 "isolation_level": ["1", "2"],
235 "test_regression": [True, False],
236 "test_psa_api": ["OFF"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100237 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800238 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800239 "with_bl2": [True, False],
240 "with_ns": [True, False],
241 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800242 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100243 },
244 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800245 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100246 }
247
Karl Zhangaff558a2020-05-15 14:28:23 +0100248config_PSA_API = {"seed_params": {
Karl Zhang5ccb5522021-03-01 22:16:29 +0800249 "tfm_platform": ["mps2/an521", "musca_b1/sse_200",
250 "musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800251 "toolchain_file": ["toolchain_GNUARM.cmake",
252 "toolchain_ARMCLANG.cmake"],
253 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800254 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800255 "test_regression": [False],
256 "test_psa_api": ["CRYPTO",
257 "PROTECTED_STORAGE",
258 "INITIAL_ATTESTATION",
259 "INTERNAL_TRUSTED_STORAGE"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100260 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800261 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800262 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800263 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800264 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800265 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100266 },
267 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800268 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100269 }
270
Karl Zhangaff558a2020-05-15 14:28:23 +0100271config_PSA_FF = {"seed_params": {
Karl Zhang5ccb5522021-03-01 22:16:29 +0800272 "tfm_platform": ["mps2/an521", "musca_b1/sse_200",
273 "musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800274 "toolchain_file": ["toolchain_GNUARM.cmake",
275 "toolchain_ARMCLANG.cmake"],
276 "psa_api": [True],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800277 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800278 "test_regression": [False],
279 "test_psa_api": ["IPC"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100280 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800281 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800282 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800283 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800284 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800285 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100286 },
287 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800288 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100289 }
290
Karl Zhangaff558a2020-05-15 14:28:23 +0100291config_PSA_API_OTP = {"seed_params": {
Mark Horvath8d281cd2020-12-07 15:20:26 +0100292 "tfm_platform": ["musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800293 "toolchain_file": ["toolchain_GNUARM.cmake",
294 "toolchain_ARMCLANG.cmake"],
295 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800296 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800297 "test_regression": [False],
298 "test_psa_api": ["CRYPTO",
299 "PROTECTED_STORAGE",
300 "INITIAL_ATTESTATION",
301 "INTERNAL_TRUSTED_STORAGE"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100302 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800303 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800304 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800305 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800306 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800307 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100308 },
309 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800310 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100311 }
Minos Galanakisea421232019-06-20 17:11:28 +0100312
Xinyu Zhangb708f572020-09-15 11:43:46 +0800313config_PSA_FF_OTP = {"seed_params": {
Mark Horvath8d281cd2020-12-07 15:20:26 +0100314 "tfm_platform": ["musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800315 "toolchain_file": ["toolchain_GNUARM.cmake",
316 "toolchain_ARMCLANG.cmake"],
317 "psa_api": [True],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800318 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800319 "test_regression": [False],
320 "test_psa_api": ["IPC"],
321 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800322 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800323 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800324 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800325 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800326 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800327 },
328 "common_params": _common_tfm_builder_cfg,
329 "invalid": _common_tfm_invalid_configs + []
330 }
331
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800332config_PSOC64 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800333 "tfm_platform": ["cypress/psoc64"],
334 "toolchain_file": ["toolchain_GNUARM.cmake",
335 "toolchain_ARMCLANG.cmake"],
336 "psa_api": [True],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800337 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800338 "test_regression": [True],
339 "test_psa_api": ["OFF"],
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800340 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800341 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800342 "with_bl2": [False],
343 "with_ns": [True, False],
344 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800345 "partition_ps": ["ON"],
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800346 },
347 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800348 "invalid": _common_tfm_invalid_configs + []
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800349 }
350
Minos Galanakisea421232019-06-20 17:11:28 +0100351config_AN519 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800352 "tfm_platform": ["mps2/an519"],
353 "toolchain_file": ["toolchain_GNUARM.cmake",
354 "toolchain_ARMCLANG.cmake"],
355 "psa_api": [True, False],
356 "isolation_level": ["1", "2"],
357 "test_regression": [True, False],
358 "test_psa_api": ["OFF"],
Minos Galanakisea421232019-06-20 17:11:28 +0100359 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800360 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800361 "with_bl2": [True, False],
362 "with_ns": [True, False],
363 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800364 "partition_ps": ["ON"],
Minos Galanakisea421232019-06-20 17:11:28 +0100365 },
366 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800367 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +0100368 }
369
Xinyu Zhangb708f572020-09-15 11:43:46 +0800370config_IPC = {"seed_params": {
Mark Horvath8d281cd2020-12-07 15:20:26 +0100371 "tfm_platform": ["mps2/an521", "mps2/an519", "musca_a",
372 "musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800373 "toolchain_file": ["toolchain_GNUARM.cmake",
374 "toolchain_ARMCLANG.cmake"],
375 "psa_api": [True],
376 "isolation_level": ["1", "2"],
377 "test_regression": [True, False],
378 "test_psa_api": ["OFF"],
379 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800380 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800381 "with_bl2": [True, False],
382 "with_ns": [True, False],
383 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800384 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800385 },
Minos Galanakisea421232019-06-20 17:11:28 +0100386 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800387 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +0100388 }
389
Minos Galanakisea421232019-06-20 17:11:28 +0100390config_full = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800391 "tfm_platform": ["mps2/an521", "mps2/an519",
Mark Horvath8d281cd2020-12-07 15:20:26 +0100392 "musca_a", "musca_b1/sse_200",
Karl Zhang6919ff62021-01-05 14:17:44 +0800393 "mps3/an524", "cypress/psoc64",
Mark Horvath8d281cd2020-12-07 15:20:26 +0100394 "musca_b1/secure_enclave"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800395 "toolchain_file": ["toolchain_GNUARM.cmake",
396 "toolchain_ARMCLANG.cmake"],
397 "psa_api": [True, False],
398 "isolation_level": ["1", "2"],
399 "test_regression": [True, False],
400 "test_psa_api": ["OFF"],
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800401 "cmake_build_type": ["Debug", "Release", "RelWithDebInfo"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800402 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800403 "with_bl2": [True, False],
404 "with_ns": [True, False],
405 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800406 "partition_ps": ["ON"],
Dean Birchd6ce2c82020-05-13 13:16:15 +0100407 },
408 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800409 "invalid": _common_tfm_invalid_configs + [
410 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800411 "*", "*", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800412 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800413 "*", "*", "*", "*", True, True, "*", "*"),
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800414 ("mps2/an521", "*", "*", "*",
415 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
416 ("mps2/an519", "*", "*", "*",
417 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
418 ("musca_a", "*", "*", "*",
419 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Mark Horvath8d281cd2020-12-07 15:20:26 +0100420 ("musca_b1/sse_200", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800421 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800422 ("mps3/an524", "*", "*", "*",
423 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800424 ]
Karl Zhang81a76772020-05-11 18:28:52 +0800425 }
426
Karl Zhangaff558a2020-05-15 14:28:23 +0100427config_tfm_test = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800428 "tfm_platform": ["mps2/an521", "musca_a",
Mark Horvath8d281cd2020-12-07 15:20:26 +0100429 "musca_b1/sse_200", "musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800430 "toolchain_file": ["toolchain_ARMCLANG.cmake",
431 "toolchain_GNUARM.cmake"],
432 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800433 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800434 "test_regression": [True, False],
435 "test_psa_api": ["OFF"],
436 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800437 "with_otp": ["off"],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800438 "with_bl2": [True],
439 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800440 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800441 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800442 },
443 "common_params": _common_tfm_builder_cfg,
444 "invalid": _common_tfm_invalid_configs + []
445 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800446
Karl Zhangaff558a2020-05-15 14:28:23 +0100447config_tfm_test2 = {"seed_params": {
Karl Zhang6919ff62021-01-05 14:17:44 +0800448 "tfm_platform": ["mps2/an519", "mps3/an524"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800449 "toolchain_file": ["toolchain_ARMCLANG.cmake",
450 "toolchain_GNUARM.cmake"],
451 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800452 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800453 "test_regression": [True, False],
454 "test_psa_api": ["OFF"],
455 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800456 "with_otp": ["off"],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800457 "with_bl2": [True],
458 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800459 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800460 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800461 },
462 "common_params": _common_tfm_builder_cfg,
463 "invalid": _common_tfm_invalid_configs + [
464 ("mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800465 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800466 ]
467 }
Karl Zhangaff558a2020-05-15 14:28:23 +0100468
Karl Zhang14573bc2020-06-08 09:23:21 +0800469config_tfm_profile = {"seed_params": {
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800470 "tfm_platform": ["mps2/an519", "mps2/an521",
Mark Horvath8d281cd2020-12-07 15:20:26 +0100471 "musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800472 "toolchain_file": ["toolchain_ARMCLANG.cmake",
473 "toolchain_GNUARM.cmake"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800474 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800475 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800476 "test_regression": [True, False],
477 "test_psa_api": ["OFF"],
478 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800479 "with_otp": ["off"],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800480 "with_bl2": [True],
481 "with_ns": [True],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800482 "profile": ["profile_small", "profile_medium"],
483 "partition_ps": ["ON", "OFF"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800484 },
485 "common_params": _common_tfm_builder_cfg,
486 "invalid": _common_tfm_invalid_configs + [
487 ("mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800488 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800489 ]
490 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800491
Karl Zhangaff558a2020-05-15 14:28:23 +0100492config_tfm_test_OTP = {"seed_params": {
Mark Horvath8d281cd2020-12-07 15:20:26 +0100493 "tfm_platform": ["musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800494 "toolchain_file": ["toolchain_ARMCLANG.cmake",
495 "toolchain_GNUARM.cmake"],
496 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800497 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800498 "test_regression": [True, False],
499 "test_psa_api": ["OFF"],
500 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800501 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800502 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800503 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800504 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800505 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800506 },
507 "common_params": _common_tfm_builder_cfg,
508 "invalid": _common_tfm_invalid_configs + []
509 }
Karl Zhangaff558a2020-05-15 14:28:23 +0100510
Minos Galanakisea421232019-06-20 17:11:28 +0100511config_MUSCA_A = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800512 "tfm_platform": ["musca_a"],
513 "toolchain_file": ["toolchain_ARMCLANG.cmake",
514 "toolchain_GNUARM.cmake"],
515 "psa_api": [True, False],
516 "isolation_level": ["1", "2"],
517 "test_regression": [True, False],
518 "test_psa_api": ["OFF"],
519 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800520 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800521 "with_bl2": [True],
522 "with_ns": [True, False],
523 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800524 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800525 },
526 "common_params": _common_tfm_builder_cfg,
527 "invalid": _common_tfm_invalid_configs + []
528 }
Minos Galanakisea421232019-06-20 17:11:28 +0100529
530config_MUSCA_B1 = {"seed_params": {
Mark Horvath8d281cd2020-12-07 15:20:26 +0100531 "tfm_platform": ["musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800532 "toolchain_file": ["toolchain_ARMCLANG.cmake",
533 "toolchain_GNUARM.cmake"],
534 "psa_api": [True, False],
535 "isolation_level": ["1", "2"],
536 "test_regression": [True, False],
537 "test_psa_api": ["OFF"],
538 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800539 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800540 "with_bl2": [True],
541 "with_ns": [True, False],
542 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800543 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800544 },
545 "common_params": _common_tfm_builder_cfg,
546 "invalid": _common_tfm_invalid_configs + []
547 }
Minos Galanakisea421232019-06-20 17:11:28 +0100548
Mark Horvath8d281cd2020-12-07 15:20:26 +0100549config_MUSCA_B1_SE = {"seed_params": {
550 "tfm_platform": ["musca_b1/secure_enclave"],
551 "toolchain_file": ["toolchain_ARMCLANG.cmake",
552 "toolchain_GNUARM.cmake"],
553 "psa_api": [True],
554 "isolation_level": ["1"],
555 "test_regression": [False],
556 "test_psa_api": ["OFF"],
557 "cmake_build_type": ["Debug", "Release"],
558 "with_otp": ["off"],
559 "with_bl2": [True],
560 "with_ns": [False],
561 "profile": [""],
562 "partition_ps": ["ON"],
563 },
564 "common_params": _common_tfm_builder_cfg,
565 "invalid": _common_tfm_invalid_configs + []
566 }
567
Karl Zhangeffed972020-06-30 15:48:01 +0800568config_MUSCA_S1 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800569 "tfm_platform": ["musca_s1"],
570 "toolchain_file": ["toolchain_ARMCLANG.cmake",
571 "toolchain_GNUARM.cmake"],
572 "psa_api": [True, False],
573 "isolation_level": ["1", "2"],
574 "test_regression": [True, False],
575 "test_psa_api": ["OFF"],
576 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800577 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800578 "with_bl2": [True],
579 "with_ns": [True, False],
580 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800581 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800582 },
583 "common_params": _common_tfm_builder_cfg,
584 "invalid": _common_tfm_invalid_configs + []
585 }
Karl Zhangeffed972020-06-30 15:48:01 +0800586
Karl Zhangaff558a2020-05-15 14:28:23 +0100587config_release = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800588 "tfm_platform": ["mps2/an521", "mps2/an519",
Mark Horvath8d281cd2020-12-07 15:20:26 +0100589 "musca_a", "musca_b1/sse_200", "musca_s1",
Karl Zhang6919ff62021-01-05 14:17:44 +0800590 "mps3/an524"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800591 "toolchain_file": ["toolchain_ARMCLANG.cmake",
592 "toolchain_GNUARM.cmake"],
593 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800594 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800595 "test_regression": [True, False],
596 "test_psa_api": ["OFF"],
597 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800598 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800599 "with_bl2": [True, False],
600 "with_ns": [True, False],
601 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800602 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800603 },
604 "common_params": _common_tfm_builder_cfg,
605 "invalid": _common_tfm_invalid_configs + [
606 ("mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800607 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800608 ]
609 }
Karl Zhangaff558a2020-05-15 14:28:23 +0100610
611# Configure build manager to build several combinations
612config_AN521_PSA_API = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800613 "tfm_platform": ["mps2/an521", "mps2/an519",
Mark Horvath8d281cd2020-12-07 15:20:26 +0100614 "musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800615 "toolchain_file": ["toolchain_GNUARM.cmake",
616 "toolchain_ARMCLANG.cmake"],
617 "psa_api": [True, False],
618 "isolation_level": ["1", "2"],
619 "test_regression": [False],
620 "test_psa_api": ["IPC",
621 "CRYPTO",
622 "PROTECTED_STORAGE",
623 "INITIAL_ATTESTATION",
624 "INTERNAL_TRUSTED_STORAGE"],
625 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800626 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800627 "with_bl2": [True],
628 "with_ns": [True, False],
629 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800630 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100631 },
632 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800633 "invalid": _common_tfm_invalid_configs + [
634 ("mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800635 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800636 ]
Karl Zhangaff558a2020-05-15 14:28:23 +0100637 }
638
Karl Zhangaff558a2020-05-15 14:28:23 +0100639config_AN521_PSA_IPC = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800640 "tfm_platform": ["mps2/an521", "mps2/an519",
Mark Horvath8d281cd2020-12-07 15:20:26 +0100641 "musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800642 "toolchain_file": ["toolchain_GNUARM.cmake",
643 "toolchain_ARMCLANG.cmake"],
644 "psa_api": [True],
645 "isolation_level": ["1", "2"],
646 "test_regression": [False],
647 "test_psa_api": ["IPC"],
648 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800649 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800650 "with_bl2": [True],
651 "with_ns": [True, False],
652 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800653 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100654 },
655 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800656 "invalid": _common_tfm_invalid_configs + [
657 ("mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800658 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800659 ]
Karl Zhangaff558a2020-05-15 14:28:23 +0100660 }
661
Karl Zhang14573bc2020-06-08 09:23:21 +0800662config_nightly = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800663 "tfm_platform": ["mps2/an521", "mps2/an519",
Mark Horvath8d281cd2020-12-07 15:20:26 +0100664 "musca_a", "musca_b1/sse_200", "musca_s1",
Karl Zhang6919ff62021-01-05 14:17:44 +0800665 "mps3/an524", "cypress/psoc64",
Mark Horvath8d281cd2020-12-07 15:20:26 +0100666 "musca_b1/secure_enclave"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800667 "toolchain_file": ["toolchain_GNUARM.cmake",
668 "toolchain_ARMCLANG.cmake"],
669 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800670 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800671 "test_regression": [True, False],
672 "test_psa_api": ["OFF"],
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800673 "cmake_build_type": ["Debug", "Release", "Minsizerel", "RelWithDebInfo"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800674 "with_otp": ["off"],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800675 "with_bl2": [True],
676 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800677 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800678 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800679 },
680 "common_params": _common_tfm_builder_cfg,
681 "invalid": _common_tfm_invalid_configs + [
682 ("mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800683 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800684 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800685 "*", "*", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800686 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800687 "*", "*", "*", "*", True, True, "*", "*"),
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800688 ("mps2/an521", "*", "*", "*",
689 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
690 ("mps2/an519", "*", "*", "*",
691 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
692 ("musca_a", "*", "*", "*",
693 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Mark Horvath8d281cd2020-12-07 15:20:26 +0100694 ("musca_b1/sse_200", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800695 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
696 ("musca_s1", "*", "*", "*",
697 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800698 ("mps3/an524", "*", "*", "*",
699 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800700 ]
701 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800702
Karl Zhang14573bc2020-06-08 09:23:21 +0800703config_nightly_profile = {"seed_params": {
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800704 "tfm_platform": ["mps2/an519", "mps2/an521",
Mark Horvath8d281cd2020-12-07 15:20:26 +0100705 "musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800706 "toolchain_file": ["toolchain_ARMCLANG.cmake",
707 "toolchain_GNUARM.cmake"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800708 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800709 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800710 "test_regression": [True, False],
711 "test_psa_api": ["OFF"],
712 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800713 "with_otp": ["off"],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800714 "with_bl2": [True],
715 "with_ns": [True],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800716 "profile": ["profile_small", "profile_medium"],
717 "partition_ps": ["ON", "OFF"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800718 },
719 "common_params": _common_tfm_builder_cfg,
720 "invalid": _common_tfm_invalid_configs + [
721 ("mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800722 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800723 ]
724 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800725
Karl Zhang14573bc2020-06-08 09:23:21 +0800726config_nightly_PSA_API = {"seed_params": {
Karl Zhang5ccb5522021-03-01 22:16:29 +0800727 "tfm_platform": ["mps2/an521", "musca_b1/sse_200",
728 "musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800729 "toolchain_file": ["toolchain_GNUARM.cmake",
730 "toolchain_ARMCLANG.cmake"],
731 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800732 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800733 "test_regression": [False],
734 "test_psa_api": ["CRYPTO",
735 "PROTECTED_STORAGE",
736 "INITIAL_ATTESTATION",
737 "INTERNAL_TRUSTED_STORAGE"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800738 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800739 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800740 "with_bl2": [True],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800741 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800742 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800743 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800744 },
745 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800746 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800747 }
748
Karl Zhang14573bc2020-06-08 09:23:21 +0800749config_nightly_PSA_FF = {"seed_params": {
Karl Zhang5ccb5522021-03-01 22:16:29 +0800750 "tfm_platform": ["mps2/an521", "musca_b1/sse_200",
751 "musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800752 "toolchain_file": ["toolchain_GNUARM.cmake",
753 "toolchain_ARMCLANG.cmake"],
754 "psa_api": [True],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800755 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800756 "test_regression": [False],
757 "test_psa_api": ["IPC"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800758 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800759 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800760 "with_bl2": [True],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800761 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800762 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800763 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800764 },
765 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800766 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800767 }
768
Karl Zhang14573bc2020-06-08 09:23:21 +0800769config_nightly_OTP = {"seed_params": {
Mark Horvath8d281cd2020-12-07 15:20:26 +0100770 "tfm_platform": ["musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800771 "toolchain_file": ["toolchain_GNUARM.cmake",
772 "toolchain_ARMCLANG.cmake"],
773 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800774 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800775 "test_regression": [True],
776 "test_psa_api": ["OFF"],
777 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800778 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800779 "with_bl2": [True],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800780 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800781 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800782 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800783 },
784 "common_params": _common_tfm_builder_cfg,
785 "invalid": _common_tfm_invalid_configs + []
786 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800787
Karl Zhang14573bc2020-06-08 09:23:21 +0800788config_pp_test = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800789 "tfm_platform": ["mps2/an521", "mps2/an519",
Karl Zhang0d765af2021-01-05 11:32:29 +0800790 "musca_b1/sse_200", "musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800791 "toolchain_file": ["toolchain_GNUARM.cmake",
792 "toolchain_ARMCLANG.cmake"],
793 "psa_api": [True, False],
Karl Zhangde36b772021-01-08 10:17:03 +0800794 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800795 "test_regression": [True],
796 "test_psa_api": ["OFF"],
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800797 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800798 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800799 "with_bl2": [True],
800 "with_ns": [True, False],
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800801 "profile": ["", "profile_small", "profile_medium"],
802 "partition_ps": ["ON", "OFF"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800803 },
804 "common_params": _common_tfm_builder_cfg,
805 "invalid": _common_tfm_invalid_configs + [
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800806 # invalid configs that are not supported by TF-M
807 ("musca_s1", "*", "*", "*", "*", "*",
808 "*", "*", "*", "*", "profile_medium", "*"),
809 # valid configs supported by TF-M but not needed in per-patch
810 ("*", "*", "*", "1", "*", "*", "Release",
811 "*", "*", "*", "*", "*"),
812 ("*", "*", "*", "1", "*", "*", "Minsizerel",
813 "*", "*", "*", "*", "*"),
814 ("*", "*", "*", "2", "*", "*", "Debug",
815 "*", "*", "*", "*", "*"),
816 ("*", "*", "*", "2", "*", "*", "Minsizerel",
817 "*", "*", "*", "*", "*"),
818 ("*", "*", "*", "3", "*", "*", "Debug",
819 "*", "*", "*", "*", "*"),
820 ("*", "*", "*", "3", "*", "*", "Release",
821 "*", "*", "*", "*", "*"),
822 ("mps2/an519", "*", "*", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800823 "*", "*", "*", "*", "profile_small", "*"),
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800824 ("musca_s1", "*", "*", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800825 "*", "*", "*", "*", "profile_small", "*"),
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800826 ("mps2/an519", "*", "*", "*", "*", "*",
827 "*", "*", "*", "*", "profile_medium", "*"),
828 ("mps2/an521", "*", "*", "*", "*", "*",
829 "*", "*", "*", "*", "profile_medium", "*"),
830 ("*", "toolchain_GNUARM.cmake", "*", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800831 "*", "*", "*", "*", "profile_small", "*"),
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800832 ("*", "toolchain_ARMCLANG.cmake", "*", "*", "*", "*",
833 "*", "*", "*", "*", "profile_medium", "*"),
834 ("*", "toolchain_ARMCLANG.cmake", "False", "*", "*", "*",
835 "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800836 ]
837 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800838
Karl Zhang14573bc2020-06-08 09:23:21 +0800839config_pp_OTP = {"seed_params": {
Mark Horvath8d281cd2020-12-07 15:20:26 +0100840 "tfm_platform": ["musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800841 "toolchain_file": ["toolchain_GNUARM.cmake"],
842 "psa_api": [True, False],
843 "isolation_level": ["1", "2"],
844 "test_regression": [True],
845 "test_psa_api": ["OFF"],
846 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800847 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800848 "with_bl2": [True],
849 "with_ns": [True, False],
850 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800851 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800852 },
853 "common_params": _common_tfm_builder_cfg,
854 "invalid": _common_tfm_invalid_configs + []
855 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800856
857# Configure build manager to build several combinations
858config_pp_PSA_API = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800859 "tfm_platform": ["mps2/an521"],
860 "toolchain_file": ["toolchain_GNUARM.cmake"],
861 "psa_api": [True],
862 "isolation_level": ["2"],
863 "test_regression": [False],
864 "test_psa_api": ["IPC",
865 "CRYPTO",
866 "PROTECTED_STORAGE",
867 "INITIAL_ATTESTATION",
868 "INTERNAL_TRUSTED_STORAGE"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800869 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800870 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800871 "with_bl2": [True],
872 "with_ns": [True, False],
873 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800874 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800875 },
876 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800877 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800878 }
879
Karl Zhang14573bc2020-06-08 09:23:21 +0800880config_pp_PSoC64 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800881 "tfm_platform": ["cypress/psoc64"],
882 "toolchain_file": ["toolchain_GNUARM.cmake"],
883 "psa_api": [True],
884 "isolation_level": ["1", "2"],
885 "test_regression": [True],
886 "test_psa_api": ["OFF"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800887 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800888 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800889 "with_bl2": [False],
890 "with_ns": [True, False],
891 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800892 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800893 },
894 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800895 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800896 }
897
Minos Galanakisea421232019-06-20 17:11:28 +0100898# Configruation used for document building
899config_doxygen = {"common_params": {
900 "config_type": "tf-m_documents",
901 "codebase_root_dir": "tf-m",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800902 "build_cmds": {"all": ["-DTFM_PLATFORM=mps2/an521 "
Fathi Boudra324fee72020-11-20 10:31:12 +0100903 "-DTFM_TOOLCHAIN_FILE=%(_tfm_code_dir_)s/toolchain_GNUARM.cmake"
Minos Galanakisea421232019-06-20 17:11:28 +0100904 "-DCMAKE_BUILD_TYPE=Debug "
Minos Galanakisea421232019-06-20 17:11:28 +0100905 "%(_tbm_code_dir_)s/",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800906 "cmake --build ./ -- docs"]},
907 "artifact_capture_rex": r'%(_tbm_build_dir_)s/docs/'
908 r'reference_manual/(?:latex|html)'
Minos Galanakisea421232019-06-20 17:11:28 +0100909 r'/(\w+\.(?:html|md|pdf))$',
910 },
Xinyu Zhangb708f572020-09-15 11:43:46 +0800911 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +0100912 }
913
Karl Zhangaff558a2020-05-15 14:28:23 +0100914# Configuration used in testing
Minos Galanakisea421232019-06-20 17:11:28 +0100915config_debug = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800916 "tfm_platform": ["mps2/an521"],
917 "toolchain_file": ["toolchain_ARMCLANG.cmake"],
918 "psa_api": [False],
919 "isolation_level": ["1"],
920 "test_regression": [False],
921 "test_psa_api": ["OFF"],
Minos Galanakisea421232019-06-20 17:11:28 +0100922 "cmake_build_type": ["Debug"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800923 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800924 "with_bl2": [True],
925 "with_ns": [True],
926 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800927 "partition_ps": ["ON"],
Minos Galanakisea421232019-06-20 17:11:28 +0100928 },
929 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800930 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +0100931 }
932
Dean Birch4c6ad622020-03-13 11:28:03 +0000933# Configuration used in CI
Xinyu Zhangb708f572020-09-15 11:43:46 +0800934config_ci = {"seed_params": {
935 "tfm_platform": ["mps2/an521"],
936 "toolchain_file": ["toolchain_ARMCLANG.cmake",
937 "toolchain_GNUARM.cmake"],
938 "psa_api": [True, False],
939 "isolation_level": ["1", "2"],
940 "test_regression": [True, False],
941 "test_psa_api": ["OFF"],
942 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800943 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800944 "with_bl2": [True, False],
945 "with_ns": [True],
946 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800947 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800948 },
949 "common_params": _common_tfm_builder_cfg,
950 "invalid": _common_tfm_invalid_configs + [
951 ("*", "toolchain_ARMCLANG.cmake", True, "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800952 "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800953 ("*", "toolchain_ARMCLANG.cmake", False, "1", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800954 "*", "*", False, "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800955 ]
956 }
Matthew Hartfb6fd362020-03-04 21:03:59 +0000957
Xinyu Zhangb708f572020-09-15 11:43:46 +0800958config_lava_debug = {"seed_params": {
959 "tfm_platform": ["mps2/an521", "mps2/an519"],
960 "toolchain_file": ["toolchain_GNUARM.cmake"],
961 "psa_api": [True, False],
962 "isolation_level": ["1", "2"],
963 "test_regression": [True],
964 "test_psa_api": ["OFF"],
965 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800966 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800967 "with_bl2": [True, False],
968 "with_ns": [True, False],
969 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800970 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800971 },
972 "common_params": _common_tfm_builder_cfg,
973 "invalid": _common_tfm_invalid_configs + [
974 ("mps2/an521", "toolchain_GNUARM.cmake", True, "2", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800975 "*", "*", True, "*", "*", "*")
Xinyu Zhangb708f572020-09-15 11:43:46 +0800976 ]
977 }
Dean Birch4c6ad622020-03-13 11:28:03 +0000978
Karl Zhangaff558a2020-05-15 14:28:23 +0100979_builtin_configs = {
Karl Zhang14573bc2020-06-08 09:23:21 +0800980 #release test group
Karl Zhangaff558a2020-05-15 14:28:23 +0100981 "tfm_test": config_tfm_test,
982 "tfm_test2": config_tfm_test2,
Karl Zhang14573bc2020-06-08 09:23:21 +0800983 "tfm_profile": config_tfm_profile,
Karl Zhangaff558a2020-05-15 14:28:23 +0100984 "tfm_test_otp": config_tfm_test_OTP,
985 "psa_api": config_PSA_API,
986 "psa_api_otp": config_PSA_API_OTP,
987 "psa_ff": config_PSA_FF,
988 "psa_ff_otp": config_PSA_FF_OTP,
Karl Zhang14573bc2020-06-08 09:23:21 +0800989 "tfm_psoc64": config_PSOC64,
990
991 #nightly test group
992 "nightly_test": config_nightly,
993 "nightly_profile": config_nightly_profile,
994 "nightly_psa_api": config_nightly_PSA_API,
995 "nightly_ff": config_nightly_PSA_FF,
996 "nightly_otp": config_nightly_OTP,
997
998 #per patch test group
999 "pp_test": config_pp_test,
1000 "pp_OTP": config_pp_OTP,
1001 "pp_PSA_API": config_pp_PSA_API,
1002 "pp_psoc64": config_pp_PSoC64,
1003
1004 #full test group in the old CI
Karl Zhangaff558a2020-05-15 14:28:23 +01001005 "full": config_full,
Karl Zhang14573bc2020-06-08 09:23:21 +08001006
1007 #specific test group
Karl Zhangaff558a2020-05-15 14:28:23 +01001008 "an524": config_AN524,
Minos Galanakisea421232019-06-20 17:11:28 +01001009 "an521": config_AN521,
Karl Zhang14573bc2020-06-08 09:23:21 +08001010 "an521_psa_api": config_AN521_PSA_API,
1011 "an521_psa_ipc": config_AN521_PSA_IPC,
Minos Galanakisea421232019-06-20 17:11:28 +01001012 "an519": config_AN519,
1013 "musca_a": config_MUSCA_A,
1014 "musca_b1": config_MUSCA_B1,
Mark Horvath8d281cd2020-12-07 15:20:26 +01001015 "musca_b1_se": config_MUSCA_B1_SE,
Karl Zhangeffed972020-06-30 15:48:01 +08001016 "musca_s1": config_MUSCA_S1,
Karl Zhang96dfe2d2020-05-11 11:31:40 +08001017 "psoc64": config_PSOC64,
Minos Galanakisea421232019-06-20 17:11:28 +01001018 "ipc": config_IPC,
1019 "doxygen": config_doxygen,
Dean Birch4c6ad622020-03-13 11:28:03 +00001020 "debug": config_debug,
Karl Zhangaff558a2020-05-15 14:28:23 +01001021 "release": config_release,
Matthew Hartfb6fd362020-03-04 21:03:59 +00001022 "debug": config_debug,
Karl Zhang14573bc2020-06-08 09:23:21 +08001023
1024 #DevOps team test group
Matthew Hartfb6fd362020-03-04 21:03:59 +00001025 "lava_debug": config_lava_debug,
Xinyu Zhanga1000582020-12-04 15:25:24 +08001026 "ci": config_ci}
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001027
1028if __name__ == '__main__':
1029 import os
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001030
Minos Galanakisea421232019-06-20 17:11:28 +01001031 # Default behavior is to export refference config when called
1032 _dir = os.getcwd()
1033 from utils import save_json
1034 for _cname, _cfg in _builtin_configs.items():
1035 _fname = os.path.join(_dir, _cname + ".json")
1036 print("Exporting config %s" % _fname)
1037 save_json(_fname, _cfg)