blob: 6181d86e0d7d2acc9190872166b116c54b951cfe [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/*
Karl Zhangaff558a2020-05-15 14:28:23 +010011 * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +010012 *
13 * SPDX-License-Identifier: BSD-3-Clause
14 *
15 */
16 """
17__author__ = "Minos Galanakis"
18__email__ = "minos.galanakis@linaro.org"
19__project__ = "Trusted Firmware-M Open CI"
20__status__ = "stable"
Minos Galanakisea421232019-06-20 17:11:28 +010021__version__ = "1.1"
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +010022
Minos Galanakisea421232019-06-20 17:11:28 +010023# common parameters for tf-m build system
24# This configuration template will be passed into the tfm-builder module after
25# the template evaluation is converted to a command
26
27_common_tfm_builder_cfg = {
28 "config_type": "tf-m",
29 "codebase_root_dir": "tf-m",
30 # Order to which the variants are evaluated. This affects the name of
31 # variant configuration and the wildcard replacement logic in invalid
32 # configuration tuples
Xinyu Zhangb708f572020-09-15 11:43:46 +080033 "sort_order": ["tfm_platform",
34 "toolchain_file",
35 "psa_api",
36 "isolation_level",
37 "test_regression",
38 "test_psa_api",
Minos Galanakisea421232019-06-20 17:11:28 +010039 "cmake_build_type",
Xinyu Zhangb708f572020-09-15 11:43:46 +080040 "with_otp",
41 "with_bl2",
42 "with_ns",
Xinyu Zhang9fd74242020-10-22 11:30:50 +080043 "profile",
44 "partition_ps"],
Minos Galanakisea421232019-06-20 17:11:28 +010045
46 # Keys for the templace will come from the combinations of parameters
47 # provided in the seed dictionary.
48
Xinyu Zhangb708f572020-09-15 11:43:46 +080049 "config_template": "cmake " + \
50 "-DTFM_PLATFORM=%(tfm_platform)s " + \
51 "-DCMAKE_TOOLCHAIN_FILE=%(codebase_root_dir)s/%(toolchain_file)s " + \
52 "-DTFM_PSA_API=%(psa_api)s " + \
53 "-DTFM_ISOLATION_LEVEL=%(isolation_level)s " + \
54 "-DTEST_NS=%(test_regression)s -DTEST_S=%(test_regression)s " + \
55 "-DTEST_PSA_API=%(test_psa_api)s " + \
56 "-DCMAKE_BUILD_TYPE=%(cmake_build_type)s " + \
57 "-DCRYPTO_HW_ACCELERATOR_OTP_STATE=%(with_otp)s " + \
58 "-DBL2=%(with_bl2)s " + \
59 "-DNS=%(with_ns)s " + \
60 "-DTFM_TEST_REPO_PATH=%(codebase_root_dir)s/../tf-m-tests " + \
61 "-DMBEDCRYPTO_PATH=%(codebase_root_dir)s/../mbedtls " + \
62 "-DPSA_ARCH_TESTS_PATH=%(codebase_root_dir)s/../psa-arch-tests " + \
63 "-DMCUBOOT_PATH=%(codebase_root_dir)s/../mcuboot " + \
64 "-DTFM_PROFILE=%(profile)s " + \
Xinyu Zhang9fd74242020-10-22 11:30:50 +080065 "-DTFM_PARTITION_PS=%(partition_ps)s " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080066 "%(codebase_root_dir)s",
Karl Zhangaff558a2020-05-15 14:28:23 +010067
Minos Galanakisea421232019-06-20 17:11:28 +010068 # A small subset of string substitution params is allowed in commands.
69 # tfm_build_manager will replace %(_tbm_build_dir_)s, %(_tbm_code_dir_)s,
70 # _tbm_target_platform_ with the paths set when building
71
Xinyu Zhangb708f572020-09-15 11:43:46 +080072 "artifact_capture_rex": (r'%(_tbm_build_dir_)s/bin'
Minos Galanakisea421232019-06-20 17:11:28 +010073 r'/(\w+\.(?:axf|bin|hex))$'),
74
75 # ALL commands will be executed for every build.
76 # Other keys will append extra commands when matching target_platform
Karl Zhangaff558a2020-05-15 14:28:23 +010077 "build_cmds": {"all": ["cmake --build ./ -- install"],
Minos Galanakisea421232019-06-20 17:11:28 +010078 "MUSCA_A": [("srec_cat "
Xinyu Zhangb708f572020-09-15 11:43:46 +080079 "%(_tbm_build_dir_)s/bin/"
80 "bl2.bin "
Minos Galanakisea421232019-06-20 17:11:28 +010081 "-Binary -offset 0x200000 "
Xinyu Zhangb708f572020-09-15 11:43:46 +080082 "%(_tbm_build_dir_)s/bin/"
83 "%tfm_s_ns_signed.bin "
Minos Galanakisea421232019-06-20 17:11:28 +010084 "-Binary -offset 0x220000 -o "
Xinyu Zhangb708f572020-09-15 11:43:46 +080085 "%(_tbm_build_dir_)s/bin/"
Minos Galanakisea421232019-06-20 17:11:28 +010086 "/tfm.hex -Intel")],
87 "MUSCA_B1": [("srec_cat "
Xinyu Zhangb708f572020-09-15 11:43:46 +080088 "%(_tbm_build_dir_)s/bin/"
89 "bl2.bin "
Minos Galanakise86f4482019-11-06 16:08:23 +000090 "-Binary -offset 0xA000000 "
Xinyu Zhangb708f572020-09-15 11:43:46 +080091 "%(_tbm_build_dir_)s/bin/"
92 "%tfm_s_ns_signed.bin "
Minos Galanakise86f4482019-11-06 16:08:23 +000093 "-Binary -offset 0xA020000 -o "
Xinyu Zhangb708f572020-09-15 11:43:46 +080094 "%(_tbm_build_dir_)s/bin/"
Karl Zhangeffed972020-06-30 15:48:01 +080095 "/tfm.hex -Intel")],
96 "MUSCA_S1": [("srec_cat "
Xinyu Zhangb708f572020-09-15 11:43:46 +080097 "%(_tbm_build_dir_)s/bin/"
98 "bl2.bin "
Karl Zhangeffed972020-06-30 15:48:01 +080099 "-Binary -offset 0xA000000 "
Xinyu Zhangb708f572020-09-15 11:43:46 +0800100 "%(_tbm_build_dir_)s/bin/"
101 "%tfm_s_ns_signed.bin "
Karl Zhangeffed972020-06-30 15:48:01 +0800102 "-Binary -offset 0xA020000 -o "
Xinyu Zhangb708f572020-09-15 11:43:46 +0800103 "%(_tbm_build_dir_)s/bin/"
Minos Galanakisea421232019-06-20 17:11:28 +0100104 "/tfm.hex -Intel")]
105 },
106
107 # (Optional) If set will fail if those artefacts are missing post build
108 "required_artefacts": {"all": [
Xinyu Zhangb708f572020-09-15 11:43:46 +0800109 "%(_tbm_build_dir_)s/bin/"
110 "tfm_s.bin",
111 "%(_tbm_build_dir_)s/bin/"
112 "tfm_ns.bin"],
Minos Galanakisea421232019-06-20 17:11:28 +0100113 "MUSCA_A": [
Xinyu Zhangb708f572020-09-15 11:43:46 +0800114 "%(_tbm_build_dir_)s/bin/"
115 "tfm.hex",
116 "%(_tbm_build_dir_)s/bin/"
117 "mcuboot.bin",
118 "%(_tbm_build_dir_)s/bin/"
119 "tfm_sign.bin"],
Minos Galanakisea421232019-06-20 17:11:28 +0100120 "MUSCA_B1": [
Xinyu Zhangb708f572020-09-15 11:43:46 +0800121 "%(_tbm_build_dir_)s/bin/"
122 "tfm.hex",
123 "%(_tbm_build_dir_)s/bin/"
124 "mcuboot.bin",
125 "%(_tbm_build_dir_)s/bin/"
126 "tfm_sign.bin"],
Karl Zhangeffed972020-06-30 15:48:01 +0800127 "MUSCA_S1": [
Xinyu Zhangb708f572020-09-15 11:43:46 +0800128 "%(_tbm_build_dir_)s/bin/"
129 "tfm.hex",
130 "%(_tbm_build_dir_)s/bin/"
131 "mcuboot.bin",
132 "%(_tbm_build_dir_)s/bin/"
133 "tfm_sign.bin"]
Minos Galanakisea421232019-06-20 17:11:28 +0100134 }
135}
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100136
Xinyu Zhangb708f572020-09-15 11:43:46 +0800137# List of all build configs that are impossible under all circumstances
138_common_tfm_invalid_configs = [
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800139 # LVL2 requires PSA api
140 ("*", "*", False, "2", "*", "*", "*", "*", "*", "*", "*", "*"),
141 # Regression requires NS
142 ("*", "*", "*", "*", True, "*", "*", "*", "*", False, "*", "*"),
143 # No PSA_ACK with regression
144 ("*", "*", "*", "*", True, "IPC", "*", "*", "*", "*", "*", "*"),
145 ("*", "*", "*", "*", True, "CRYPTO", "*", "*", "*", "*", "*", "*"),
146 ("*", "*", "*", "*", True, "PROTECTED_STORAGE", "*", "*", "*", "*", "*", "*"),
147 ("*", "*", "*", "*", True, "INITIAL_ATTESTATION", "*", "*", "*", "*", "*", "*"),
148 ("*", "*", "*", "*", True, "INTERNAL_TRUSTED_STORAGE", "*", "*", "*", "*", "*", "*"),
149 # PSA_ACK requires NS
150 ("*", "*", "*", "*", "*", "IPC", "*", "*", "*", False, "*", "*"),
151 ("*", "*", "*", "*", "*", "CRYPTO", "*", "*", "*", False, "*", "*"),
152 ("*", "*", "*", "*", "*", "PROTECTED_STORAGE", "*", "*", "*", False, "*", "*"),
153 ("*", "*", "*", "*", "*", "INITIAL_ATTESTATION", "*", "*", "*", False, "*", "*"),
154 ("*", "*", "*", "*", "*", "INTERNAL_TRUSTED_STORAGE", "*", "*", "*", False, "*", "*"),
155 # Musca requires BL2
156 ("musca_a", "*", "*", "*", "*", "*", "*", "*", False, "*", "*", "*"),
157 ("musca_b1", "*", "*", "*", "*", "*", "*", "*", False, "*", "*", "*"),
158 ("musca_s1", "*", "*", "*", "*", "*", "*", "*", False, "*", "*", "*"),
159 # psoc64 cannot use BL2
160 ("cypress/psoc64", "*", "*", "*", "*", "*", "*", "*", True, "*", "*", "*"),
161 # Musca b1 does not support Profile S
162 ("musca_b1", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_small", "*"),
163 # PARTITION_PS could only be OFF for Profile M
164 ("*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "", "OFF"),
165 ("*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_small", "OFF"),
166 # Proile M only support for PSA_API
167 ("*", "*", False, "*", "*", "*", "*", "*", "*", "*", "profile_medium", "*"),
168 # Profile M only support for Isolation Level 2
169 ("*", "*", "*", "1", "*", "*", "*", "*", "*", "*", "profile_medium", "*"),
170 # Profile S does not support MUSCA_B1
171 ("musca_b1", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_small", "*"),
172 # Profile S does not support PSA_API
173 ("*", "*", True, "*", "*", "*", "*", "*", "*", "*", "profile_small", "*"),
174 # Profile S only supports Isolation Level 2
175 ("*", "*", "*", "2", "*", "*", "*", "*", "*", "*", "profile_small", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800176 ]
177
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100178# Configure build manager to build several combinations
Karl Zhangaff558a2020-05-15 14:28:23 +0100179config_AN539 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800180 "tfm_platform": ["mps2/an539"],
181 "toolchain_file": ["toolchain_GNUARM.cmake",
182 "toolchain_ARMCLANG.cmake"],
183 "psa_api": [True, False],
184 "isolation_level": ["1", "2"],
185 "test_regression": [True, False],
186 "test_psa_api": ["OFF"],
Minos Galanakisea421232019-06-20 17:11:28 +0100187 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800188 "with_otp": [False],
189 "with_bl2": [True, False],
190 "with_ns": [True, False],
191 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800192 "partition_ps": ["ON"],
Minos Galanakisea421232019-06-20 17:11:28 +0100193 },
194 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800195 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100196 }
197
Karl Zhangaff558a2020-05-15 14:28:23 +0100198config_AN524 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800199 "tfm_platform": ["mps3/an524"],
200 "toolchain_file": ["toolchain_GNUARM.cmake",
201 "toolchain_ARMCLANG.cmake"],
202 "psa_api": [True, False],
203 "isolation_level": ["1", "2"],
204 "test_regression": [True, False],
205 "test_psa_api": ["OFF"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100206 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800207 "with_otp": [False],
208 "with_bl2": [True, False],
209 "with_ns": [True, False],
210 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800211 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100212 },
213 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800214 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100215 }
216
Karl Zhangaff558a2020-05-15 14:28:23 +0100217config_AN521 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800218 "tfm_platform": ["mps2/an521"],
219 "toolchain_file": ["toolchain_GNUARM.cmake",
220 "toolchain_ARMCLANG.cmake"],
221 "psa_api": [True, False],
222 "isolation_level": ["1", "2"],
223 "test_regression": [True, False],
224 "test_psa_api": ["OFF"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100225 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800226 "with_otp": [False],
227 "with_bl2": [True, False],
228 "with_ns": [True, False],
229 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800230 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100231 },
232 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800233 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100234 }
235
Karl Zhangaff558a2020-05-15 14:28:23 +0100236config_PSA_API = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800237 "tfm_platform": ["mps2/an521", "musca_b1", "musca_s1"],
238 "toolchain_file": ["toolchain_GNUARM.cmake",
239 "toolchain_ARMCLANG.cmake"],
240 "psa_api": [True, False],
241 "isolation_level": ["1", "2"],
242 "test_regression": [False],
243 "test_psa_api": ["CRYPTO",
244 "PROTECTED_STORAGE",
245 "INITIAL_ATTESTATION",
246 "INTERNAL_TRUSTED_STORAGE"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100247 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800248 "with_otp": [False],
249 "with_bl2": [True],
250 "with_ns": [True, False],
251 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800252 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100253 },
254 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800255 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100256 }
257
Karl Zhangaff558a2020-05-15 14:28:23 +0100258config_PSA_FF = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800259 "tfm_platform": ["mps2/an521", "musca_b1"],
260 "toolchain_file": ["toolchain_GNUARM.cmake",
261 "toolchain_ARMCLANG.cmake"],
262 "psa_api": [True],
263 "isolation_level": ["1", "2"],
264 "test_regression": [False],
265 "test_psa_api": ["IPC"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100266 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800267 "with_otp": [False],
268 "with_bl2": [True],
269 "with_ns": [True, False],
270 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800271 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100272 },
273 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800274 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100275 }
276
Karl Zhangaff558a2020-05-15 14:28:23 +0100277config_PSA_API_OTP = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800278 "tfm_platform": ["musca_b1"],
279 "toolchain_file": ["toolchain_GNUARM.cmake",
280 "toolchain_ARMCLANG.cmake"],
281 "psa_api": [True, False],
282 "isolation_level": ["1", "2"],
283 "test_regression": [False],
284 "test_psa_api": ["CRYPTO",
285 "PROTECTED_STORAGE",
286 "INITIAL_ATTESTATION",
287 "INTERNAL_TRUSTED_STORAGE"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100288 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800289 "with_otp": [True],
290 "with_bl2": [True],
291 "with_ns": [True, False],
292 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800293 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100294 },
295 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800296 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100297 }
Minos Galanakisea421232019-06-20 17:11:28 +0100298
Xinyu Zhangb708f572020-09-15 11:43:46 +0800299config_PSA_FF_OTP = {"seed_params": {
300 "tfm_platform": ["musca_b1"],
301 "toolchain_file": ["toolchain_GNUARM.cmake",
302 "toolchain_ARMCLANG.cmake"],
303 "psa_api": [True],
304 "isolation_level": ["1", "2"],
305 "test_regression": [False],
306 "test_psa_api": ["IPC"],
307 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
308 "with_otp": [True],
309 "with_bl2": [True],
310 "with_ns": [True, False],
311 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800312 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800313 },
314 "common_params": _common_tfm_builder_cfg,
315 "invalid": _common_tfm_invalid_configs + []
316 }
317
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800318config_PSOC64 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800319 "tfm_platform": ["cypress/psoc64"],
320 "toolchain_file": ["toolchain_GNUARM.cmake",
321 "toolchain_ARMCLANG.cmake"],
322 "psa_api": [True],
323 "isolation_level": ["1", "2"],
324 "test_regression": [True],
325 "test_psa_api": ["OFF"],
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800326 "cmake_build_type": ["Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800327 "with_otp": [False],
328 "with_bl2": [False],
329 "with_ns": [True, False],
330 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800331 "partition_ps": ["ON"],
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800332 },
333 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800334 "invalid": _common_tfm_invalid_configs + []
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800335 }
336
Minos Galanakisea421232019-06-20 17:11:28 +0100337config_AN519 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800338 "tfm_platform": ["mps2/an519"],
339 "toolchain_file": ["toolchain_GNUARM.cmake",
340 "toolchain_ARMCLANG.cmake"],
341 "psa_api": [True, False],
342 "isolation_level": ["1", "2"],
343 "test_regression": [True, False],
344 "test_psa_api": ["OFF"],
Minos Galanakisea421232019-06-20 17:11:28 +0100345 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800346 "with_otp": [False],
347 "with_bl2": [True, False],
348 "with_ns": [True, False],
349 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800350 "partition_ps": ["ON"],
Minos Galanakisea421232019-06-20 17:11:28 +0100351 },
352 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800353 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +0100354 }
355
Xinyu Zhangb708f572020-09-15 11:43:46 +0800356config_IPC = {"seed_params": {
357 "tfm_platform": ["mps2/an521", "mps2/an519", "musca_a", "musca_b1"],
358 "toolchain_file": ["toolchain_GNUARM.cmake",
359 "toolchain_ARMCLANG.cmake"],
360 "psa_api": [True],
361 "isolation_level": ["1", "2"],
362 "test_regression": [True, False],
363 "test_psa_api": ["OFF"],
364 "cmake_build_type": ["Debug", "Release"],
365 "with_otp": [False],
366 "with_bl2": [True, False],
367 "with_ns": [True, False],
368 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800369 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800370 },
Minos Galanakisea421232019-06-20 17:11:28 +0100371 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800372 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +0100373 }
374
Minos Galanakisea421232019-06-20 17:11:28 +0100375config_full = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800376 "tfm_platform": ["mps2/an521", "mps2/an519",
377 "musca_a", "musca_b1",
378 "mps2/an539", "mps3/an524",
379 "cypress/psoc64"],
380 "toolchain_file": ["toolchain_GNUARM.cmake",
381 "toolchain_ARMCLANG.cmake"],
382 "psa_api": [True, False],
383 "isolation_level": ["1", "2"],
384 "test_regression": [True, False],
385 "test_psa_api": ["OFF"],
Dean Birchd6ce2c82020-05-13 13:16:15 +0100386 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800387 "with_otp": [False],
388 "with_bl2": [True, False],
389 "with_ns": [True, False],
390 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800391 "partition_ps": ["ON"],
Dean Birchd6ce2c82020-05-13 13:16:15 +0100392 },
393 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800394 "invalid": _common_tfm_invalid_configs + [
395 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800396 "*", "*", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800397 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800398 "*", "*", "*", "*", True, True, "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800399 ]
Karl Zhang81a76772020-05-11 18:28:52 +0800400 }
401
Karl Zhang81a76772020-05-11 18:28:52 +0800402config_full_gnuarm = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800403 "tfm_platform": ["mps2/an521", "mps2/an519",
404 "musca_a", "musca_b1",
405 "mps3/an524", "mps2/an539",
406 "cypress/psoc64"],
407 "toolchain_file": ["toolchain_GNUARM.cmake"],
408 "psa_api": [True, False],
409 "isolation_level": ["1", "2"],
410 "test_regression": [True, False],
411 "test_psa_api": ["OFF"],
Karl Zhang81a76772020-05-11 18:28:52 +0800412 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800413 "with_otp": [False],
414 "with_bl2": [True, False],
415 "with_ns": [True, False],
416 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800417 "partition_ps": ["ON"],
Karl Zhang81a76772020-05-11 18:28:52 +0800418 },
419 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800420 "invalid": _common_tfm_invalid_configs + [
421 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800422 "*", "*", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800423 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800424 "*", "*", "*", "*", True, True, "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800425 ]
Dean Birchd6ce2c82020-05-13 13:16:15 +0100426 }
427
Karl Zhangaff558a2020-05-15 14:28:23 +0100428config_tfm_test = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800429 "tfm_platform": ["mps2/an521", "musca_a",
430 "musca_b1", "musca_s1"],
431 "toolchain_file": ["toolchain_ARMCLANG.cmake",
432 "toolchain_GNUARM.cmake"],
433 "psa_api": [True, False],
434 "isolation_level": ["1", "2"],
435 "test_regression": [True, False],
436 "test_psa_api": ["OFF"],
437 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
438 "with_otp": [False],
439 "with_bl2": [True, False],
440 "with_ns": [True, False],
441 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800442 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800443 },
444 "common_params": _common_tfm_builder_cfg,
445 "invalid": _common_tfm_invalid_configs + []
446 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800447
Karl Zhangaff558a2020-05-15 14:28:23 +0100448config_tfm_test2 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800449 "tfm_platform": ["mps2/an519", "mps3/an524",
450 "mps2/an539", "mps2/sse-200_aws"],
451 "toolchain_file": ["toolchain_ARMCLANG.cmake",
452 "toolchain_GNUARM.cmake"],
453 "psa_api": [True, False],
454 "isolation_level": ["1", "2"],
455 "test_regression": [True, False],
456 "test_psa_api": ["OFF"],
457 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
458 "with_otp": [False],
459 "with_bl2": [True, False],
460 "with_ns": [True, False],
461 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800462 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800463 },
464 "common_params": _common_tfm_builder_cfg,
465 "invalid": _common_tfm_invalid_configs + [
466 ("mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800467 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800468 ]
469 }
Karl Zhangaff558a2020-05-15 14:28:23 +0100470
Karl Zhang14573bc2020-06-08 09:23:21 +0800471config_tfm_profile = {"seed_params": {
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800472 "tfm_platform": ["mps2/an519", "mps2/an521",
473 "musca_b1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800474 "toolchain_file": ["toolchain_ARMCLANG.cmake",
475 "toolchain_GNUARM.cmake"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800476 "psa_api": [True, False],
477 "isolation_level": ["1", "2"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800478 "test_regression": [True, False],
479 "test_psa_api": ["OFF"],
480 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
481 "with_otp": [False],
482 "with_bl2": [True, False],
483 "with_ns": [True, False],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800484 "profile": ["profile_small", "profile_medium"],
485 "partition_ps": ["ON", "OFF"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800486 },
487 "common_params": _common_tfm_builder_cfg,
488 "invalid": _common_tfm_invalid_configs + [
489 ("mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800490 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800491 ]
492 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800493
Karl Zhangaff558a2020-05-15 14:28:23 +0100494config_tfm_test_OTP = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800495 "tfm_platform": ["musca_b1"],
496 "toolchain_file": ["toolchain_ARMCLANG.cmake",
497 "toolchain_GNUARM.cmake"],
498 "psa_api": [True, False],
499 "isolation_level": ["1", "2"],
500 "test_regression": [True, False],
501 "test_psa_api": ["OFF"],
502 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
503 "with_otp": [True],
504 "with_bl2": [True],
505 "with_ns": [True, False],
506 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800507 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800508 },
509 "common_params": _common_tfm_builder_cfg,
510 "invalid": _common_tfm_invalid_configs + []
511 }
Karl Zhangaff558a2020-05-15 14:28:23 +0100512
Minos Galanakisea421232019-06-20 17:11:28 +0100513config_MUSCA_A = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800514 "tfm_platform": ["musca_a"],
515 "toolchain_file": ["toolchain_ARMCLANG.cmake",
516 "toolchain_GNUARM.cmake"],
517 "psa_api": [True, False],
518 "isolation_level": ["1", "2"],
519 "test_regression": [True, False],
520 "test_psa_api": ["OFF"],
521 "cmake_build_type": ["Debug", "Release"],
522 "with_otp": [False],
523 "with_bl2": [True],
524 "with_ns": [True, False],
525 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800526 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800527 },
528 "common_params": _common_tfm_builder_cfg,
529 "invalid": _common_tfm_invalid_configs + []
530 }
Minos Galanakisea421232019-06-20 17:11:28 +0100531
532config_MUSCA_B1 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800533 "tfm_platform": ["musca_b1"],
534 "toolchain_file": ["toolchain_ARMCLANG.cmake",
535 "toolchain_GNUARM.cmake"],
536 "psa_api": [True, False],
537 "isolation_level": ["1", "2"],
538 "test_regression": [True, False],
539 "test_psa_api": ["OFF"],
540 "cmake_build_type": ["Debug", "Release"],
541 "with_otp": [False],
542 "with_bl2": [True],
543 "with_ns": [True, False],
544 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800545 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800546 },
547 "common_params": _common_tfm_builder_cfg,
548 "invalid": _common_tfm_invalid_configs + []
549 }
Minos Galanakisea421232019-06-20 17:11:28 +0100550
Karl Zhangeffed972020-06-30 15:48:01 +0800551config_MUSCA_S1 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800552 "tfm_platform": ["musca_s1"],
553 "toolchain_file": ["toolchain_ARMCLANG.cmake",
554 "toolchain_GNUARM.cmake"],
555 "psa_api": [True, False],
556 "isolation_level": ["1", "2"],
557 "test_regression": [True, False],
558 "test_psa_api": ["OFF"],
559 "cmake_build_type": ["Debug", "Release"],
560 "with_otp": [False],
561 "with_bl2": [True],
562 "with_ns": [True, False],
563 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800564 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800565 },
566 "common_params": _common_tfm_builder_cfg,
567 "invalid": _common_tfm_invalid_configs + []
568 }
Karl Zhangeffed972020-06-30 15:48:01 +0800569
Karl Zhangaff558a2020-05-15 14:28:23 +0100570config_release = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800571 "tfm_platform": ["mps2/an521", "mps2/an519",
572 "musca_a", "musca_b1", "musca_s1",
573 "mps3/an524", "mps2/an539"],
574 "toolchain_file": ["toolchain_ARMCLANG.cmake",
575 "toolchain_GNUARM.cmake"],
576 "psa_api": [True, False],
577 "isolation_level": ["1", "2"],
578 "test_regression": [True, False],
579 "test_psa_api": ["OFF"],
580 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
581 "with_otp": [False],
582 "with_bl2": [True, False],
583 "with_ns": [True, False],
584 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800585 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800586 },
587 "common_params": _common_tfm_builder_cfg,
588 "invalid": _common_tfm_invalid_configs + [
589 ("mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800590 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800591 ]
592 }
Karl Zhangaff558a2020-05-15 14:28:23 +0100593
594# Configure build manager to build several combinations
595config_AN521_PSA_API = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800596 "tfm_platform": ["mps2/an521", "mps2/an519",
597 "musca_b1"],
598 "toolchain_file": ["toolchain_GNUARM.cmake",
599 "toolchain_ARMCLANG.cmake"],
600 "psa_api": [True, False],
601 "isolation_level": ["1", "2"],
602 "test_regression": [False],
603 "test_psa_api": ["IPC",
604 "CRYPTO",
605 "PROTECTED_STORAGE",
606 "INITIAL_ATTESTATION",
607 "INTERNAL_TRUSTED_STORAGE"],
608 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
609 "with_otp": [False],
610 "with_bl2": [True],
611 "with_ns": [True, False],
612 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800613 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100614 },
615 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800616 "invalid": _common_tfm_invalid_configs + [
617 ("mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800618 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800619 ]
Karl Zhangaff558a2020-05-15 14:28:23 +0100620 }
621
Karl Zhangaff558a2020-05-15 14:28:23 +0100622config_AN521_PSA_IPC = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800623 "tfm_platform": ["mps2/an521", "mps2/an519",
624 "musca_b1"],
625 "toolchain_file": ["toolchain_GNUARM.cmake",
626 "toolchain_ARMCLANG.cmake"],
627 "psa_api": [True],
628 "isolation_level": ["1", "2"],
629 "test_regression": [False],
630 "test_psa_api": ["IPC"],
631 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
632 "with_otp": [True],
633 "with_bl2": [True],
634 "with_ns": [True, False],
635 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800636 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100637 },
638 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800639 "invalid": _common_tfm_invalid_configs + [
640 ("mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800641 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800642 ]
Karl Zhangaff558a2020-05-15 14:28:23 +0100643 }
644
Karl Zhang14573bc2020-06-08 09:23:21 +0800645config_nightly = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800646 "tfm_platform": ["mps2/an521", "mps2/an519",
647 "musca_a", "musca_b1", "musca_s1",
648 "mps3/an524", "mps2/an539",
649 "mps2/sse-200_aws", "cypress/psoc64"],
650 "toolchain_file": ["toolchain_GNUARM.cmake",
651 "toolchain_ARMCLANG.cmake"],
652 "psa_api": [True, False],
653 "isolation_level": ["1", "2"],
654 "test_regression": [True, False],
655 "test_psa_api": ["OFF"],
656 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
657 "with_otp": [False],
658 "with_bl2": [True, False],
659 "with_ns": [True, False],
660 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800661 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800662 },
663 "common_params": _common_tfm_builder_cfg,
664 "invalid": _common_tfm_invalid_configs + [
665 ("mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800666 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800667 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800668 "*", "*", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800669 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800670 "*", "*", "*", "*", True, True, "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800671 ]
672 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800673
Karl Zhang14573bc2020-06-08 09:23:21 +0800674config_nightly_profile = {"seed_params": {
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800675 "tfm_platform": ["mps2/an519", "mps2/an521",
676 "musca_b1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800677 "toolchain_file": ["toolchain_ARMCLANG.cmake",
678 "toolchain_GNUARM.cmake"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800679 "psa_api": [True, False],
680 "isolation_level": ["1", "2"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800681 "test_regression": [True, False],
682 "test_psa_api": ["OFF"],
683 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
684 "with_otp": [False],
685 "with_bl2": [True, False],
686 "with_ns": [True, False],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800687 "profile": ["profile_small", "profile_medium"],
688 "partition_ps": ["ON", "OFF"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800689 },
690 "common_params": _common_tfm_builder_cfg,
691 "invalid": _common_tfm_invalid_configs + [
692 ("mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800693 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800694 ]
695 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800696
Karl Zhang14573bc2020-06-08 09:23:21 +0800697config_nightly_PSA_API = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800698 "tfm_platform": ["mps2/an521"],
699 "toolchain_file": ["toolchain_GNUARM.cmake",
700 "toolchain_ARMCLANG.cmake"],
701 "psa_api": [True, False],
702 "isolation_level": ["1", "2"],
703 "test_regression": [False],
704 "test_psa_api": ["CRYPTO",
705 "PROTECTED_STORAGE",
706 "INITIAL_ATTESTATION",
707 "INTERNAL_TRUSTED_STORAGE"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800708 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800709 "with_otp": [False],
710 "with_bl2": [True],
711 "with_ns": [True, False],
712 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800713 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800714 },
715 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800716 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800717 }
718
Karl Zhang14573bc2020-06-08 09:23:21 +0800719config_nightly_PSA_FF = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800720 "tfm_platform": ["mps2/an521"],
721 "toolchain_file": ["toolchain_GNUARM.cmake",
722 "toolchain_ARMCLANG.cmake"],
723 "psa_api": [True],
724 "isolation_level": ["1", "2"],
725 "test_regression": [False],
726 "test_psa_api": ["IPC"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800727 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800728 "with_otp": [False],
729 "with_bl2": [True],
730 "with_ns": [True, False],
731 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800732 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800733 },
734 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800735 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800736 }
737
Karl Zhang14573bc2020-06-08 09:23:21 +0800738config_nightly_OTP = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800739 "tfm_platform": ["musca_b1"],
740 "toolchain_file": ["toolchain_GNUARM.cmake",
741 "toolchain_ARMCLANG.cmake"],
742 "psa_api": [True, False],
743 "isolation_level": ["1", "2"],
744 "test_regression": [True],
745 "test_psa_api": ["OFF"],
746 "cmake_build_type": ["Debug", "Release"],
747 "with_otp": [True],
748 "with_bl2": [True],
749 "with_ns": [True, False],
750 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800751 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800752 },
753 "common_params": _common_tfm_builder_cfg,
754 "invalid": _common_tfm_invalid_configs + []
755 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800756
Karl Zhang14573bc2020-06-08 09:23:21 +0800757config_pp_test = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800758 "tfm_platform": ["mps2/an521", "mps2/an519",
759 "musca_b1"],
760 "toolchain_file": ["toolchain_GNUARM.cmake",
761 "toolchain_ARMCLANG.cmake"],
762 "psa_api": [True, False],
763 "isolation_level": ["1", "2"],
764 "test_regression": [True],
765 "test_psa_api": ["OFF"],
766 "cmake_build_type": ["Release"],
767 "with_otp": [False],
768 "with_bl2": [True],
769 "with_ns": [True, False],
770 "profile": ["", "profile_small"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800771 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800772 },
773 "common_params": _common_tfm_builder_cfg,
774 "invalid": _common_tfm_invalid_configs + [
775 ("musca_b1", "*", "*", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800776 "*", "*", "*", "*", "profile_small", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800777 ("*", "*", True, "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800778 "*", "*", "*", "*", "profile_small", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800779 ("*", "*", "*", "2", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800780 "*", "*", "*", "*", "profile_small", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800781 ]
782 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800783
Karl Zhang14573bc2020-06-08 09:23:21 +0800784config_pp_OTP = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800785 "tfm_platform": ["musca_b1"],
786 "toolchain_file": ["toolchain_GNUARM.cmake"],
787 "psa_api": [True, False],
788 "isolation_level": ["1", "2"],
789 "test_regression": [True],
790 "test_psa_api": ["OFF"],
791 "cmake_build_type": ["Release"],
792 "with_otp": [True],
793 "with_bl2": [True],
794 "with_ns": [True, False],
795 "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
802# Configure build manager to build several combinations
803config_pp_PSA_API = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800804 "tfm_platform": ["mps2/an521"],
805 "toolchain_file": ["toolchain_GNUARM.cmake"],
806 "psa_api": [True],
807 "isolation_level": ["2"],
808 "test_regression": [False],
809 "test_psa_api": ["IPC",
810 "CRYPTO",
811 "PROTECTED_STORAGE",
812 "INITIAL_ATTESTATION",
813 "INTERNAL_TRUSTED_STORAGE"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800814 "cmake_build_type": ["Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800815 "with_otp": [False],
816 "with_bl2": [True],
817 "with_ns": [True, False],
818 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800819 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800820 },
821 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800822 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800823 }
824
Karl Zhang14573bc2020-06-08 09:23:21 +0800825config_pp_PSoC64 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800826 "tfm_platform": ["cypress/psoc64"],
827 "toolchain_file": ["toolchain_GNUARM.cmake"],
828 "psa_api": [True],
829 "isolation_level": ["1", "2"],
830 "test_regression": [True],
831 "test_psa_api": ["OFF"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800832 "cmake_build_type": ["Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800833 "with_otp": [False],
834 "with_bl2": [False],
835 "with_ns": [True, False],
836 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800837 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800838 },
839 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800840 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800841 }
842
Minos Galanakisea421232019-06-20 17:11:28 +0100843# Configruation used for document building
844config_doxygen = {"common_params": {
845 "config_type": "tf-m_documents",
846 "codebase_root_dir": "tf-m",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800847 "build_cmds": {"all": ["-DTFM_PLATFORM=mps2/an521 "
848 "-DCMAKE_TOOLCHAIN_FILE=%(_tfm_code_dir_)s/toolchain_GNUARM.cmake"
Minos Galanakisea421232019-06-20 17:11:28 +0100849 "-DCMAKE_BUILD_TYPE=Debug "
Minos Galanakisea421232019-06-20 17:11:28 +0100850 "%(_tbm_code_dir_)s/",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800851 "cmake --build ./ -- docs"]},
852 "artifact_capture_rex": r'%(_tbm_build_dir_)s/docs/'
853 r'reference_manual/(?:latex|html)'
Minos Galanakisea421232019-06-20 17:11:28 +0100854 r'/(\w+\.(?:html|md|pdf))$',
855 },
Xinyu Zhangb708f572020-09-15 11:43:46 +0800856 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +0100857 }
858
Karl Zhangaff558a2020-05-15 14:28:23 +0100859# Configuration used in testing
Minos Galanakisea421232019-06-20 17:11:28 +0100860config_debug = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800861 "tfm_platform": ["mps2/an521"],
862 "toolchain_file": ["toolchain_ARMCLANG.cmake"],
863 "psa_api": [False],
864 "isolation_level": ["1"],
865 "test_regression": [False],
866 "test_psa_api": ["OFF"],
Minos Galanakisea421232019-06-20 17:11:28 +0100867 "cmake_build_type": ["Debug"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800868 "with_otp": [False],
869 "with_bl2": [True],
870 "with_ns": [True],
871 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800872 "partition_ps": ["ON"],
Minos Galanakisea421232019-06-20 17:11:28 +0100873 },
874 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800875 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +0100876 }
877
Dean Birch4c6ad622020-03-13 11:28:03 +0000878# Configuration used in CI
Xinyu Zhangb708f572020-09-15 11:43:46 +0800879config_ci = {"seed_params": {
880 "tfm_platform": ["mps2/an521"],
881 "toolchain_file": ["toolchain_ARMCLANG.cmake",
882 "toolchain_GNUARM.cmake"],
883 "psa_api": [True, False],
884 "isolation_level": ["1", "2"],
885 "test_regression": [True, False],
886 "test_psa_api": ["OFF"],
887 "cmake_build_type": ["Release"],
888 "with_otp": [False],
889 "with_bl2": [True, False],
890 "with_ns": [True],
891 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800892 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800893 },
894 "common_params": _common_tfm_builder_cfg,
895 "invalid": _common_tfm_invalid_configs + [
896 ("*", "toolchain_ARMCLANG.cmake", True, "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800897 "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800898 ("*", "toolchain_ARMCLANG.cmake", False, "1", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800899 "*", "*", False, "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800900 ]
901 }
Matthew Hartfb6fd362020-03-04 21:03:59 +0000902
Dean Birchd6ce2c82020-05-13 13:16:15 +0100903# Configuration used in CI if armclang not available
Xinyu Zhangb708f572020-09-15 11:43:46 +0800904config_ci_gnuarm = {"seed_params": {
905 "tfm_platform": ["mps2/an521"],
906 "toolchain_file": ["toolchain_ARMCLANG.cmake",
907 "toolchain_GNUARM.cmake"],
908 "psa_api": [True, False],
909 "isolation_level": ["1", "2"],
910 "test_regression": [True, False],
911 "test_psa_api": ["OFF"],
912 "cmake_build_type": ["Release"],
913 "with_otp": [False],
914 "with_bl2": [True, False],
915 "with_ns": [True],
916 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800917 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800918 },
919 "common_params": _common_tfm_builder_cfg,
920 "invalid": _common_tfm_invalid_configs + [
921 ("*", "toolchain_ARMCLANG.cmake", True, "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800922 "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800923 ("*", "toolchain_ARMCLANG.cmake", False, "1", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800924 "*", "*", "False", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800925 ("*", "toolchain_ARMCLANG.cmake", "*", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800926 "*", "*", "*", "*", "*", "*") # Disable ARMCLANG for now
Xinyu Zhangb708f572020-09-15 11:43:46 +0800927 ]
928 }
Dean Birchd6ce2c82020-05-13 13:16:15 +0100929
Xinyu Zhangb708f572020-09-15 11:43:46 +0800930config_lava_debug = {"seed_params": {
931 "tfm_platform": ["mps2/an521", "mps2/an519"],
932 "toolchain_file": ["toolchain_GNUARM.cmake"],
933 "psa_api": [True, False],
934 "isolation_level": ["1", "2"],
935 "test_regression": [True],
936 "test_psa_api": ["OFF"],
937 "cmake_build_type": ["Release"],
938 "with_otp": [False],
939 "with_bl2": [True, False],
940 "with_ns": [True, False],
941 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800942 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800943 },
944 "common_params": _common_tfm_builder_cfg,
945 "invalid": _common_tfm_invalid_configs + [
946 ("mps2/an521", "toolchain_GNUARM.cmake", True, "2", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800947 "*", "*", True, "*", "*", "*")
Xinyu Zhangb708f572020-09-15 11:43:46 +0800948 ]
949 }
Dean Birch4c6ad622020-03-13 11:28:03 +0000950
Karl Zhangeea16ed2020-06-15 15:03:12 +0800951#GNU groups for external CI only
952# Configure build manager to build the maximum number of configurations
953config_tfm_test_gnu = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800954 "tfm_platform": ["mps2/an521", "musca_a",
955 "musca_b1", "musca_s1"],
956 "toolchain_file": ["toolchain_GNUARM.cmake"],
957 "psa_api": [True, False],
958 "isolation_level": ["1", "2"],
959 "test_regression": [True, False],
960 "test_psa_api": ["OFF"],
961 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
962 "with_otp": [False],
963 "with_bl2": [True, False],
964 "with_ns": [True, False],
965 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800966 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800967 },
968 "common_params": _common_tfm_builder_cfg,
969 "invalid": _common_tfm_invalid_configs + [
970 ("musca_a", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800971 "*", "*", "*", "*", "*", False, "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800972 ("musca_b1", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800973 "*", "*", "*", "*", "*", False, "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800974 ("musca_s1", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800975 "*", "*", "*", "*", "*", False, "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800976 ]
977 }
Karl Zhangeea16ed2020-06-15 15:03:12 +0800978
979# Configure build manager to build the maximum number of configurations
980config_tfm_test2_gnu = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800981 "tfm_platform": ["mps2/an519", "mps3/an524",
982 "mps2/an539", "mps2/sse-200_aws"],
983 "toolchain_file": ["toolchain_GNUARM.cmake"],
984 "psa_api": [True, False],
985 "isolation_level": ["1", "2"],
986 "test_regression": [True, False],
987 "test_psa_api": ["OFF"],
988 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
989 "with_otp": [False],
990 "with_bl2": [True, False],
991 "with_ns": [True, False],
992 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800993 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800994 },
995 "common_params": _common_tfm_builder_cfg,
996 "invalid": _common_tfm_invalid_configs + [
997 ("mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800998 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800999 ]
1000 }
Karl Zhangeea16ed2020-06-15 15:03:12 +08001001
1002# Configure build manager to build the maximum number of configurations
1003config_tfm_profile_gnu = {"seed_params": {
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001004 "tfm_platform": ["mps2/an519", "mps2/an521",
1005 "musca_b1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001006 "toolchain_file": ["toolchain_GNUARM.cmake"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001007 "psa_api": [True, False],
1008 "isolation_level": ["1", "2"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001009 "test_regression": [True, False],
1010 "test_psa_api": ["OFF"],
1011 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
1012 "with_otp": [False],
1013 "with_bl2": [True, False],
1014 "with_ns": [True, False],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001015 "profile": ["profile_small", "profile_medium"],
1016 "partition_ps": ["ON", "OFF"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001017 },
1018 "common_params": _common_tfm_builder_cfg,
1019 "invalid": _common_tfm_invalid_configs + [
1020 ("mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001021 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +08001022 ]
1023 }
Karl Zhangeea16ed2020-06-15 15:03:12 +08001024
1025# Configure build manager to build the maximum number of configurations
1026config_tfm_test_OTP_gnu = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +08001027 "tfm_platform": ["musca_b1"],
1028 "toolchain_file": ["toolchain_GNUARM.cmake"],
1029 "psa_api": [True, False],
1030 "isolation_level": ["1", "2"],
1031 "test_regression": [True, False],
1032 "test_psa_api": ["OFF"],
1033 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
1034 "with_otp": [True],
1035 "with_bl2": [True],
1036 "with_ns": [True, False],
1037 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001038 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001039 },
1040 "common_params": _common_tfm_builder_cfg,
1041 "invalid": _common_tfm_invalid_configs + []
1042 }
Karl Zhangeea16ed2020-06-15 15:03:12 +08001043
1044# Configure build manager to build several combinations
1045config_PSA_API_gnu = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +08001046 "tfm_platform": ["mps2/an521", "musca_b1"],
1047 "toolchain_file": ["toolchain_GNUARM.cmake"],
1048 "psa_api": [True, False],
1049 "isolation_level": ["1", "2"],
1050 "test_regression": [False],
1051 "test_psa_api": ["CRYPTO",
1052 "PROTECTED_STORAGE",
1053 "INITIAL_ATTESTATION",
1054 "INTERNAL_TRUSTED_STORAGE"],
Karl Zhangeea16ed2020-06-15 15:03:12 +08001055 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001056 "with_otp": [False],
1057 "with_bl2": [True],
1058 "with_ns": [True, False],
1059 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001060 "partition_ps": ["ON"],
Karl Zhangeea16ed2020-06-15 15:03:12 +08001061 },
1062 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +08001063 "invalid": _common_tfm_invalid_configs + []
Karl Zhangeea16ed2020-06-15 15:03:12 +08001064 }
1065
1066# Configure build manager to build several combinations
1067config_PSA_FF_gnu = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +08001068 "tfm_platform": ["mps2/an521", "musca_b1"],
1069 "toolchain_file": ["toolchain_GNUARM.cmake"],
1070 "psa_api": [True],
1071 "isolation_level": ["1", "2"],
1072 "test_regression": [False],
1073 "test_psa_api": ["IPC"],
Karl Zhangeea16ed2020-06-15 15:03:12 +08001074 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001075 "with_otp": [False],
1076 "with_bl2": [True],
1077 "with_ns": [True, False],
1078 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001079 "partition_ps": ["ON"],
Karl Zhangeea16ed2020-06-15 15:03:12 +08001080 },
1081 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +08001082 "invalid": _common_tfm_invalid_configs + []
Karl Zhangeea16ed2020-06-15 15:03:12 +08001083 }
1084
1085# Configure build manager to build several combinations
1086config_PSA_API_OTP_gnu = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +08001087 "tfm_platform": ["musca_b1"],
1088 "toolchain_file": ["toolchain_GNUARM.cmake"],
1089 "psa_api": [True, False],
1090 "isolation_level": ["1", "2"],
1091 "test_regression": [False],
1092 "test_psa_api": ["CRYPTO",
1093 "PROTECTED_STORAGE",
1094 "INITIAL_ATTESTATION",
1095 "INTERNAL_TRUSTED_STORAGE"],
1096 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
1097 "with_otp": [True],
1098 "with_bl2": [True],
1099 "with_ns": [True, False],
1100 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001101 "partition_ps": ["ON"],
Karl Zhangeea16ed2020-06-15 15:03:12 +08001102 },
1103 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +08001104 "invalid": _common_tfm_invalid_configs + []
Karl Zhangeea16ed2020-06-15 15:03:12 +08001105 }
1106
1107# Configure build manager to build several combinations
1108config_PSA_FF_OTP_gnu = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +08001109 "tfm_platform": ["musca_b1"],
1110 "toolchain_file": ["toolchain_GNUARM.cmake"],
1111 "psa_api": [True],
1112 "isolation_level": ["1", "2"],
1113 "test_regression": [False],
1114 "test_psa_api": ["IPC"],
Karl Zhangeea16ed2020-06-15 15:03:12 +08001115 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001116 "with_otp": [True],
1117 "with_bl2": [True],
1118 "with_ns": [True, False],
1119 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001120 "partition_ps": ["ON"],
Karl Zhangeea16ed2020-06-15 15:03:12 +08001121 },
1122 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +08001123 "invalid": _common_tfm_invalid_configs + []
Karl Zhangeea16ed2020-06-15 15:03:12 +08001124 }
1125
1126# Configure build manager to build several combinations
1127config_PSOC64_gnu = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +08001128 "tfm_platform": ["cypress/psoc64"],
1129 "toolchain_file": ["toolchain_GNUARM.cmake"],
1130 "psa_api": [True],
1131 "isolation_level": ["1", "2"],
1132 "test_regression": [True],
1133 "test_psa_api": ["OFF"],
Karl Zhangeea16ed2020-06-15 15:03:12 +08001134 "cmake_build_type": ["Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001135 "with_otp": [False],
1136 "with_bl2": [False],
1137 "with_ns": [True, False],
1138 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001139 "partition_ps": ["ON"],
Karl Zhangeea16ed2020-06-15 15:03:12 +08001140 },
1141 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +08001142 "invalid": _common_tfm_invalid_configs + []
Karl Zhangeea16ed2020-06-15 15:03:12 +08001143 }
1144
1145# Configure build manager to build the maximum number of configurations
1146config_nightly_gnu = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +08001147 "tfm_platform": ["mps2/an521", "mps2/an519",
1148 "musca_a", "musca_b1", "musca_s1",
1149 "mps3/an524", "mps2/an539",
1150 "mps2/sse-200_aws", "cypress/psoc64"],
1151 "toolchain_file": ["toolchain_GNUARM.cmake"],
1152 "psa_api": [True, False],
1153 "isolation_level": ["1", "2"],
1154 "test_regression": [True, False],
1155 "test_psa_api": ["OFF"],
1156 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
1157 "with_otp": [False],
1158 "with_bl2": [True, False],
1159 "with_ns": [True, False],
1160 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001161 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001162 },
1163 "common_params": _common_tfm_builder_cfg,
1164 "invalid": _common_tfm_invalid_configs + [
1165 ("mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001166 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +08001167 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001168 "*", "*", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +08001169 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001170 "*", "*", "*", "*", True, True, "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +08001171 ]
1172 }
Karl Zhangeea16ed2020-06-15 15:03:12 +08001173
1174# Configure build manager to build the maximum number of configurations
1175config_nightly_profile_gnu = {"seed_params": {
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001176 "tfm_platform": ["mps2/an519", "mps2/an521",
1177 "musca_b1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001178 "toolchain_file": ["toolchain_GNUARM.cmake"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001179 "psa_api": [True, False],
1180 "isolation_level": ["1", "2"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001181 "test_regression": [True, False],
1182 "test_psa_api": ["OFF"],
1183 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
1184 "with_otp": [False],
1185 "with_bl2": [True, False],
1186 "with_ns": [True, False],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001187 "profile": ["profile_small", "profile_medium"],
1188 "partition_ps": ["ON", "OFF"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001189 },
1190 "common_params": _common_tfm_builder_cfg,
1191 "invalid": _common_tfm_invalid_configs + [
1192 ("mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001193 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +08001194 ]
1195 }
Karl Zhangeea16ed2020-06-15 15:03:12 +08001196
1197# Configure build manager to build several combinations
1198config_nightly_PSA_API_gnu = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +08001199 "tfm_platform": ["mps2/an521"],
1200 "toolchain_file": ["toolchain_GNUARM.cmake"],
1201 "psa_api": [True, False],
1202 "isolation_level": ["1", "2"],
1203 "test_regression": [False],
1204 "test_psa_api": ["CRYPTO",
1205 "PROTECTED_STORAGE",
1206 "INITIAL_ATTESTATION",
1207 "INTERNAL_TRUSTED_STORAGE"],
Karl Zhangeea16ed2020-06-15 15:03:12 +08001208 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001209 "with_otp": [False],
1210 "with_bl2": [True],
1211 "with_ns": [True, False],
1212 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001213 "partition_ps": ["ON"],
Karl Zhangeea16ed2020-06-15 15:03:12 +08001214 },
1215 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +08001216 "invalid": _common_tfm_invalid_configs + []
Karl Zhangeea16ed2020-06-15 15:03:12 +08001217 }
1218
1219# Configure build manager to build several combinations
1220config_nightly_PSA_FF_gnu = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +08001221 "tfm_platform": ["mps2/an521"],
1222 "toolchain_file": ["toolchain_GNUARM.cmake"],
1223 "psa_api": [True],
1224 "isolation_level": ["1", "2"],
1225 "test_regression": [False],
1226 "test_psa_api": ["IPC"],
Karl Zhangeea16ed2020-06-15 15:03:12 +08001227 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001228 "with_otp": [False],
1229 "with_bl2": [True],
1230 "with_ns": [True, False],
1231 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001232 "partition_ps": ["ON"],
Karl Zhangeea16ed2020-06-15 15:03:12 +08001233 },
1234 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +08001235 "invalid": _common_tfm_invalid_configs + []
Karl Zhangeea16ed2020-06-15 15:03:12 +08001236 }
1237
1238# Configure build manager to build the maximum number of configurations
1239config_nightly_OTP_gnu = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +08001240 "tfm_platform": ["musca_b1"],
1241 "toolchain_file": ["toolchain_GNUARM.cmake"],
1242 "psa_api": [True, False],
1243 "isolation_level": ["1", "2"],
1244 "test_regression": [True],
1245 "test_psa_api": ["OFF"],
1246 "cmake_build_type": ["Debug", "Release"],
1247 "with_otp": [True],
1248 "with_bl2": [True],
1249 "with_ns": [True, False],
1250 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001251 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001252 },
1253 "common_params": _common_tfm_builder_cfg,
1254 "invalid": _common_tfm_invalid_configs + []
1255 }
Karl Zhangeea16ed2020-06-15 15:03:12 +08001256
1257# Configure build manager to build the maximum number of configurations
1258config_pp_test_gnu = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +08001259 "tfm_platform": ["mps2/an521", "mps2/an519",
1260 "musca_b1"],
Xinyu Zhangf1025b72020-09-28 17:10:57 +08001261 "toolchain_file": ["toolchain_GNUARM.cmake"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001262 "psa_api": [True, False],
1263 "isolation_level": ["1", "2"],
1264 "test_regression": [True],
1265 "test_psa_api": ["OFF"],
1266 "cmake_build_type": ["Release"],
1267 "with_otp": [False],
1268 "with_bl2": [True],
1269 "with_ns": [True, False],
1270 "profile": ["", "profile_small"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001271 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001272 },
1273 "common_params": _common_tfm_builder_cfg,
1274 "invalid": _common_tfm_invalid_configs + [
1275 ("musca_b1", "*", "*", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001276 "*", "*", "*", "*", "profile_small", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +08001277 ("*", "*", True, "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001278 "*", "*", "*", "*", "profile_small", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +08001279 ("*", "*", "*", "2", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001280 "*", "*", "*", "*", "profile_small", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +08001281 ]
1282 }
Karl Zhangeea16ed2020-06-15 15:03:12 +08001283
1284# Configure build manager to build the maximum number of configurations
1285config_pp_OTP_gnu = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +08001286 "tfm_platform": ["musca_b1"],
1287 "toolchain_file": ["toolchain_GNUARM.cmake"],
1288 "psa_api": [True, False],
1289 "isolation_level": ["1", "2"],
1290 "test_regression": [True],
1291 "test_psa_api": ["OFF"],
1292 "cmake_build_type": ["Release"],
1293 "with_otp": [True],
1294 "with_bl2": [True],
1295 "with_ns": [True, False],
1296 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001297 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001298 },
1299 "common_params": _common_tfm_builder_cfg,
1300 "invalid": _common_tfm_invalid_configs + []
1301 }
Karl Zhangeea16ed2020-06-15 15:03:12 +08001302
1303# Configure build manager to build several combinations
1304config_pp_PSA_API_gnu = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +08001305 "tfm_platform": ["mps2/an521"],
1306 "toolchain_file": ["toolchain_GNUARM.cmake"],
1307 "psa_api": [True],
1308 "isolation_level": ["2"],
1309 "test_regression": [False],
1310 "test_psa_api": ["IPC",
1311 "CRYPTO",
1312 "PROTECTED_STORAGE",
1313 "INITIAL_ATTESTATION",
1314 "INTERNAL_TRUSTED_STORAGE"],
Karl Zhangeea16ed2020-06-15 15:03:12 +08001315 "cmake_build_type": ["Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001316 "with_otp": [False],
1317 "with_bl2": [True],
1318 "with_ns": [True, False],
1319 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001320 "partition_ps": ["ON"],
Karl Zhangeea16ed2020-06-15 15:03:12 +08001321 },
1322 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +08001323 "invalid": _common_tfm_invalid_configs + []
Karl Zhangeea16ed2020-06-15 15:03:12 +08001324 }
1325
1326# Configure build manager to build several combinations
1327config_pp_PSoC64_gnu = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +08001328 "tfm_platform": ["cypress/psoc64"],
1329 "toolchain_file": ["toolchain_GNUARM.cmake"],
1330 "psa_api": [True],
1331 "isolation_level": ["1", "2"],
1332 "test_regression": [True],
1333 "test_psa_api": ["OFF"],
Karl Zhangeea16ed2020-06-15 15:03:12 +08001334 "cmake_build_type": ["Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001335 "with_otp": [False],
1336 "with_bl2": [False],
1337 "with_ns": [True, False],
1338 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001339 "partition_ps": ["ON"],
Karl Zhangeea16ed2020-06-15 15:03:12 +08001340 },
1341 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +08001342 "invalid": _common_tfm_invalid_configs + []
Karl Zhangeea16ed2020-06-15 15:03:12 +08001343 }
1344
Karl Zhangaff558a2020-05-15 14:28:23 +01001345_builtin_configs = {
Karl Zhang14573bc2020-06-08 09:23:21 +08001346 #release test group
Karl Zhangaff558a2020-05-15 14:28:23 +01001347 "tfm_test": config_tfm_test,
1348 "tfm_test2": config_tfm_test2,
Karl Zhang14573bc2020-06-08 09:23:21 +08001349 "tfm_profile": config_tfm_profile,
Karl Zhangaff558a2020-05-15 14:28:23 +01001350 "tfm_test_otp": config_tfm_test_OTP,
1351 "psa_api": config_PSA_API,
1352 "psa_api_otp": config_PSA_API_OTP,
1353 "psa_ff": config_PSA_FF,
1354 "psa_ff_otp": config_PSA_FF_OTP,
Karl Zhang14573bc2020-06-08 09:23:21 +08001355 "tfm_psoc64": config_PSOC64,
1356
1357 #nightly test group
1358 "nightly_test": config_nightly,
1359 "nightly_profile": config_nightly_profile,
1360 "nightly_psa_api": config_nightly_PSA_API,
1361 "nightly_ff": config_nightly_PSA_FF,
1362 "nightly_otp": config_nightly_OTP,
1363
1364 #per patch test group
1365 "pp_test": config_pp_test,
1366 "pp_OTP": config_pp_OTP,
1367 "pp_PSA_API": config_pp_PSA_API,
1368 "pp_psoc64": config_pp_PSoC64,
1369
Karl Zhangeea16ed2020-06-15 15:03:12 +08001370 #GNU only configs against groups above
1371 #The combinations should be the same except the CLANG ones
1372 #release test group (GNU)
1373 "tfm_test_gnu": config_tfm_test_gnu,
1374 "tfm_test2_gnu": config_tfm_test2_gnu,
1375 "tfm_profile_gnu": config_tfm_profile_gnu,
1376 "tfm_test_otp_gnu": config_tfm_test_OTP_gnu,
1377 "psa_api_gnu": config_PSA_API_gnu,
1378 "psa_api_otp_gnu": config_PSA_API_OTP_gnu,
1379 "psa_ff_gnu": config_PSA_FF_gnu,
1380 "psa_ff_otp_gnu": config_PSA_FF_OTP_gnu,
1381 "tfm_psoc64_gnu": config_PSOC64_gnu,
1382
1383 #nightly test group (GNU)
1384 "nightly_test_gnu": config_nightly_gnu,
1385 "nightly_profile_gnu": config_nightly_profile_gnu,
1386 "nightly_psa_api_gnu": config_nightly_PSA_API_gnu,
1387 "nightly_ff_gnu": config_nightly_PSA_FF_gnu,
1388 "nightly_otp_gnu": config_nightly_OTP_gnu,
1389
1390 #per patch test group (GNU)
1391 "pp_test_gnu": config_pp_test_gnu,
1392 "pp_OTP_gnu": config_pp_OTP_gnu,
1393 "pp_PSA_API_gnu": config_pp_PSA_API_gnu,
1394 "pp_psoc64_gnu": config_pp_PSoC64_gnu,
1395
1396
Karl Zhang14573bc2020-06-08 09:23:21 +08001397 #full test group in the old CI
Karl Zhangaff558a2020-05-15 14:28:23 +01001398 "full": config_full,
Karl Zhang14573bc2020-06-08 09:23:21 +08001399
1400 #specific test group
Karl Zhangaff558a2020-05-15 14:28:23 +01001401 "an539": config_AN539,
1402 "an524": config_AN524,
Minos Galanakisea421232019-06-20 17:11:28 +01001403 "an521": config_AN521,
Karl Zhang14573bc2020-06-08 09:23:21 +08001404 "an521_psa_api": config_AN521_PSA_API,
1405 "an521_psa_ipc": config_AN521_PSA_IPC,
Minos Galanakisea421232019-06-20 17:11:28 +01001406 "an519": config_AN519,
1407 "musca_a": config_MUSCA_A,
1408 "musca_b1": config_MUSCA_B1,
Karl Zhangeffed972020-06-30 15:48:01 +08001409 "musca_s1": config_MUSCA_S1,
Karl Zhang96dfe2d2020-05-11 11:31:40 +08001410 "psoc64": config_PSOC64,
Minos Galanakisea421232019-06-20 17:11:28 +01001411 "ipc": config_IPC,
1412 "doxygen": config_doxygen,
Dean Birch4c6ad622020-03-13 11:28:03 +00001413 "debug": config_debug,
Karl Zhangaff558a2020-05-15 14:28:23 +01001414 "release": config_release,
Matthew Hartfb6fd362020-03-04 21:03:59 +00001415 "debug": config_debug,
Karl Zhang14573bc2020-06-08 09:23:21 +08001416
1417 #DevOps team test group
1418 "full_gnuarm": config_full_gnuarm,
Matthew Hartfb6fd362020-03-04 21:03:59 +00001419 "lava_debug": config_lava_debug,
Dean Birchd6ce2c82020-05-13 13:16:15 +01001420 "ci": config_ci,
1421 "ci_gnuarm": config_ci_gnuarm}
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001422
1423if __name__ == '__main__':
1424 import os
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001425
Minos Galanakisea421232019-06-20 17:11:28 +01001426 # Default behavior is to export refference config when called
1427 _dir = os.getcwd()
1428 from utils import save_json
1429 for _cname, _cfg in _builtin_configs.items():
1430 _fname = os.path.join(_dir, _cname + ".json")
1431 print("Exporting config %s" % _fname)
1432 save_json(_fname, _cfg)