blob: 923a50f35f311ed0f8b18b13b1b3d7cc7f24edf6 [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 Zhang9b1aef92021-03-12 15:36:44 +0800189 ("*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_large", "OFF"),
Xinyu Zhang709c1542020-11-02 18:41:07 +0800190 # PARTITION_PS should be OFF for Profile S
191 ("*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_small", "ON"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800192 # Proile M only support for PSA_API
193 ("*", "*", False, "*", "*", "*", "*", "*", "*", "*", "profile_medium", "*"),
194 # Profile M only support for Isolation Level 2
195 ("*", "*", "*", "1", "*", "*", "*", "*", "*", "*", "profile_medium", "*"),
Xinyu Zhange8de4512020-11-13 10:37:56 +0800196 ("*", "*", "*", "3", "*", "*", "*", "*", "*", "*", "profile_medium", "*"),
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800197 # Profile L only support for Isolation Level 3
198 ("*", "*", "*", "1", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
199 ("*", "*", "*", "2", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800200 # Profile S does not support PSA_API
201 ("*", "*", True, "*", "*", "*", "*", "*", "*", "*", "profile_small", "*"),
202 # Profile S only supports Isolation Level 2
203 ("*", "*", "*", "2", "*", "*", "*", "*", "*", "*", "profile_small", "*"),
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800204 # Only AN521 and MUSCA_B1 support Isolation Level 3
205 ("mps2/an519", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800206 ("mps3/an524", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800207 ("musca_a", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
208 ("musca_s1", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
209 ("cypress/psoc64", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
Mark Horvath8d281cd2020-12-07 15:20:26 +0100210 ("musca_b1/secure_enclave", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800211 ]
212
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100213# Configure build manager to build several combinations
Karl Zhangaff558a2020-05-15 14:28:23 +0100214config_AN524 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800215 "tfm_platform": ["mps3/an524"],
216 "toolchain_file": ["toolchain_GNUARM.cmake",
217 "toolchain_ARMCLANG.cmake"],
218 "psa_api": [True, False],
219 "isolation_level": ["1", "2"],
220 "test_regression": [True, False],
221 "test_psa_api": ["OFF"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100222 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800223 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800224 "with_bl2": [True, False],
225 "with_ns": [True, False],
226 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800227 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100228 },
229 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800230 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100231 }
232
Karl Zhangaff558a2020-05-15 14:28:23 +0100233config_AN521 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800234 "tfm_platform": ["mps2/an521"],
235 "toolchain_file": ["toolchain_GNUARM.cmake",
236 "toolchain_ARMCLANG.cmake"],
237 "psa_api": [True, False],
238 "isolation_level": ["1", "2"],
239 "test_regression": [True, False],
240 "test_psa_api": ["OFF"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100241 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800242 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800243 "with_bl2": [True, False],
244 "with_ns": [True, False],
245 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800246 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100247 },
248 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800249 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100250 }
251
Karl Zhangaff558a2020-05-15 14:28:23 +0100252config_PSA_API = {"seed_params": {
Karl Zhang5ccb5522021-03-01 22:16:29 +0800253 "tfm_platform": ["mps2/an521", "musca_b1/sse_200",
254 "musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800255 "toolchain_file": ["toolchain_GNUARM.cmake",
256 "toolchain_ARMCLANG.cmake"],
257 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800258 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800259 "test_regression": [False],
260 "test_psa_api": ["CRYPTO",
261 "PROTECTED_STORAGE",
262 "INITIAL_ATTESTATION",
263 "INTERNAL_TRUSTED_STORAGE"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100264 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800265 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800266 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800267 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800268 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800269 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100270 },
271 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800272 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100273 }
274
Karl Zhangaff558a2020-05-15 14:28:23 +0100275config_PSA_FF = {"seed_params": {
Karl Zhang5ccb5522021-03-01 22:16:29 +0800276 "tfm_platform": ["mps2/an521", "musca_b1/sse_200",
277 "musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800278 "toolchain_file": ["toolchain_GNUARM.cmake",
279 "toolchain_ARMCLANG.cmake"],
280 "psa_api": [True],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800281 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800282 "test_regression": [False],
283 "test_psa_api": ["IPC"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100284 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800285 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800286 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800287 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800288 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800289 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100290 },
291 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800292 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100293 }
294
Karl Zhangaff558a2020-05-15 14:28:23 +0100295config_PSA_API_OTP = {"seed_params": {
Mark Horvath8d281cd2020-12-07 15:20:26 +0100296 "tfm_platform": ["musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800297 "toolchain_file": ["toolchain_GNUARM.cmake",
298 "toolchain_ARMCLANG.cmake"],
299 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800300 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800301 "test_regression": [False],
302 "test_psa_api": ["CRYPTO",
303 "PROTECTED_STORAGE",
304 "INITIAL_ATTESTATION",
305 "INTERNAL_TRUSTED_STORAGE"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100306 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800307 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800308 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800309 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800310 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800311 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100312 },
313 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800314 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100315 }
Minos Galanakisea421232019-06-20 17:11:28 +0100316
Xinyu Zhangb708f572020-09-15 11:43:46 +0800317config_PSA_FF_OTP = {"seed_params": {
Mark Horvath8d281cd2020-12-07 15:20:26 +0100318 "tfm_platform": ["musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800319 "toolchain_file": ["toolchain_GNUARM.cmake",
320 "toolchain_ARMCLANG.cmake"],
321 "psa_api": [True],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800322 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800323 "test_regression": [False],
324 "test_psa_api": ["IPC"],
325 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800326 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800327 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800328 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800329 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800330 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800331 },
332 "common_params": _common_tfm_builder_cfg,
333 "invalid": _common_tfm_invalid_configs + []
334 }
335
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800336config_PSOC64 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800337 "tfm_platform": ["cypress/psoc64"],
338 "toolchain_file": ["toolchain_GNUARM.cmake",
339 "toolchain_ARMCLANG.cmake"],
340 "psa_api": [True],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800341 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800342 "test_regression": [True],
343 "test_psa_api": ["OFF"],
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800344 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800345 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800346 "with_bl2": [False],
347 "with_ns": [True, False],
348 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800349 "partition_ps": ["ON"],
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800350 },
351 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800352 "invalid": _common_tfm_invalid_configs + []
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800353 }
354
Minos Galanakisea421232019-06-20 17:11:28 +0100355config_AN519 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800356 "tfm_platform": ["mps2/an519"],
357 "toolchain_file": ["toolchain_GNUARM.cmake",
358 "toolchain_ARMCLANG.cmake"],
359 "psa_api": [True, False],
360 "isolation_level": ["1", "2"],
361 "test_regression": [True, False],
362 "test_psa_api": ["OFF"],
Minos Galanakisea421232019-06-20 17:11:28 +0100363 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800364 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800365 "with_bl2": [True, False],
366 "with_ns": [True, False],
367 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800368 "partition_ps": ["ON"],
Minos Galanakisea421232019-06-20 17:11:28 +0100369 },
370 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800371 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +0100372 }
373
Xinyu Zhangb708f572020-09-15 11:43:46 +0800374config_IPC = {"seed_params": {
Mark Horvath8d281cd2020-12-07 15:20:26 +0100375 "tfm_platform": ["mps2/an521", "mps2/an519", "musca_a",
376 "musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800377 "toolchain_file": ["toolchain_GNUARM.cmake",
378 "toolchain_ARMCLANG.cmake"],
379 "psa_api": [True],
380 "isolation_level": ["1", "2"],
381 "test_regression": [True, False],
382 "test_psa_api": ["OFF"],
383 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800384 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800385 "with_bl2": [True, False],
386 "with_ns": [True, False],
387 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800388 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800389 },
Minos Galanakisea421232019-06-20 17:11:28 +0100390 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800391 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +0100392 }
393
Minos Galanakisea421232019-06-20 17:11:28 +0100394config_full = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800395 "tfm_platform": ["mps2/an521", "mps2/an519",
Mark Horvath8d281cd2020-12-07 15:20:26 +0100396 "musca_a", "musca_b1/sse_200",
Karl Zhang6919ff62021-01-05 14:17:44 +0800397 "mps3/an524", "cypress/psoc64",
Mark Horvath8d281cd2020-12-07 15:20:26 +0100398 "musca_b1/secure_enclave"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800399 "toolchain_file": ["toolchain_GNUARM.cmake",
400 "toolchain_ARMCLANG.cmake"],
401 "psa_api": [True, False],
402 "isolation_level": ["1", "2"],
403 "test_regression": [True, False],
404 "test_psa_api": ["OFF"],
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800405 "cmake_build_type": ["Debug", "Release", "RelWithDebInfo"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800406 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800407 "with_bl2": [True, False],
408 "with_ns": [True, False],
409 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800410 "partition_ps": ["ON"],
Dean Birchd6ce2c82020-05-13 13:16:15 +0100411 },
412 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800413 "invalid": _common_tfm_invalid_configs + [
414 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800415 "*", "*", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800416 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800417 "*", "*", "*", "*", True, True, "*", "*"),
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800418 ("mps2/an521", "*", "*", "*",
419 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
420 ("mps2/an519", "*", "*", "*",
421 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
422 ("musca_a", "*", "*", "*",
423 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Mark Horvath8d281cd2020-12-07 15:20:26 +0100424 ("musca_b1/sse_200", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800425 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800426 ("mps3/an524", "*", "*", "*",
427 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800428 ]
Karl Zhang81a76772020-05-11 18:28:52 +0800429 }
430
Karl Zhangaff558a2020-05-15 14:28:23 +0100431config_tfm_test = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800432 "tfm_platform": ["mps2/an521", "musca_a",
Mark Horvath8d281cd2020-12-07 15:20:26 +0100433 "musca_b1/sse_200", "musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800434 "toolchain_file": ["toolchain_ARMCLANG.cmake",
435 "toolchain_GNUARM.cmake"],
436 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800437 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800438 "test_regression": [True, False],
439 "test_psa_api": ["OFF"],
440 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800441 "with_otp": ["off"],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800442 "with_bl2": [True],
443 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800444 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800445 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800446 },
447 "common_params": _common_tfm_builder_cfg,
448 "invalid": _common_tfm_invalid_configs + []
449 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800450
Karl Zhangaff558a2020-05-15 14:28:23 +0100451config_tfm_test2 = {"seed_params": {
Karl Zhang6919ff62021-01-05 14:17:44 +0800452 "tfm_platform": ["mps2/an519", "mps3/an524"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800453 "toolchain_file": ["toolchain_ARMCLANG.cmake",
454 "toolchain_GNUARM.cmake"],
455 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800456 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800457 "test_regression": [True, False],
458 "test_psa_api": ["OFF"],
459 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800460 "with_otp": ["off"],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800461 "with_bl2": [True],
462 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800463 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800464 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800465 },
466 "common_params": _common_tfm_builder_cfg,
467 "invalid": _common_tfm_invalid_configs + [
468 ("mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800469 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800470 ]
471 }
Karl Zhangaff558a2020-05-15 14:28:23 +0100472
Karl Zhang14573bc2020-06-08 09:23:21 +0800473config_tfm_profile = {"seed_params": {
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800474 "tfm_platform": ["mps2/an519", "mps2/an521",
Mark Horvath8d281cd2020-12-07 15:20:26 +0100475 "musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800476 "toolchain_file": ["toolchain_ARMCLANG.cmake",
477 "toolchain_GNUARM.cmake"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800478 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800479 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800480 "test_regression": [True, False],
481 "test_psa_api": ["OFF"],
482 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800483 "with_otp": ["off"],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800484 "with_bl2": [True],
485 "with_ns": [True],
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800486 "profile": ["profile_small", "profile_medium", "profile_large"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800487 "partition_ps": ["ON", "OFF"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800488 },
489 "common_params": _common_tfm_builder_cfg,
490 "invalid": _common_tfm_invalid_configs + [
491 ("mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800492 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800493 # Profile Large is only supported by AN521
494 ("mps2/an519", "*", "*",
495 "*", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
496 ("musca_b1/sse_200", "*", "*",
497 "*", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800498 ]
499 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800500
Karl Zhangaff558a2020-05-15 14:28:23 +0100501config_tfm_test_OTP = {"seed_params": {
Mark Horvath8d281cd2020-12-07 15:20:26 +0100502 "tfm_platform": ["musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800503 "toolchain_file": ["toolchain_ARMCLANG.cmake",
504 "toolchain_GNUARM.cmake"],
505 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800506 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800507 "test_regression": [True, False],
508 "test_psa_api": ["OFF"],
509 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800510 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800511 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800512 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800513 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800514 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800515 },
516 "common_params": _common_tfm_builder_cfg,
517 "invalid": _common_tfm_invalid_configs + []
518 }
Karl Zhangaff558a2020-05-15 14:28:23 +0100519
Minos Galanakisea421232019-06-20 17:11:28 +0100520config_MUSCA_A = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800521 "tfm_platform": ["musca_a"],
522 "toolchain_file": ["toolchain_ARMCLANG.cmake",
523 "toolchain_GNUARM.cmake"],
524 "psa_api": [True, False],
525 "isolation_level": ["1", "2"],
526 "test_regression": [True, False],
527 "test_psa_api": ["OFF"],
528 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800529 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800530 "with_bl2": [True],
531 "with_ns": [True, False],
532 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800533 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800534 },
535 "common_params": _common_tfm_builder_cfg,
536 "invalid": _common_tfm_invalid_configs + []
537 }
Minos Galanakisea421232019-06-20 17:11:28 +0100538
539config_MUSCA_B1 = {"seed_params": {
Mark Horvath8d281cd2020-12-07 15:20:26 +0100540 "tfm_platform": ["musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800541 "toolchain_file": ["toolchain_ARMCLANG.cmake",
542 "toolchain_GNUARM.cmake"],
543 "psa_api": [True, False],
544 "isolation_level": ["1", "2"],
545 "test_regression": [True, False],
546 "test_psa_api": ["OFF"],
547 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800548 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800549 "with_bl2": [True],
550 "with_ns": [True, False],
551 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800552 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800553 },
554 "common_params": _common_tfm_builder_cfg,
555 "invalid": _common_tfm_invalid_configs + []
556 }
Minos Galanakisea421232019-06-20 17:11:28 +0100557
Mark Horvath8d281cd2020-12-07 15:20:26 +0100558config_MUSCA_B1_SE = {"seed_params": {
559 "tfm_platform": ["musca_b1/secure_enclave"],
560 "toolchain_file": ["toolchain_ARMCLANG.cmake",
561 "toolchain_GNUARM.cmake"],
562 "psa_api": [True],
563 "isolation_level": ["1"],
564 "test_regression": [False],
565 "test_psa_api": ["OFF"],
566 "cmake_build_type": ["Debug", "Release"],
567 "with_otp": ["off"],
568 "with_bl2": [True],
569 "with_ns": [False],
570 "profile": [""],
571 "partition_ps": ["ON"],
572 },
573 "common_params": _common_tfm_builder_cfg,
574 "invalid": _common_tfm_invalid_configs + []
575 }
576
Karl Zhangeffed972020-06-30 15:48:01 +0800577config_MUSCA_S1 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800578 "tfm_platform": ["musca_s1"],
579 "toolchain_file": ["toolchain_ARMCLANG.cmake",
580 "toolchain_GNUARM.cmake"],
581 "psa_api": [True, False],
582 "isolation_level": ["1", "2"],
583 "test_regression": [True, False],
584 "test_psa_api": ["OFF"],
585 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800586 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800587 "with_bl2": [True],
588 "with_ns": [True, False],
589 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800590 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800591 },
592 "common_params": _common_tfm_builder_cfg,
593 "invalid": _common_tfm_invalid_configs + []
594 }
Karl Zhangeffed972020-06-30 15:48:01 +0800595
Karl Zhangaff558a2020-05-15 14:28:23 +0100596config_release = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800597 "tfm_platform": ["mps2/an521", "mps2/an519",
Mark Horvath8d281cd2020-12-07 15:20:26 +0100598 "musca_a", "musca_b1/sse_200", "musca_s1",
Karl Zhang6919ff62021-01-05 14:17:44 +0800599 "mps3/an524"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800600 "toolchain_file": ["toolchain_ARMCLANG.cmake",
601 "toolchain_GNUARM.cmake"],
602 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800603 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800604 "test_regression": [True, False],
605 "test_psa_api": ["OFF"],
606 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800607 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800608 "with_bl2": [True, False],
609 "with_ns": [True, False],
610 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800611 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800612 },
613 "common_params": _common_tfm_builder_cfg,
614 "invalid": _common_tfm_invalid_configs + [
615 ("mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800616 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800617 ]
618 }
Karl Zhangaff558a2020-05-15 14:28:23 +0100619
620# Configure build manager to build several combinations
621config_AN521_PSA_API = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800622 "tfm_platform": ["mps2/an521", "mps2/an519",
Mark Horvath8d281cd2020-12-07 15:20:26 +0100623 "musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800624 "toolchain_file": ["toolchain_GNUARM.cmake",
625 "toolchain_ARMCLANG.cmake"],
626 "psa_api": [True, False],
627 "isolation_level": ["1", "2"],
628 "test_regression": [False],
629 "test_psa_api": ["IPC",
630 "CRYPTO",
631 "PROTECTED_STORAGE",
632 "INITIAL_ATTESTATION",
633 "INTERNAL_TRUSTED_STORAGE"],
634 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800635 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800636 "with_bl2": [True],
637 "with_ns": [True, False],
638 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800639 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100640 },
641 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800642 "invalid": _common_tfm_invalid_configs + [
643 ("mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800644 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800645 ]
Karl Zhangaff558a2020-05-15 14:28:23 +0100646 }
647
Karl Zhangaff558a2020-05-15 14:28:23 +0100648config_AN521_PSA_IPC = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800649 "tfm_platform": ["mps2/an521", "mps2/an519",
Mark Horvath8d281cd2020-12-07 15:20:26 +0100650 "musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800651 "toolchain_file": ["toolchain_GNUARM.cmake",
652 "toolchain_ARMCLANG.cmake"],
653 "psa_api": [True],
654 "isolation_level": ["1", "2"],
655 "test_regression": [False],
656 "test_psa_api": ["IPC"],
657 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800658 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800659 "with_bl2": [True],
660 "with_ns": [True, False],
661 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800662 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100663 },
664 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800665 "invalid": _common_tfm_invalid_configs + [
666 ("mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800667 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800668 ]
Karl Zhangaff558a2020-05-15 14:28:23 +0100669 }
670
Karl Zhang14573bc2020-06-08 09:23:21 +0800671config_nightly = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800672 "tfm_platform": ["mps2/an521", "mps2/an519",
Mark Horvath8d281cd2020-12-07 15:20:26 +0100673 "musca_a", "musca_b1/sse_200", "musca_s1",
Karl Zhang6919ff62021-01-05 14:17:44 +0800674 "mps3/an524", "cypress/psoc64",
Mark Horvath8d281cd2020-12-07 15:20:26 +0100675 "musca_b1/secure_enclave"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800676 "toolchain_file": ["toolchain_GNUARM.cmake",
677 "toolchain_ARMCLANG.cmake"],
678 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800679 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800680 "test_regression": [True, False],
681 "test_psa_api": ["OFF"],
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800682 "cmake_build_type": ["Debug", "Release", "Minsizerel", "RelWithDebInfo"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800683 "with_otp": ["off"],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800684 "with_bl2": [True],
685 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800686 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800687 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800688 },
689 "common_params": _common_tfm_builder_cfg,
690 "invalid": _common_tfm_invalid_configs + [
691 ("mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800692 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800693 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800694 "*", "*", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800695 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800696 "*", "*", "*", "*", True, True, "*", "*"),
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800697 ("mps2/an521", "*", "*", "*",
698 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
699 ("mps2/an519", "*", "*", "*",
700 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
701 ("musca_a", "*", "*", "*",
702 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Mark Horvath8d281cd2020-12-07 15:20:26 +0100703 ("musca_b1/sse_200", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800704 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
705 ("musca_s1", "*", "*", "*",
706 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800707 ("mps3/an524", "*", "*", "*",
708 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800709 ]
710 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800711
Karl Zhang14573bc2020-06-08 09:23:21 +0800712config_nightly_profile = {"seed_params": {
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800713 "tfm_platform": ["mps2/an519", "mps2/an521",
Mark Horvath8d281cd2020-12-07 15:20:26 +0100714 "musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800715 "toolchain_file": ["toolchain_ARMCLANG.cmake",
716 "toolchain_GNUARM.cmake"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800717 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800718 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800719 "test_regression": [True, False],
720 "test_psa_api": ["OFF"],
721 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800722 "with_otp": ["off"],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800723 "with_bl2": [True],
724 "with_ns": [True],
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800725 "profile": ["profile_small", "profile_medium", "profile_large"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800726 "partition_ps": ["ON", "OFF"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800727 },
728 "common_params": _common_tfm_builder_cfg,
729 "invalid": _common_tfm_invalid_configs + [
730 ("mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800731 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800732 # Profile Large is only supported by AN521
733 ("mps2/an519", "*", "*",
734 "*", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
735 ("musca_b1/sse_200", "*", "*",
736 "*", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800737 ]
738 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800739
Karl Zhang14573bc2020-06-08 09:23:21 +0800740config_nightly_PSA_API = {"seed_params": {
Karl Zhang5ccb5522021-03-01 22:16:29 +0800741 "tfm_platform": ["mps2/an521", "musca_b1/sse_200",
742 "musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800743 "toolchain_file": ["toolchain_GNUARM.cmake",
744 "toolchain_ARMCLANG.cmake"],
745 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800746 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800747 "test_regression": [False],
748 "test_psa_api": ["CRYPTO",
749 "PROTECTED_STORAGE",
750 "INITIAL_ATTESTATION",
751 "INTERNAL_TRUSTED_STORAGE"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800752 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800753 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800754 "with_bl2": [True],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800755 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800756 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800757 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800758 },
759 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800760 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800761 }
762
Karl Zhang14573bc2020-06-08 09:23:21 +0800763config_nightly_PSA_FF = {"seed_params": {
Karl Zhang5ccb5522021-03-01 22:16:29 +0800764 "tfm_platform": ["mps2/an521", "musca_b1/sse_200",
765 "musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800766 "toolchain_file": ["toolchain_GNUARM.cmake",
767 "toolchain_ARMCLANG.cmake"],
768 "psa_api": [True],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800769 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800770 "test_regression": [False],
771 "test_psa_api": ["IPC"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800772 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800773 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800774 "with_bl2": [True],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800775 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800776 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800777 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800778 },
779 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800780 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800781 }
782
Karl Zhang14573bc2020-06-08 09:23:21 +0800783config_nightly_OTP = {"seed_params": {
Mark Horvath8d281cd2020-12-07 15:20:26 +0100784 "tfm_platform": ["musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800785 "toolchain_file": ["toolchain_GNUARM.cmake",
786 "toolchain_ARMCLANG.cmake"],
787 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800788 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800789 "test_regression": [True],
790 "test_psa_api": ["OFF"],
791 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800792 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800793 "with_bl2": [True],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800794 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800795 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800796 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800797 },
798 "common_params": _common_tfm_builder_cfg,
799 "invalid": _common_tfm_invalid_configs + []
800 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800801
Karl Zhang14573bc2020-06-08 09:23:21 +0800802config_pp_test = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800803 "tfm_platform": ["mps2/an521", "mps2/an519",
Karl Zhang0d765af2021-01-05 11:32:29 +0800804 "musca_b1/sse_200", "musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800805 "toolchain_file": ["toolchain_GNUARM.cmake",
806 "toolchain_ARMCLANG.cmake"],
807 "psa_api": [True, False],
Karl Zhangde36b772021-01-08 10:17:03 +0800808 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800809 "test_regression": [True],
810 "test_psa_api": ["OFF"],
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800811 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800812 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800813 "with_bl2": [True],
814 "with_ns": [True, False],
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800815 "profile": ["", "profile_small", "profile_medium"],
816 "partition_ps": ["ON", "OFF"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800817 },
818 "common_params": _common_tfm_builder_cfg,
819 "invalid": _common_tfm_invalid_configs + [
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800820 # invalid configs that are not supported by TF-M
821 ("musca_s1", "*", "*", "*", "*", "*",
822 "*", "*", "*", "*", "profile_medium", "*"),
823 # valid configs supported by TF-M but not needed in per-patch
824 ("*", "*", "*", "1", "*", "*", "Release",
825 "*", "*", "*", "*", "*"),
826 ("*", "*", "*", "1", "*", "*", "Minsizerel",
827 "*", "*", "*", "*", "*"),
828 ("*", "*", "*", "2", "*", "*", "Debug",
829 "*", "*", "*", "*", "*"),
830 ("*", "*", "*", "2", "*", "*", "Minsizerel",
831 "*", "*", "*", "*", "*"),
832 ("*", "*", "*", "3", "*", "*", "Debug",
833 "*", "*", "*", "*", "*"),
834 ("*", "*", "*", "3", "*", "*", "Release",
835 "*", "*", "*", "*", "*"),
836 ("mps2/an519", "*", "*", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800837 "*", "*", "*", "*", "profile_small", "*"),
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800838 ("musca_s1", "*", "*", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800839 "*", "*", "*", "*", "profile_small", "*"),
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800840 ("mps2/an519", "*", "*", "*", "*", "*",
841 "*", "*", "*", "*", "profile_medium", "*"),
842 ("mps2/an521", "*", "*", "*", "*", "*",
843 "*", "*", "*", "*", "profile_medium", "*"),
844 ("*", "toolchain_GNUARM.cmake", "*", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800845 "*", "*", "*", "*", "profile_small", "*"),
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800846 ("*", "toolchain_ARMCLANG.cmake", "*", "*", "*", "*",
847 "*", "*", "*", "*", "profile_medium", "*"),
848 ("*", "toolchain_ARMCLANG.cmake", "False", "*", "*", "*",
849 "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800850 ]
851 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800852
Karl Zhang14573bc2020-06-08 09:23:21 +0800853config_pp_OTP = {"seed_params": {
Mark Horvath8d281cd2020-12-07 15:20:26 +0100854 "tfm_platform": ["musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800855 "toolchain_file": ["toolchain_GNUARM.cmake"],
856 "psa_api": [True, False],
857 "isolation_level": ["1", "2"],
858 "test_regression": [True],
859 "test_psa_api": ["OFF"],
860 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800861 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800862 "with_bl2": [True],
863 "with_ns": [True, False],
864 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800865 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800866 },
867 "common_params": _common_tfm_builder_cfg,
868 "invalid": _common_tfm_invalid_configs + []
869 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800870
871# Configure build manager to build several combinations
872config_pp_PSA_API = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800873 "tfm_platform": ["mps2/an521"],
874 "toolchain_file": ["toolchain_GNUARM.cmake"],
875 "psa_api": [True],
876 "isolation_level": ["2"],
877 "test_regression": [False],
878 "test_psa_api": ["IPC",
879 "CRYPTO",
880 "PROTECTED_STORAGE",
881 "INITIAL_ATTESTATION",
882 "INTERNAL_TRUSTED_STORAGE"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800883 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800884 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800885 "with_bl2": [True],
886 "with_ns": [True, False],
887 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800888 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800889 },
890 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800891 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800892 }
893
Karl Zhang14573bc2020-06-08 09:23:21 +0800894config_pp_PSoC64 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800895 "tfm_platform": ["cypress/psoc64"],
896 "toolchain_file": ["toolchain_GNUARM.cmake"],
897 "psa_api": [True],
898 "isolation_level": ["1", "2"],
899 "test_regression": [True],
900 "test_psa_api": ["OFF"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800901 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800902 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800903 "with_bl2": [False],
904 "with_ns": [True, False],
905 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800906 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800907 },
908 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800909 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800910 }
911
Minos Galanakisea421232019-06-20 17:11:28 +0100912# Configruation used for document building
913config_doxygen = {"common_params": {
914 "config_type": "tf-m_documents",
915 "codebase_root_dir": "tf-m",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800916 "build_cmds": {"all": ["-DTFM_PLATFORM=mps2/an521 "
Fathi Boudra324fee72020-11-20 10:31:12 +0100917 "-DTFM_TOOLCHAIN_FILE=%(_tfm_code_dir_)s/toolchain_GNUARM.cmake"
Minos Galanakisea421232019-06-20 17:11:28 +0100918 "-DCMAKE_BUILD_TYPE=Debug "
Minos Galanakisea421232019-06-20 17:11:28 +0100919 "%(_tbm_code_dir_)s/",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800920 "cmake --build ./ -- docs"]},
921 "artifact_capture_rex": r'%(_tbm_build_dir_)s/docs/'
922 r'reference_manual/(?:latex|html)'
Minos Galanakisea421232019-06-20 17:11:28 +0100923 r'/(\w+\.(?:html|md|pdf))$',
924 },
Xinyu Zhangb708f572020-09-15 11:43:46 +0800925 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +0100926 }
927
Karl Zhangaff558a2020-05-15 14:28:23 +0100928# Configuration used in testing
Minos Galanakisea421232019-06-20 17:11:28 +0100929config_debug = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800930 "tfm_platform": ["mps2/an521"],
931 "toolchain_file": ["toolchain_ARMCLANG.cmake"],
932 "psa_api": [False],
933 "isolation_level": ["1"],
934 "test_regression": [False],
935 "test_psa_api": ["OFF"],
Minos Galanakisea421232019-06-20 17:11:28 +0100936 "cmake_build_type": ["Debug"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800937 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800938 "with_bl2": [True],
939 "with_ns": [True],
940 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800941 "partition_ps": ["ON"],
Minos Galanakisea421232019-06-20 17:11:28 +0100942 },
943 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800944 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +0100945 }
946
Dean Birch4c6ad622020-03-13 11:28:03 +0000947# Configuration used in CI
Xinyu Zhangb708f572020-09-15 11:43:46 +0800948config_ci = {"seed_params": {
949 "tfm_platform": ["mps2/an521"],
950 "toolchain_file": ["toolchain_ARMCLANG.cmake",
951 "toolchain_GNUARM.cmake"],
952 "psa_api": [True, False],
953 "isolation_level": ["1", "2"],
954 "test_regression": [True, False],
955 "test_psa_api": ["OFF"],
956 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800957 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800958 "with_bl2": [True, False],
959 "with_ns": [True],
960 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800961 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800962 },
963 "common_params": _common_tfm_builder_cfg,
964 "invalid": _common_tfm_invalid_configs + [
965 ("*", "toolchain_ARMCLANG.cmake", True, "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800966 "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800967 ("*", "toolchain_ARMCLANG.cmake", False, "1", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800968 "*", "*", False, "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800969 ]
970 }
Matthew Hartfb6fd362020-03-04 21:03:59 +0000971
Xinyu Zhangb708f572020-09-15 11:43:46 +0800972config_lava_debug = {"seed_params": {
973 "tfm_platform": ["mps2/an521", "mps2/an519"],
974 "toolchain_file": ["toolchain_GNUARM.cmake"],
975 "psa_api": [True, False],
976 "isolation_level": ["1", "2"],
977 "test_regression": [True],
978 "test_psa_api": ["OFF"],
979 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800980 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800981 "with_bl2": [True, False],
982 "with_ns": [True, False],
983 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800984 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800985 },
986 "common_params": _common_tfm_builder_cfg,
987 "invalid": _common_tfm_invalid_configs + [
988 ("mps2/an521", "toolchain_GNUARM.cmake", True, "2", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800989 "*", "*", True, "*", "*", "*")
Xinyu Zhangb708f572020-09-15 11:43:46 +0800990 ]
991 }
Dean Birch4c6ad622020-03-13 11:28:03 +0000992
Karl Zhangaff558a2020-05-15 14:28:23 +0100993_builtin_configs = {
Karl Zhang14573bc2020-06-08 09:23:21 +0800994 #release test group
Karl Zhangaff558a2020-05-15 14:28:23 +0100995 "tfm_test": config_tfm_test,
996 "tfm_test2": config_tfm_test2,
Karl Zhang14573bc2020-06-08 09:23:21 +0800997 "tfm_profile": config_tfm_profile,
Karl Zhangaff558a2020-05-15 14:28:23 +0100998 "tfm_test_otp": config_tfm_test_OTP,
999 "psa_api": config_PSA_API,
1000 "psa_api_otp": config_PSA_API_OTP,
1001 "psa_ff": config_PSA_FF,
1002 "psa_ff_otp": config_PSA_FF_OTP,
Karl Zhang14573bc2020-06-08 09:23:21 +08001003 "tfm_psoc64": config_PSOC64,
1004
1005 #nightly test group
1006 "nightly_test": config_nightly,
1007 "nightly_profile": config_nightly_profile,
1008 "nightly_psa_api": config_nightly_PSA_API,
1009 "nightly_ff": config_nightly_PSA_FF,
1010 "nightly_otp": config_nightly_OTP,
1011
1012 #per patch test group
1013 "pp_test": config_pp_test,
1014 "pp_OTP": config_pp_OTP,
1015 "pp_PSA_API": config_pp_PSA_API,
1016 "pp_psoc64": config_pp_PSoC64,
1017
1018 #full test group in the old CI
Karl Zhangaff558a2020-05-15 14:28:23 +01001019 "full": config_full,
Karl Zhang14573bc2020-06-08 09:23:21 +08001020
1021 #specific test group
Karl Zhangaff558a2020-05-15 14:28:23 +01001022 "an524": config_AN524,
Minos Galanakisea421232019-06-20 17:11:28 +01001023 "an521": config_AN521,
Karl Zhang14573bc2020-06-08 09:23:21 +08001024 "an521_psa_api": config_AN521_PSA_API,
1025 "an521_psa_ipc": config_AN521_PSA_IPC,
Minos Galanakisea421232019-06-20 17:11:28 +01001026 "an519": config_AN519,
1027 "musca_a": config_MUSCA_A,
1028 "musca_b1": config_MUSCA_B1,
Mark Horvath8d281cd2020-12-07 15:20:26 +01001029 "musca_b1_se": config_MUSCA_B1_SE,
Karl Zhangeffed972020-06-30 15:48:01 +08001030 "musca_s1": config_MUSCA_S1,
Karl Zhang96dfe2d2020-05-11 11:31:40 +08001031 "psoc64": config_PSOC64,
Minos Galanakisea421232019-06-20 17:11:28 +01001032 "ipc": config_IPC,
1033 "doxygen": config_doxygen,
Dean Birch4c6ad622020-03-13 11:28:03 +00001034 "debug": config_debug,
Karl Zhangaff558a2020-05-15 14:28:23 +01001035 "release": config_release,
Matthew Hartfb6fd362020-03-04 21:03:59 +00001036 "debug": config_debug,
Karl Zhang14573bc2020-06-08 09:23:21 +08001037
1038 #DevOps team test group
Matthew Hartfb6fd362020-03-04 21:03:59 +00001039 "lava_debug": config_lava_debug,
Xinyu Zhanga1000582020-12-04 15:25:24 +08001040 "ci": config_ci}
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001041
1042if __name__ == '__main__':
1043 import os
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001044
Minos Galanakisea421232019-06-20 17:11:28 +01001045 # Default behavior is to export refference config when called
1046 _dir = os.getcwd()
1047 from utils import save_json
1048 for _cname, _cfg in _builtin_configs.items():
1049 _fname = os.path.join(_dir, _cname + ".json")
1050 print("Exporting config %s" % _fname)
1051 save_json(_fname, _cfg)