blob: 8abfef33030ecf1e0c4c73e5794f3c68d1fde732 [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
33 "sort_order": ["target_platform",
34 "compiler",
35 "proj_config",
Karl Zhangaff558a2020-05-15 14:28:23 +010036 "psa_api_suit",
37 "with_OTP",
Minos Galanakisea421232019-06-20 17:11:28 +010038 "cmake_build_type",
39 "with_mcuboot"],
40
41 # Keys for the templace will come from the combinations of parameters
42 # provided in the seed dictionary.
43
44 "config_template": (
45 "cmake -G \"Unix Makefiles\" "
46 "-DPROJ_CONFIG=`"
47 "readlink -f %(codebase_root_dir)s/configs/%(proj_config)s.cmake` "
48 "-DTARGET_PLATFORM=%(target_platform)s "
49 "-DCOMPILER=%(compiler)s "
50 "-DCMAKE_BUILD_TYPE=%(cmake_build_type)s "
51 "-DBL2=%(with_mcuboot)s "
52 "%(codebase_root_dir)s"),
53
Karl Zhangaff558a2020-05-15 14:28:23 +010054 "config_template_psa_api": (
55 "cmake -G \"Unix Makefiles\" "
56 "-DPROJ_CONFIG=`"
57 "readlink -f %(codebase_root_dir)s/configs/%(proj_config)s.cmake` "
58 "-DTARGET_PLATFORM=%(target_platform)s "
59 "-DCOMPILER=%(compiler)s "
60 "-DCMAKE_BUILD_TYPE=%(cmake_build_type)s "
61#TODO: error when using this param
62# "-DPSA_API_TEST_BUILD_PATH=%(_tbm_build_dir_)s "
63 "%(codebase_root_dir)s"),
64
Minos Galanakisea421232019-06-20 17:11:28 +010065 # A small subset of string substitution params is allowed in commands.
66 # tfm_build_manager will replace %(_tbm_build_dir_)s, %(_tbm_code_dir_)s,
67 # _tbm_target_platform_ with the paths set when building
68
69 "artifact_capture_rex": (r'%(_tbm_build_dir_)s/install/outputs/'
70 r'(?:fvp|AN521|AN519|MUSCA_A|MUSCA_B1)'
71 r'/(\w+\.(?:axf|bin|hex))$'),
72
73 # ALL commands will be executed for every build.
74 # Other keys will append extra commands when matching target_platform
Karl Zhangaff558a2020-05-15 14:28:23 +010075 "build_cmds": {"all": ["cmake --build ./ -- install"],
Minos Galanakisea421232019-06-20 17:11:28 +010076 "MUSCA_A": [("srec_cat "
77 "%(_tbm_build_dir_)s/install/outputs/"
78 "%(_tbm_target_platform_)s/mcuboot.bin "
79 "-Binary -offset 0x200000 "
80 "%(_tbm_build_dir_)s/install/outputs/"
81 "%(_tbm_target_platform_)s/tfm_sign.bin "
82 "-Binary -offset 0x220000 -o "
83 "%(_tbm_build_dir_)s/install/outputs/"
84 "%(_tbm_target_platform_)s"
85 "/tfm.hex -Intel")],
86 "MUSCA_B1": [("srec_cat "
87 "%(_tbm_build_dir_)s/install/outputs/"
88 "%(_tbm_target_platform_)s/mcuboot.bin "
Minos Galanakise86f4482019-11-06 16:08:23 +000089 "-Binary -offset 0xA000000 "
Minos Galanakisea421232019-06-20 17:11:28 +010090 "%(_tbm_build_dir_)s/install/outputs/"
91 "%(_tbm_target_platform_)s/tfm_sign.bin "
Minos Galanakise86f4482019-11-06 16:08:23 +000092 "-Binary -offset 0xA020000 -o "
Minos Galanakisea421232019-06-20 17:11:28 +010093 "%(_tbm_build_dir_)s/install/outputs/"
94 "%(_tbm_target_platform_)s"
Karl Zhangeffed972020-06-30 15:48:01 +080095 "/tfm.hex -Intel")],
96 "MUSCA_S1": [("srec_cat "
97 "%(_tbm_build_dir_)s/install/outputs/"
98 "%(_tbm_target_platform_)s/mcuboot.bin "
99 "-Binary -offset 0xA000000 "
100 "%(_tbm_build_dir_)s/install/outputs/"
101 "%(_tbm_target_platform_)s/tfm_sign.bin "
102 "-Binary -offset 0xA020000 -o "
103 "%(_tbm_build_dir_)s/install/outputs/"
104 "%(_tbm_target_platform_)s"
Minos Galanakisea421232019-06-20 17:11:28 +0100105 "/tfm.hex -Intel")]
106 },
107
108 # (Optional) If set will fail if those artefacts are missing post build
109 "required_artefacts": {"all": [
110 "%(_tbm_build_dir_)s/install/outputs/"
111 "%(_tbm_target_platform_)s/tfm_s.bin",
112 "%(_tbm_build_dir_)s/install/outputs/"
113 "%(_tbm_target_platform_)s/tfm_ns.bin"],
114 "MUSCA_A": [
115 "%(_tbm_build_dir_)s/install/outputs/"
116 "%(_tbm_target_platform_)s/tfm.hex",
117 "%(_tbm_build_dir_)s/install/outputs/"
118 "%(_tbm_target_platform_)s/mcuboot.bin",
119 "%(_tbm_build_dir_)s/install/outputs/"
120 "%(_tbm_target_platform_)s/tfm_sign.bin"],
121 "MUSCA_B1": [
122 "%(_tbm_build_dir_)s/install/outputs/"
123 "%(_tbm_target_platform_)s/tfm.hex",
124 "%(_tbm_build_dir_)s/install/outputs/"
125 "%(_tbm_target_platform_)s/mcuboot.bin",
126 "%(_tbm_build_dir_)s/install/outputs/"
Karl Zhangeffed972020-06-30 15:48:01 +0800127 "%(_tbm_target_platform_)s/tfm_sign.bin"],
128 "MUSCA_S1": [
129 "%(_tbm_build_dir_)s/install/outputs/"
130 "%(_tbm_target_platform_)s/tfm.hex",
131 "%(_tbm_build_dir_)s/install/outputs/"
132 "%(_tbm_target_platform_)s/mcuboot.bin",
133 "%(_tbm_build_dir_)s/install/outputs/"
Minos Galanakisea421232019-06-20 17:11:28 +0100134 "%(_tbm_target_platform_)s/tfm_sign.bin"]
135 }
136}
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100137
138# Configure build manager to build several combinations
Karl Zhangaff558a2020-05-15 14:28:23 +0100139config_AN539 = {"seed_params": {
140 "target_platform": ["AN539"],
141 "compiler": ["ARMCLANG", "GNUARM"],
Minos Galanakisea421232019-06-20 17:11:28 +0100142 "proj_config": ["ConfigRegression",
Karl Zhangaff558a2020-05-15 14:28:23 +0100143 "ConfigRegressionIPC",
144 "ConfigRegressionIPCTfmLevel2",
Minos Galanakisea421232019-06-20 17:11:28 +0100145 "ConfigCoreIPC",
146 "ConfigCoreIPCTfmLevel2",
147 "ConfigDefault"],
148 "cmake_build_type": ["Debug", "Release"],
149 "with_mcuboot": [True, False],
150 },
151 "common_params": _common_tfm_builder_cfg,
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100152 # invalid configuations can be added as tuples of adjustable
153 # resolution "AN521" will reject all combinations for that
154 # platform while ("AN521", "GNUARM") will only reject GCC ones
155 "invalid": []
156 }
157
Karl Zhangaff558a2020-05-15 14:28:23 +0100158# Configure build manager to build several combinations
159config_AN524 = {"seed_params": {
160 "target_platform": ["AN524"],
161 "compiler": ["ARMCLANG", "GNUARM"],
162 "proj_config": ["ConfigRegression",
163 "ConfigRegressionIPC",
164 "ConfigRegressionIPCTfmLevel2",
165 "ConfigCoreIPC",
166 "ConfigCoreIPCTfmLevel2",
167 "ConfigDefault"],
168 "cmake_build_type": ["Debug", "Release"],
169 "with_mcuboot": [True, False],
170 },
171 "common_params": _common_tfm_builder_cfg,
172 # invalid configuations can be added as tuples of adjustable
173 # resolution "AN521" will reject all combinations for that
174 # platform while ("AN521", "GNUARM") will only reject GCC ones
175 "invalid": []
176 }
177
178# Configure build manager to build several combinations
179config_AN521 = {"seed_params": {
180 "target_platform": ["AN521"],
181 "compiler": ["ARMCLANG", "GNUARM"],
182 "proj_config": ["ConfigRegression",
183 "ConfigRegressionIPC",
184 "ConfigRegressionIPCTfmLevel2",
185 "ConfigCoreIPC",
186 "ConfigCoreIPCTfmLevel2",
187 "ConfigDefault"],
188 "cmake_build_type": ["Debug", "Release"],
189 "with_mcuboot": [True, False],
190 },
191 "common_params": _common_tfm_builder_cfg,
192 # invalid configuations can be added as tuples of adjustable
193 # resolution "AN521" will reject all combinations for that
194 # platform while ("AN521", "GNUARM") will only reject GCC ones
195 "invalid": []
196 }
197
198# Configure build manager to build several combinations
199config_PSA_API = {"seed_params": {
Karl Zhangeffed972020-06-30 15:48:01 +0800200 "target_platform": ["AN521", "MUSCA_B1", "MUSCA_S1"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100201 "compiler": ["ARMCLANG", "GNUARM"],
202 "proj_config": ["ConfigPsaApiTest",
203 "ConfigPsaApiTestIPC",
204 "ConfigPsaApiTestIPCTfmLevel2"],
205 "psa_api_suit": ["CRYPTO",
206 "PROTECTED_STORAGE",
207 "INITIAL_ATTESTATION",
208 "INTERNAL_TRUSTED_STORAGE"],
209 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
210 "with_mcuboot": [True],
211 },
212 "common_params": _common_tfm_builder_cfg,
213 # invalid configuations can be added as tuples of adjustable
214 # resolution "AN521" will reject all combinations for that
215 # platform while ("AN521", "GNUARM") will only reject GCC ones
216 "invalid": []
217 }
218
219# Configure build manager to build several combinations
220config_PSA_FF = {"seed_params": {
221 "target_platform": ["AN521", "MUSCA_B1"],
222 "compiler": ["ARMCLANG", "GNUARM"],
223 "proj_config": ["ConfigPsaApiTestIPC",
224 "ConfigPsaApiTestIPCTfmLevel2"],
225 # Prefer to use "IPC" from compile command perspective
226 # But the name style is prefer "FF"
227 "psa_api_suit": ["FF"],
228 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
229 "with_mcuboot": [True],
230 },
231 "common_params": _common_tfm_builder_cfg,
232 # invalid configuations can be added as tuples of adjustable
233 # resolution "AN521" will reject all combinations for that
234 # platform while ("AN521", "GNUARM") will only reject GCC ones
235 "invalid": []
236 }
237
238# Configure build manager to build several combinations
239config_PSA_API_OTP = {"seed_params": {
240 "target_platform": ["MUSCA_B1"],#
241 "compiler": ["ARMCLANG", "GNUARM"],
242 "proj_config": ["ConfigPsaApiTest",
243 "ConfigPsaApiTestIPC",
244 "ConfigPsaApiTestIPCTfmLevel2"],
245 "psa_api_suit": ["CRYPTO",
246 "PROTECTED_STORAGE",
247 "INITIAL_ATTESTATION",
248 "INTERNAL_TRUSTED_STORAGE"],
249 "with_OTP": ["OTP"],
250 "cmake_build_type": ["Debug", "Release", "Minsizerel"],#
251 "with_mcuboot": [True],
252 },
253 "common_params": _common_tfm_builder_cfg,
254 # invalid configuations can be added as tuples of adjustable
255 # resolution "AN521" will reject all combinations for that
256 # platform while ("AN521", "GNUARM") will only reject GCC ones
257 "invalid": []
258 }
259
260# Configure build manager to build several combinations
261config_PSA_FF_OTP = {"seed_params": {
262 "target_platform": ["MUSCA_B1"],
263 "compiler": ["ARMCLANG", "GNUARM"],
264 "proj_config": ["ConfigPsaApiTestIPC",
265 "ConfigPsaApiTestIPCTfmLevel2"],
266 # Prefer to use "IPC" from compile command perspective
267 # But the name style is prefer "FF"
268 "psa_api_suit": ["FF"],
269 "with_OTP": ["OTP"],
270 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
271 "with_mcuboot": [True],
272 },
273 "common_params": _common_tfm_builder_cfg,
274 # invalid configuations can be added as tuples of adjustable
275 # resolution "AN521" will reject all combinations for that
276 # platform while ("AN521", "GNUARM") will only reject GCC ones
277 "invalid": []
278 }
Minos Galanakisea421232019-06-20 17:11:28 +0100279
280# Configure build manager to build several combinations
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800281config_PSOC64 = {"seed_params": {
282 "target_platform": ["psoc64"],
283 "compiler": ["ARMCLANG", "GNUARM"],
284 "proj_config": ["ConfigRegressionIPC",
285 "ConfigRegressionIPCTfmLevel2"],
286 "cmake_build_type": ["Release"],
287 "with_mcuboot": [False],
288 },
289 "common_params": _common_tfm_builder_cfg,
290 # invalid configuations can be added as tuples of adjustable
291 # resolution "AN521" will reject all combinations for that
292 # platform while ("AN521", "GNUARM") will only reject GCC ones
293 "invalid": []
294 }
295
296# Configure build manager to build several combinations
Minos Galanakisea421232019-06-20 17:11:28 +0100297config_AN519 = {"seed_params": {
298 "target_platform": ["AN519"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100299 "compiler": ["ARMCLANG", "GNUARM"],
Minos Galanakisea421232019-06-20 17:11:28 +0100300 "proj_config": ["ConfigRegression",
Karl Zhangaff558a2020-05-15 14:28:23 +0100301 "ConfigRegressionIPC",
302 "ConfigRegressionIPCTfmLevel2",
Minos Galanakisea421232019-06-20 17:11:28 +0100303 "ConfigCoreIPC",
304 "ConfigCoreIPCTfmLevel2",
305 "ConfigDefault"],
306 "cmake_build_type": ["Debug", "Release"],
307 "with_mcuboot": [True, False],
308 },
309 "common_params": _common_tfm_builder_cfg,
310 # invalid configuations can be added as tuples of adjustable
311 # resolution "AN521" will reject all combinations for that
312 # platform while ("AN521", "GNUARM") will only reject GCC ones
313 "invalid": []
314 }
315
316config_IPC = {"seed_params": {
317 "target_platform": ["AN521", "AN519", "MUSCA_A", "MUSCA_B1"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100318 "compiler": ["ARMCLANG", "GNUARM"],
Minos Galanakisea421232019-06-20 17:11:28 +0100319 "proj_config": ["ConfigCoreIPC",
Karl Zhangaff558a2020-05-15 14:28:23 +0100320 "ConfigCoreIPCTfmLevel2",
321 "ConfigRegressionIPC",
322 "ConfigRegressionIPCTfmLevel2"],
Minos Galanakisea421232019-06-20 17:11:28 +0100323 "cmake_build_type": ["Debug", "Release"],
324 "with_mcuboot": [True, False],
325 },
326 "common_params": _common_tfm_builder_cfg,
327 # invalid configuations can be added as tuples of adjustable
328 # resolution "AN521" will reject all combinations for that
329 # platform while ("AN521", "GNUARM") will only reject GCC
330 "invalid": [("MUSCA_B1", "*", "*", "*", False)]
331 }
332
333# Configure build manager to build the maximum number of configurations
334config_full = {"seed_params": {
Karl Zhangaff558a2020-05-15 14:28:23 +0100335 "target_platform": ["AN521", "AN519",
336 "MUSCA_A", "MUSCA_B1",
Karl Zhang81a76772020-05-11 18:28:52 +0800337 "AN524", "AN539",
338 "psoc64"],
Dean Birchd6ce2c82020-05-13 13:16:15 +0100339 "compiler": ["ARMCLANG", "GNUARM"],
340 "proj_config": ["ConfigRegression",
341 "ConfigRegressionIPC",
342 "ConfigRegressionIPCTfmLevel2",
343 "ConfigCoreIPC",
344 "ConfigCoreIPCTfmLevel2",
345 "ConfigDefault"],
346 "cmake_build_type": ["Debug", "Release"],
347 "with_mcuboot": [True, False],
348 },
349 "common_params": _common_tfm_builder_cfg,
350 # invalid configuations can be added as tuples of adjustable
351 # resolution "AN521" will reject all combinations for that
352 # platform while ("AN521", "GNUARM") will only reject GCC ones
353 "invalid": [("MUSCA_A", "*", "*", "*", False),
354 ("MUSCA_B1", "*", "*", "*", False),
Karl Zhang81a76772020-05-11 18:28:52 +0800355 ("psoc64", "*", "*", "*", True),
356 ("psoc64", "*", "*", "Debug", "*"),
357 ("psoc64", "*", "ConfigRegression", "*", "*"),
358 ("psoc64", "*", "ConfigCoreIPC", "*", "*"),
359 ("psoc64", "*", "ConfigCoreIPCTfmLevel2", "*", "*"),
360 ("psoc64", "*", "ConfigDefault", "*", "*")]
361 }
362
363# Configure build manager to build the maximum number of configurations
364config_full_gnuarm = {"seed_params": {
365 "target_platform": ["AN521", "AN519",
366 "MUSCA_A", "MUSCA_B1",
367 "AN524", "AN539",
368 "psoc64"],
369 "compiler": ["GNUARM"],
370 "proj_config": ["ConfigRegression",
371 "ConfigRegressionIPC",
372 "ConfigRegressionIPCTfmLevel2",
373 "ConfigCoreIPC",
374 "ConfigCoreIPCTfmLevel2",
375 "ConfigDefault"],
376 "cmake_build_type": ["Debug", "Release"],
377 "with_mcuboot": [True, False],
378 },
379 "common_params": _common_tfm_builder_cfg,
380 # invalid configuations can be added as tuples of adjustable
381 # resolution "AN521" will reject all combinations for that
382 # platform while ("AN521", "GNUARM") will only reject GCC ones
383 "invalid": [("MUSCA_A", "*", "*", "*", False),
384 ("MUSCA_B1", "*", "*", "*", False),
385 ("psoc64", "*", "*", "*", True),
386 ("psoc64", "*", "*", "Debug", "*"),
387 ("psoc64", "*", "ConfigRegression", "*", "*"),
388 ("psoc64", "*", "ConfigCoreIPC", "*", "*"),
389 ("psoc64", "*", "ConfigCoreIPCTfmLevel2", "*", "*"),
390 ("psoc64", "*", "ConfigDefault", "*", "*")]
Dean Birchd6ce2c82020-05-13 13:16:15 +0100391 }
392
393# Configure build manager to build the maximum number of configurations
Karl Zhangaff558a2020-05-15 14:28:23 +0100394config_tfm_test = {"seed_params": {
395 "target_platform": ["AN521", "MUSCA_A", "MUSCA_B1", "MUSCA_S1"],
396 "compiler": ["ARMCLANG", "GNUARM"],
397 "proj_config": ["ConfigRegression",
398 "ConfigRegressionIPC",
399 "ConfigRegressionIPCTfmLevel2",
400 "ConfigCoreIPC",
401 "ConfigCoreIPCTfmLevel2",
402 "ConfigDefault"],
403 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
404 "with_mcuboot": [True, False],
405 },
406 "common_params": _common_tfm_builder_cfg,
407 # invalid configuations can be added as tuples of adjustable
408 # resolution "AN521" will reject all combinations for that
409 # platform while ("AN521", "GNUARM") will only reject GCC ones
410 "invalid": [("MUSCA_A", "*", "*", "*", False),
411 ("MUSCA_S1", "*", "*", "*", False),
412 ("MUSCA_B1", "*", "*", "*", False)]
413 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800414
Karl Zhangaff558a2020-05-15 14:28:23 +0100415# Configure build manager to build the maximum number of configurations
416config_tfm_test2 = {"seed_params": {
417 "target_platform": ["AN519", "AN524", "AN539", "SSE-200_AWS"],
418 "compiler": ["ARMCLANG", "GNUARM"],
419 "proj_config": ["ConfigRegression",
420 "ConfigRegressionIPC",
421 "ConfigRegressionIPCTfmLevel2",
422 "ConfigCoreIPC",
423 "ConfigCoreIPCTfmLevel2",
424 "ConfigDefault"],
425 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
426 "with_mcuboot": [True, False],
427 },
428 "common_params": _common_tfm_builder_cfg,
429 # invalid configuations can be added as tuples of adjustable
430 # resolution "AN521" will reject all combinations for that
431 # platform while ("AN521", "GNUARM") will only reject GCC ones
Karl Zhang554543c2020-06-30 16:17:47 +0800432 "invalid": [("AN519", "GNUARM", "*", "Minsizerel", "*")]
Karl Zhangaff558a2020-05-15 14:28:23 +0100433 }
434
435# Configure build manager to build the maximum number of configurations
Karl Zhang14573bc2020-06-08 09:23:21 +0800436config_tfm_profile = {"seed_params": {
437 "target_platform": ["AN519", "AN521"],
438 "compiler": ["ARMCLANG", "GNUARM"],
439 "proj_config": ["ConfigDefaultProfileS",
440 "ConfigRegressionProfileS"],
441 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
442 "with_mcuboot": [True, False],
443 },
444 "common_params": _common_tfm_builder_cfg,
445 # invalid configuations can be added as tuples of adjustable
446 # resolution "AN521" will reject all combinations for that
447 # platform while ("AN521", "GNUARM") will only reject GCC ones
Karl Zhang554543c2020-06-30 16:17:47 +0800448 "invalid": [("AN519", "GNUARM", "*", "Minsizerel", "*")]
Karl Zhang14573bc2020-06-08 09:23:21 +0800449 }
450
451# Configure build manager to build the maximum number of configurations
Karl Zhangaff558a2020-05-15 14:28:23 +0100452config_tfm_test_OTP = {"seed_params": {
453 "target_platform": ["MUSCA_B1"],
454 "compiler": ["ARMCLANG", "GNUARM"],
455 "proj_config": ["ConfigRegression",
456 "ConfigRegressionIPC",
457 "ConfigRegressionIPCTfmLevel2",
458 "ConfigCoreIPC",
459 "ConfigCoreIPCTfmLevel2",
460 "ConfigDefault"],
461 "with_OTP": ["OTP"],
462 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
463 "with_mcuboot": [True],
464 },
465 "common_params": _common_tfm_builder_cfg,
466 # invalid configuations can be added as tuples of adjustable
467 # resolution "AN521" will reject all combinations for that
468 # platform while ("AN521", "GNUARM") will only reject GCC ones
469 "invalid": []
470 }
471
Minos Galanakisea421232019-06-20 17:11:28 +0100472config_MUSCA_A = {"seed_params": {
473 "target_platform": ["MUSCA_A"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100474 "compiler": ["ARMCLANG", "GNUARM"],
Minos Galanakisea421232019-06-20 17:11:28 +0100475 "proj_config": ["ConfigRegression",
Karl Zhangaff558a2020-05-15 14:28:23 +0100476 "ConfigRegressionIPC",
477 "ConfigRegressionIPCTfmLevel2",
Minos Galanakisea421232019-06-20 17:11:28 +0100478 "ConfigCoreIPC",
479 "ConfigCoreIPCTfmLevel2",
480 "ConfigDefault"],
481 "cmake_build_type": ["Debug", "Release"],
482 "with_mcuboot": [True],
483 },
484 "common_params": _common_tfm_builder_cfg,
485 # invalid configuations can be added as tuples of adjustable
486 # resolution "AN521" will reject all combinations for that
487 # platform while ("AN521", "GNUARM") will only reject GCC
488 "invalid": [("MUSCA_A", "*", "*", "*", False)]
489 }
490
491config_MUSCA_B1 = {"seed_params": {
492 "target_platform": ["MUSCA_B1"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100493 "compiler": ["ARMCLANG", "GNUARM"],
Minos Galanakisea421232019-06-20 17:11:28 +0100494 "proj_config": ["ConfigRegression",
Karl Zhangaff558a2020-05-15 14:28:23 +0100495 "ConfigRegressionIPC",
496 "ConfigRegressionIPCTfmLevel2",
Minos Galanakisea421232019-06-20 17:11:28 +0100497 "ConfigCoreIPC",
498 "ConfigCoreIPCTfmLevel2",
499 "ConfigDefault"],
500 "cmake_build_type": ["Debug", "Release"],
501 "with_mcuboot": [True],
502 },
503 "common_params": _common_tfm_builder_cfg,
504 # invalid configuations can be added as tuples of adjustable
505 # resolution "AN521" will reject all combinations for that
506 # platform while ("AN521", "GNUARM") will only reject GCC
507 "invalid": [("MUSCA_B1", "*", "*", "*", False)]
508 }
509
Karl Zhangeffed972020-06-30 15:48:01 +0800510config_MUSCA_S1 = {"seed_params": {
511 "target_platform": ["MUSCA_S1"],
512 "compiler": ["ARMCLANG", "GNUARM"],
513 "proj_config": ["ConfigRegression",
514 "ConfigRegressionIPC",
515 "ConfigRegressionIPCTfmLevel2",
516 "ConfigCoreIPC",
517 "ConfigCoreIPCTfmLevel2",
518 "ConfigDefault"],
519 "cmake_build_type": ["Debug", "Release"],
520 "with_mcuboot": [True],
521 },
522 "common_params": _common_tfm_builder_cfg,
523 # invalid configuations can be added as tuples of adjustable
524 # resolution "AN521" will reject all combinations for that
525 # platform while ("AN521", "GNUARM") will only reject GCC
526 "invalid": [("MUSCA_S1", "*", "*", "*", False)]
527 }
528
Karl Zhangaff558a2020-05-15 14:28:23 +0100529# Configure build manager to build the maximum number of configurations
530config_release = {"seed_params": {
531 "target_platform": ["AN521", "AN519",
532 "MUSCA_A", "MUSCA_B1", "MUSCA_S1",
533 "AN524", "AN539"],
534 "compiler": ["ARMCLANG", "GNUARM"],
535 "proj_config": ["ConfigRegression",
536 "ConfigRegressionIPC",
537 "ConfigRegressionIPCTfmLevel2",
538 "ConfigCoreIPC",
539 "ConfigCoreIPCTfmLevel2",
540 "ConfigDefault"],
541 "cmake_build_type": ["Debug", "Release", "MINSIZEREL"],
542 "with_mcuboot": [True, False],
543 },
544 "common_params": _common_tfm_builder_cfg,
545 # invalid configuations can be added as tuples of adjustable
546 # resolution "AN521" will reject all combinations for that
547 # platform while ("AN521", "GNUARM") will only reject GCC ones
548 "invalid": [("MUSCA_A", "*", "*", "*", False),
549 ("MUSCA_S1", "*", "*", "*", False),
Karl Zhang554543c2020-06-30 16:17:47 +0800550 ("MUSCA_B1", "*", "*", "*", False),
551 ("AN519", "GNUARM", "*", "MINSIZEREL", "*")]
Karl Zhangaff558a2020-05-15 14:28:23 +0100552 }
553
554# Configure build manager to build several combinations
555config_AN521_PSA_API = {"seed_params": {
556 "target_platform": ["AN521", "AN519", "MUSCA_B1"],
557 "compiler": ["ARMCLANG", "GNUARM"],
558 "proj_config": ["ConfigPsaApiTest",
559 "ConfigPsaApiTestIPC",
560 "ConfigPsaApiTestIPCTfmLevel2"],
561 "psa_api_suit": ["CRYPTO",
562 "PROTECTED_STORAGE",
563 "INITIAL_ATTESTATION",
564 "INTERNAL_TRUSTED_STORAGE",
565 "IPC"],
566 "cmake_build_type": ["Debug", "Release", "MINSIZEREL"],
567 "with_mcuboot": [True],
568 },
569 "common_params": _common_tfm_builder_cfg,
570 # invalid configuations can be added as tuples of adjustable
571 # resolution "AN521" will reject all combinations for that
572 # platform while ("AN521", "GNUARM") will only reject GCC ones
Karl Zhang554543c2020-06-30 16:17:47 +0800573 "invalid": [("*", "*", "*", "IPC", "*", "*"),
574 ("AN519", "GNUARM", "*", "MINSIZEREL", "*")]
Karl Zhangaff558a2020-05-15 14:28:23 +0100575 }
576
577# Configure build manager to build several combinations
578config_AN521_PSA_IPC = {"seed_params": {
579 "target_platform": ["AN521", "AN519", "MUSCA_B1"],
580 "compiler": ["ARMCLANG", "GNUARM"],
581 "proj_config": ["ConfigPsaApiTestIPC",
582 "ConfigPsaApiTestIPCTfmLevel2"],
583 "psa_api_suit": ["IPC"],
584 "cmake_build_type": ["Debug", "Release", "MINSIZEREL"],
585 "with_mcuboot": [True],
586 },
587 "common_params": _common_tfm_builder_cfg,
588 # invalid configuations can be added as tuples of adjustable
589 # resolution "AN521" will reject all combinations for that
590 # platform while ("AN521", "GNUARM") will only reject GCC ones
Karl Zhang554543c2020-06-30 16:17:47 +0800591 "invalid": [("AN519", "GNUARM", "*", "*", "MINSIZEREL", "*")]
Karl Zhangaff558a2020-05-15 14:28:23 +0100592 }
593
Karl Zhang14573bc2020-06-08 09:23:21 +0800594# Configure build manager to build the maximum number of configurations
595config_nightly = {"seed_params": {
596 "target_platform": ["AN521", "AN519",
597 "MUSCA_A", "MUSCA_B1", "MUSCA_S1",
598 "AN524", "AN539", "SSE-200_AWS",
599 "psoc64"],
600 "compiler": ["ARMCLANG", "GNUARM"],
601 "proj_config": ["ConfigRegression",
602 "ConfigRegressionIPC",
603 "ConfigRegressionIPCTfmLevel2",
604 "ConfigDefault"],
605 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
606 "with_mcuboot": [True, False],
607 },
608 "common_params": _common_tfm_builder_cfg,
609 # invalid configuations can be added as tuples of adjustable
610 # resolution "AN521" will reject all combinations for that
611 # platform while ("AN521", "GNUARM") will only reject GCC ones
612 "invalid": [("MUSCA_A", "*", "*", "*", False),
613 ("MUSCA_B1", "*", "*", "*", False),
Karl Zhangeffed972020-06-30 15:48:01 +0800614 ("MUSCA_S1", "*", "*", "*", False),
Karl Zhang554543c2020-06-30 16:17:47 +0800615 ("AN519", "GNUARM", "*", "Minsizerel", "*"),
Karl Zhang14573bc2020-06-08 09:23:21 +0800616 ("psoc64", "*", "*", "*", True),
617 ("psoc64", "*", "*", "Debug", "*"),
618 ("psoc64", "*", "*", "Minsizerel", "*"),
619 ("psoc64", "*", "ConfigDefault", "*", "*"),
620 ("psoc64", "*", "ConfigRegression", "*", "*")]
621 }
622
623# Configure build manager to build the maximum number of configurations
624config_nightly_profile = {"seed_params": {
625 "target_platform": ["AN519", "AN521"],
626 "compiler": ["ARMCLANG", "GNUARM"],
627 "proj_config": ["ConfigDefaultProfileS",
628 "ConfigRegressionProfileS"],
629 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
630 "with_mcuboot": [True, False],
631 },
632 "common_params": _common_tfm_builder_cfg,
633 # invalid configuations can be added as tuples of adjustable
634 # resolution "AN521" will reject all combinations for that
635 # platform while ("AN521", "GNUARM") will only reject GCC ones
Karl Zhang554543c2020-06-30 16:17:47 +0800636 "invalid": [("AN519", "GNUARM", "*", "Minsizerel", "*")]
Karl Zhang14573bc2020-06-08 09:23:21 +0800637 }
638
639# Configure build manager to build several combinations
640config_nightly_PSA_API = {"seed_params": {
641 "target_platform": ["AN521"],
642 "compiler": ["ARMCLANG", "GNUARM"],
643 "proj_config": ["ConfigPsaApiTest",
644 "ConfigPsaApiTestIPC",
645 "ConfigPsaApiTestIPCTfmLevel2"],
646 "psa_api_suit": ["CRYPTO",
647 "PROTECTED_STORAGE",
648 "INITIAL_ATTESTATION",
649 "INTERNAL_TRUSTED_STORAGE"],
650 "cmake_build_type": ["Debug", "Release"],
651 "with_mcuboot": [True],
652 },
653 "common_params": _common_tfm_builder_cfg,
654 # invalid configuations can be added as tuples of adjustable
655 # resolution "AN521" will reject all combinations for that
656 # platform while ("AN521", "GNUARM") will only reject GCC ones
657 "invalid": []
658 }
659
660# Configure build manager to build several combinations
661config_nightly_PSA_FF = {"seed_params": {
662 "target_platform": ["AN521"],
663 "compiler": ["ARMCLANG", "GNUARM"],
664 "proj_config": ["ConfigPsaApiTestIPC",
665 "ConfigPsaApiTestIPCTfmLevel2"],
666 # Prefer to use "IPC" from compile command perspective
667 # But the name style is prefer "FF"
668 "psa_api_suit": ["FF"],
669 "cmake_build_type": ["Debug", "Release"],
670 "with_mcuboot": [True],
671 },
672 "common_params": _common_tfm_builder_cfg,
673 # invalid configuations can be added as tuples of adjustable
674 # resolution "AN521" will reject all combinations for that
675 # platform while ("AN521", "GNUARM") will only reject GCC ones
676 "invalid": []
677 }
678
679# Configure build manager to build the maximum number of configurations
680config_nightly_OTP = {"seed_params": {
681 "target_platform": ["MUSCA_B1"],
682 "compiler": ["ARMCLANG", "GNUARM"],
683 "proj_config": ["ConfigRegression",
684 "ConfigRegressionIPC",
685 "ConfigRegressionIPCTfmLevel2"],
686 "with_OTP": ["OTP"],
687 "cmake_build_type": ["Debug", "Release"],
688 "with_mcuboot": [True],
689 },
690 "common_params": _common_tfm_builder_cfg,
691 # invalid configuations can be added as tuples of adjustable
692 # resolution "AN521" will reject all combinations for that
693 # platform while ("AN521", "GNUARM") will only reject GCC ones
694 "invalid": []
695 }
696
697# Configure build manager to build the maximum number of configurations
698config_pp_test = {"seed_params": {
699 "target_platform": ["AN521", "AN519", "MUSCA_B1"],
700 "compiler": ["ARMCLANG", "GNUARM"],
701 "proj_config": ["ConfigRegression",
702 "ConfigRegressionIPC",
703 "ConfigRegressionIPCTfmLevel2",
704 "ConfigRegressionProfileS"],
705 "cmake_build_type": ["Release"],
706 "with_mcuboot": [True],
707 },
708 "common_params": _common_tfm_builder_cfg,
709 # invalid configuations can be added as tuples of adjustable
710 # resolution "AN521" will reject all combinations for that
711 # platform while ("AN521", "GNUARM") will only reject GCC ones
712 "invalid": [("MUSCA_B1", "*", "ConfigRegressionProfileS", "*", "*")]
713 }
714
715# Configure build manager to build the maximum number of configurations
716config_pp_OTP = {"seed_params": {
717 "target_platform": ["MUSCA_B1"],
718 "compiler": ["GNUARM"],
719 "proj_config": ["ConfigRegression",
720 "ConfigRegressionIPC",
721 "ConfigRegressionIPCTfmLevel2"],
722 "with_OTP": ["OTP"],
723 "cmake_build_type": ["Release"],
724 "with_mcuboot": [True],
725 },
726 "common_params": _common_tfm_builder_cfg,
727 # invalid configuations can be added as tuples of adjustable
728 # resolution "AN521" will reject all combinations for that
729 # platform while ("AN521", "GNUARM") will only reject GCC ones
730 "invalid": []
731 }
732
733# Configure build manager to build several combinations
734config_pp_PSA_API = {"seed_params": {
735 "target_platform": ["AN521"],
736 "compiler": ["GNUARM"],
737 "proj_config": ["ConfigPsaApiTestIPCTfmLevel2"],
738 "psa_api_suit": ["FF",
739 "CRYPTO",
740 "PROTECTED_STORAGE",
741 "INITIAL_ATTESTATION",
742 "INTERNAL_TRUSTED_STORAGE"],
743 "cmake_build_type": ["Release"],
744 "with_mcuboot": [True],
745 },
746 "common_params": _common_tfm_builder_cfg,
747 # invalid configuations can be added as tuples of adjustable
748 # resolution "AN521" will reject all combinations for that
749 # platform while ("AN521", "GNUARM") will only reject GCC ones
750 "invalid": []
751 }
752
753# Configure build manager to build several combinations
754config_pp_PSoC64 = {"seed_params": {
755 "target_platform": ["psoc64"],
756 "compiler": ["GNUARM"],
757 "proj_config": ["ConfigRegressionIPC",
758 "ConfigRegressionIPCTfmLevel2"],
759 "cmake_build_type": ["Release"],
760 "with_mcuboot": [False],
761 },
762 "common_params": _common_tfm_builder_cfg,
763 # invalid configuations can be added as tuples of adjustable
764 # resolution "AN521" will reject all combinations for that
765 # platform while ("AN521", "GNUARM") will only reject GCC ones
766 "invalid": []
767 }
768
Minos Galanakisea421232019-06-20 17:11:28 +0100769# Configruation used for document building
770config_doxygen = {"common_params": {
771 "config_type": "tf-m_documents",
772 "codebase_root_dir": "tf-m",
773 "build_cmds": {"all": ["cmake -G \"Unix Makefiles\" "
774 "-DPROJ_CONFIG=`readlink -f "
775 "%(_tbm_code_dir_)s/"
776 "configs/ConfigDefault.cmake` "
777 "-DTARGET_PLATFORM=AN521 "
778 "-DCOMPILER=GNUARM "
779 "-DCMAKE_BUILD_TYPE=Debug "
780 "-DBL2=True "
781 "%(_tbm_code_dir_)s/",
782 "cmake --build ./ -- install_doc",
783 "cmake --build ./ "
784 "-- install_userguide"]},
785 "artifact_capture_rex": r'%(_tbm_build_dir_)s/install/'
786 r'doc/reference_manual/(?:pdf|html)'
787 r'/(\w+\.(?:html|md|pdf))$',
788 },
789 "invalid": []
790 }
791
Karl Zhangaff558a2020-05-15 14:28:23 +0100792# Configuration used in testing
Minos Galanakisea421232019-06-20 17:11:28 +0100793config_debug = {"seed_params": {
794 "target_platform": ["AN521"],
795 "compiler": ["ARMCLANG"],
796 "proj_config": ["ConfigDefault"],
797 "cmake_build_type": ["Debug"],
798 "with_mcuboot": [True],
799 },
800 "common_params": _common_tfm_builder_cfg,
Karl Zhangaff558a2020-05-15 14:28:23 +0100801 # invalid configurations can be added as tuples of adjustable
Minos Galanakisea421232019-06-20 17:11:28 +0100802 # resolution "AN521" will reject all combinations for that
803 # platform while ("AN521", "GNUARM") will only reject GCC ones
804 "invalid": [("*", "GNUARM", "*", "*", False),
805 ("AN521", "ARMCLANG", "ConfigRegression",
806 "Release", False),
807 ]
808 }
809
Dean Birch4c6ad622020-03-13 11:28:03 +0000810# Configuration used in CI
811config_ci = {
812 "seed_params": {
813 "target_platform": ["AN521"],
814 "compiler": ["ARMCLANG", "GNUARM"],
Matthew Hartfb6fd362020-03-04 21:03:59 +0000815 "proj_config": ["ConfigDefault", "ConfigCoreIPCTfmLevel2", "ConfigCoreIPC", "ConfigRegression"],
816 "cmake_build_type": ["Release"],
817 "with_mcuboot": [True, False],
818 },
819 "common_params": _common_tfm_builder_cfg,
820 "invalid": [
821 ("AN521", "ARMCLANG", "ConfigDefault", "Release", False),
822 ("AN521", "ARMCLANG", "ConfigCoreIPCTfmLevel2", "Release", False),
823 ("AN521", "ARMCLANG", "ConfigCoreIPCTfmLevel2", "Release", True),
824 ("AN521", "ARMCLANG", "ConfigCoreIPC", "Release", False),
825 ("AN521", "ARMCLANG", "ConfigCoreIPC", "Release", True),
826 ("AN521", "ARMCLANG", "ConfigRegression", "Release", False),
827 ("AN521", "ARMCLANG", "ConfigRegression", "Release", True),
828 ],
829}
830
Dean Birchd6ce2c82020-05-13 13:16:15 +0100831# Configuration used in CI if armclang not available
832config_ci_gnuarm = {
833 "seed_params": {
834 "target_platform": ["AN521"],
835 "compiler": ["ARMCLANG", "GNUARM"],
836 "proj_config": ["ConfigDefault", "ConfigCoreIPCTfmLevel2", "ConfigCoreIPC", "ConfigRegression"],
837 "cmake_build_type": ["Release"],
838 "with_mcuboot": [True, False],
839 },
840 "common_params": _common_tfm_builder_cfg,
841 "invalid": [
842 ("AN521", "ARMCLANG", "ConfigDefault", "Release", False),
843 ("AN521", "ARMCLANG", "ConfigCoreIPCTfmLevel2", "Release", False),
844 ("AN521", "ARMCLANG", "ConfigCoreIPCTfmLevel2", "Release", True),
845 ("AN521", "ARMCLANG", "ConfigCoreIPC", "Release", False),
846 ("AN521", "ARMCLANG", "ConfigCoreIPC", "Release", True),
847 ("AN521", "ARMCLANG", "ConfigRegression", "Release", False),
848 ("AN521", "ARMCLANG", "ConfigRegression", "Release", True),
849 ("*", "ARMCLANG", "*", "*", "*"), # Disable ARMCLANG for now
850 ],
851}
852
853
Matthew Hartfb6fd362020-03-04 21:03:59 +0000854config_lava_debug = {
855 "seed_params": {
Matthew Hart2c2688f2020-05-26 13:09:20 +0100856 "target_platform": ["AN521", "AN519"],
Matthew Hartfb6fd362020-03-04 21:03:59 +0000857 "compiler": ["GNUARM"],
Matthew Hart2c2688f2020-05-26 13:09:20 +0100858 "proj_config": ["ConfigRegressionIPC", "ConfigRegressionIPCTfmLevel2", "ConfigRegression"],
Dean Birch4c6ad622020-03-13 11:28:03 +0000859 "cmake_build_type": ["Release"],
Matthew Hart2c2688f2020-05-26 13:09:20 +0100860 "with_mcuboot": [True, False],
Dean Birch4c6ad622020-03-13 11:28:03 +0000861 },
862 "common_params": _common_tfm_builder_cfg,
863 "invalid": [
864 ("AN521", "ARMCLANG", "ConfigDefault", "Release", True),
865 ("AN521", "GNUARM", "ConfigCoreIPCTfmLevel2", "Release", True),
866 ],
867}
868
Karl Zhangeea16ed2020-06-15 15:03:12 +0800869#GNU groups for external CI only
870# Configure build manager to build the maximum number of configurations
871config_tfm_test_gnu = {"seed_params": {
872 "target_platform": ["AN521", "MUSCA_A", "MUSCA_B1", "MUSCA_S1"],
873 "compiler": ["GNUARM"],
874 "proj_config": ["ConfigRegression",
875 "ConfigRegressionIPC",
876 "ConfigRegressionIPCTfmLevel2",
877 "ConfigCoreIPC",
878 "ConfigCoreIPCTfmLevel2",
879 "ConfigDefault"],
880 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
881 "with_mcuboot": [True, False],
882 },
883 "common_params": _common_tfm_builder_cfg,
884 # invalid configuations can be added as tuples of adjustable
885 # resolution "AN521" will reject all combinations for that
886 # platform while ("AN521", "GNUARM") will only reject GCC ones
887 "invalid": [("MUSCA_A", "*", "*", "*", False),
888 ("MUSCA_S1", "*", "*", "*", False),
889 ("MUSCA_B1", "*", "*", "*", False)]
890 }
891
892# Configure build manager to build the maximum number of configurations
893config_tfm_test2_gnu = {"seed_params": {
894 "target_platform": ["AN519", "AN524", "AN539", "SSE-200_AWS"],
895 "compiler": ["GNUARM"],
896 "proj_config": ["ConfigRegression",
897 "ConfigRegressionIPC",
898 "ConfigRegressionIPCTfmLevel2",
899 "ConfigCoreIPC",
900 "ConfigCoreIPCTfmLevel2",
901 "ConfigDefault"],
902 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
903 "with_mcuboot": [True, False],
904 },
905 "common_params": _common_tfm_builder_cfg,
906 # invalid configuations can be added as tuples of adjustable
907 # resolution "AN521" will reject all combinations for that
908 # platform while ("AN521", "GNUARM") will only reject GCC ones
Karl Zhang554543c2020-06-30 16:17:47 +0800909 "invalid": [("AN519", "GNUARM", "*", "Minsizerel", "*")]
Karl Zhangeea16ed2020-06-15 15:03:12 +0800910 }
911
912# Configure build manager to build the maximum number of configurations
913config_tfm_profile_gnu = {"seed_params": {
914 "target_platform": ["AN519", "AN521"],
915 "compiler": ["GNUARM"],
916 "proj_config": ["ConfigDefaultProfileS",
917 "ConfigRegressionProfileS"],
918 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
919 "with_mcuboot": [True, False],
920 },
921 "common_params": _common_tfm_builder_cfg,
922 # invalid configuations can be added as tuples of adjustable
923 # resolution "AN521" will reject all combinations for that
924 # platform while ("AN521", "GNUARM") will only reject GCC ones
Karl Zhang554543c2020-06-30 16:17:47 +0800925 "invalid": [("AN519", "GNUARM", "*", "Minsizerel", "*")]
Karl Zhangeea16ed2020-06-15 15:03:12 +0800926 }
927
928# Configure build manager to build the maximum number of configurations
929config_tfm_test_OTP_gnu = {"seed_params": {
930 "target_platform": ["MUSCA_B1"],
931 "compiler": ["GNUARM"],
932 "proj_config": ["ConfigRegression",
933 "ConfigRegressionIPC",
934 "ConfigRegressionIPCTfmLevel2",
935 "ConfigCoreIPC",
936 "ConfigCoreIPCTfmLevel2",
937 "ConfigDefault"],
938 "with_OTP": ["OTP"],
939 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
940 "with_mcuboot": [True],
941 },
942 "common_params": _common_tfm_builder_cfg,
943 # invalid configuations can be added as tuples of adjustable
944 # resolution "AN521" will reject all combinations for that
945 # platform while ("AN521", "GNUARM") will only reject GCC ones
946 "invalid": []
947 }
948
949# Configure build manager to build several combinations
950config_PSA_API_gnu = {"seed_params": {
951 "target_platform": ["AN521", "MUSCA_B1"],
952 "compiler": ["GNUARM"],
953 "proj_config": ["ConfigPsaApiTest",
954 "ConfigPsaApiTestIPC",
955 "ConfigPsaApiTestIPCTfmLevel2"],
956 "psa_api_suit": ["CRYPTO",
957 "PROTECTED_STORAGE",
958 "INITIAL_ATTESTATION",
959 "INTERNAL_TRUSTED_STORAGE"],
960 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
961 "with_mcuboot": [True],
962 },
963 "common_params": _common_tfm_builder_cfg,
964 # invalid configuations can be added as tuples of adjustable
965 # resolution "AN521" will reject all combinations for that
966 # platform while ("AN521", "GNUARM") will only reject GCC ones
967 "invalid": []
968 }
969
970# Configure build manager to build several combinations
971config_PSA_FF_gnu = {"seed_params": {
972 "target_platform": ["AN521", "MUSCA_B1"],
973 "compiler": ["GNUARM"],
974 "proj_config": ["ConfigPsaApiTestIPC",
975 "ConfigPsaApiTestIPCTfmLevel2"],
976 # Prefer to use "IPC" from compile command perspective
977 # But the name style is prefer "FF"
978 "psa_api_suit": ["FF"],
979 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
980 "with_mcuboot": [True],
981 },
982 "common_params": _common_tfm_builder_cfg,
983 # invalid configuations can be added as tuples of adjustable
984 # resolution "AN521" will reject all combinations for that
985 # platform while ("AN521", "GNUARM") will only reject GCC ones
986 "invalid": []
987 }
988
989# Configure build manager to build several combinations
990config_PSA_API_OTP_gnu = {"seed_params": {
991 "target_platform": ["MUSCA_B1"],#
992 "compiler": ["GNUARM"],
993 "proj_config": ["ConfigPsaApiTest",
994 "ConfigPsaApiTestIPC",
995 "ConfigPsaApiTestIPCTfmLevel2"],
996 "psa_api_suit": ["CRYPTO",
997 "PROTECTED_STORAGE",
998 "INITIAL_ATTESTATION",
999 "INTERNAL_TRUSTED_STORAGE"],
1000 "with_OTP": ["OTP"],
1001 "cmake_build_type": ["Debug", "Release", "Minsizerel"],#
1002 "with_mcuboot": [True],
1003 },
1004 "common_params": _common_tfm_builder_cfg,
1005 # invalid configuations can be added as tuples of adjustable
1006 # resolution "AN521" will reject all combinations for that
1007 # platform while ("AN521", "GNUARM") will only reject GCC ones
1008 "invalid": []
1009 }
1010
1011# Configure build manager to build several combinations
1012config_PSA_FF_OTP_gnu = {"seed_params": {
1013 "target_platform": ["MUSCA_B1"],
1014 "compiler": ["GNUARM"],
1015 "proj_config": ["ConfigPsaApiTestIPC",
1016 "ConfigPsaApiTestIPCTfmLevel2"],
1017 # Prefer to use "IPC" from compile command perspective
1018 # But the name style is prefer "FF"
1019 "psa_api_suit": ["FF"],
1020 "with_OTP": ["OTP"],
1021 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
1022 "with_mcuboot": [True],
1023 },
1024 "common_params": _common_tfm_builder_cfg,
1025 # invalid configuations can be added as tuples of adjustable
1026 # resolution "AN521" will reject all combinations for that
1027 # platform while ("AN521", "GNUARM") will only reject GCC ones
1028 "invalid": []
1029 }
1030
1031# Configure build manager to build several combinations
1032config_PSOC64_gnu = {"seed_params": {
1033 "target_platform": ["psoc64"],
1034 "compiler": ["GNUARM"],
1035 "proj_config": ["ConfigRegressionIPC",
1036 "ConfigRegressionIPCTfmLevel2"],
1037 "cmake_build_type": ["Release"],
1038 "with_mcuboot": [False],
1039 },
1040 "common_params": _common_tfm_builder_cfg,
1041 # invalid configuations can be added as tuples of adjustable
1042 # resolution "AN521" will reject all combinations for that
1043 # platform while ("AN521", "GNUARM") will only reject GCC ones
1044 "invalid": []
1045 }
1046
1047# Configure build manager to build the maximum number of configurations
1048config_nightly_gnu = {"seed_params": {
1049 "target_platform": ["AN521", "AN519",
1050 "MUSCA_A", "MUSCA_B1", "MUSCA_S1",
1051 "AN524", "AN539", "SSE-200_AWS",
1052 "psoc64"],
1053 "compiler": ["GNUARM"],
1054 "proj_config": ["ConfigRegression",
1055 "ConfigRegressionIPC",
1056 "ConfigRegressionIPCTfmLevel2",
1057 "ConfigDefault"],
1058 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
1059 "with_mcuboot": [True, False],
1060 },
1061 "common_params": _common_tfm_builder_cfg,
1062 # invalid configuations can be added as tuples of adjustable
1063 # resolution "AN521" will reject all combinations for that
1064 # platform while ("AN521", "GNUARM") will only reject GCC ones
1065 "invalid": [("MUSCA_A", "*", "*", "*", False),
1066 ("MUSCA_B1", "*", "*", "*", False),
Karl Zhangeffed972020-06-30 15:48:01 +08001067 ("MUSCA_S1", "*", "*", "*", False),
Karl Zhang554543c2020-06-30 16:17:47 +08001068 ("AN519", "GNUARM", "*", "Minsizerel", "*"),
Karl Zhangeea16ed2020-06-15 15:03:12 +08001069 ("psoc64", "*", "*", "*", True),
1070 ("psoc64", "*", "*", "Debug", "*"),
1071 ("psoc64", "*", "*", "Minsizerel", "*"),
1072 ("psoc64", "*", "ConfigDefault", "*", "*"),
1073 ("psoc64", "*", "ConfigRegression", "*", "*")]
1074 }
1075
1076# Configure build manager to build the maximum number of configurations
1077config_nightly_profile_gnu = {"seed_params": {
1078 "target_platform": ["AN519", "AN521"],
1079 "compiler": ["GNUARM"],
1080 "proj_config": ["ConfigDefaultProfileS",
1081 "ConfigRegressionProfileS"],
1082 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
1083 "with_mcuboot": [True, False],
1084 },
1085 "common_params": _common_tfm_builder_cfg,
1086 # invalid configuations can be added as tuples of adjustable
1087 # resolution "AN521" will reject all combinations for that
1088 # platform while ("AN521", "GNUARM") will only reject GCC ones
Karl Zhang554543c2020-06-30 16:17:47 +08001089 "invalid": [("AN519", "GNUARM", "*", "Minsizerel", "*")]
Karl Zhangeea16ed2020-06-15 15:03:12 +08001090 }
1091
1092# Configure build manager to build several combinations
1093config_nightly_PSA_API_gnu = {"seed_params": {
1094 "target_platform": ["AN521"],
1095 "compiler": ["GNUARM"],
1096 "proj_config": ["ConfigPsaApiTest",
1097 "ConfigPsaApiTestIPC",
1098 "ConfigPsaApiTestIPCTfmLevel2"],
1099 "psa_api_suit": ["CRYPTO",
1100 "PROTECTED_STORAGE",
1101 "INITIAL_ATTESTATION",
1102 "INTERNAL_TRUSTED_STORAGE"],
1103 "cmake_build_type": ["Debug", "Release"],
1104 "with_mcuboot": [True],
1105 },
1106 "common_params": _common_tfm_builder_cfg,
1107 # invalid configuations can be added as tuples of adjustable
1108 # resolution "AN521" will reject all combinations for that
1109 # platform while ("AN521", "GNUARM") will only reject GCC ones
1110 "invalid": []
1111 }
1112
1113# Configure build manager to build several combinations
1114config_nightly_PSA_FF_gnu = {"seed_params": {
1115 "target_platform": ["AN521"],
1116 "compiler": ["GNUARM"],
1117 "proj_config": ["ConfigPsaApiTestIPC",
1118 "ConfigPsaApiTestIPCTfmLevel2"],
1119 # Prefer to use "IPC" from compile command perspective
1120 # But the name style is prefer "FF"
1121 "psa_api_suit": ["FF"],
1122 "cmake_build_type": ["Debug", "Release"],
1123 "with_mcuboot": [True],
1124 },
1125 "common_params": _common_tfm_builder_cfg,
1126 # invalid configuations can be added as tuples of adjustable
1127 # resolution "AN521" will reject all combinations for that
1128 # platform while ("AN521", "GNUARM") will only reject GCC ones
1129 "invalid": []
1130 }
1131
1132# Configure build manager to build the maximum number of configurations
1133config_nightly_OTP_gnu = {"seed_params": {
1134 "target_platform": ["MUSCA_B1"],
1135 "compiler": ["GNUARM"],
1136 "proj_config": ["ConfigRegression",
1137 "ConfigRegressionIPC",
1138 "ConfigRegressionIPCTfmLevel2"],
1139 "with_OTP": ["OTP"],
1140 "cmake_build_type": ["Debug", "Release"],
1141 "with_mcuboot": [True],
1142 },
1143 "common_params": _common_tfm_builder_cfg,
1144 # invalid configuations can be added as tuples of adjustable
1145 # resolution "AN521" will reject all combinations for that
1146 # platform while ("AN521", "GNUARM") will only reject GCC ones
1147 "invalid": []
1148 }
1149
1150# Configure build manager to build the maximum number of configurations
1151config_pp_test_gnu = {"seed_params": {
1152 "target_platform": ["AN521", "AN519", "MUSCA_B1"],
1153 "compiler": ["GNUARM"],
1154 "proj_config": ["ConfigRegression",
1155 "ConfigRegressionIPC",
1156 "ConfigRegressionIPCTfmLevel2",
1157 "ConfigRegressionProfileS"],
1158 "cmake_build_type": ["Release"],
1159 "with_mcuboot": [True],
1160 },
1161 "common_params": _common_tfm_builder_cfg,
1162 # invalid configuations can be added as tuples of adjustable
1163 # resolution "AN521" will reject all combinations for that
1164 # platform while ("AN521", "GNUARM") will only reject GCC ones
1165 "invalid": [("MUSCA_B1", "*", "ConfigRegressionProfileS", "*", "*")]
1166 }
1167
1168# Configure build manager to build the maximum number of configurations
1169config_pp_OTP_gnu = {"seed_params": {
1170 "target_platform": ["MUSCA_B1"],
1171 "compiler": ["GNUARM"],
1172 "proj_config": ["ConfigRegression",
1173 "ConfigRegressionIPC",
1174 "ConfigRegressionIPCTfmLevel2"],
1175 "with_OTP": ["OTP"],
1176 "cmake_build_type": ["Release"],
1177 "with_mcuboot": [True],
1178 },
1179 "common_params": _common_tfm_builder_cfg,
1180 # invalid configuations can be added as tuples of adjustable
1181 # resolution "AN521" will reject all combinations for that
1182 # platform while ("AN521", "GNUARM") will only reject GCC ones
1183 "invalid": []
1184 }
1185
1186# Configure build manager to build several combinations
1187config_pp_PSA_API_gnu = {"seed_params": {
1188 "target_platform": ["AN521"],
1189 "compiler": ["GNUARM"],
1190 "proj_config": ["ConfigPsaApiTestIPCTfmLevel2"],
1191 "psa_api_suit": ["FF",
1192 "CRYPTO",
1193 "PROTECTED_STORAGE",
1194 "INITIAL_ATTESTATION",
1195 "INTERNAL_TRUSTED_STORAGE"],
1196 "cmake_build_type": ["Release"],
1197 "with_mcuboot": [True],
1198 },
1199 "common_params": _common_tfm_builder_cfg,
1200 # invalid configuations can be added as tuples of adjustable
1201 # resolution "AN521" will reject all combinations for that
1202 # platform while ("AN521", "GNUARM") will only reject GCC ones
1203 "invalid": []
1204 }
1205
1206# Configure build manager to build several combinations
1207config_pp_PSoC64_gnu = {"seed_params": {
1208 "target_platform": ["psoc64"],
1209 "compiler": ["GNUARM"],
1210 "proj_config": ["ConfigRegressionIPC",
1211 "ConfigRegressionIPCTfmLevel2"],
1212 "cmake_build_type": ["Release"],
1213 "with_mcuboot": [False],
1214 },
1215 "common_params": _common_tfm_builder_cfg,
1216 # invalid configuations can be added as tuples of adjustable
1217 # resolution "AN521" will reject all combinations for that
1218 # platform while ("AN521", "GNUARM") will only reject GCC ones
1219 "invalid": []
1220 }
1221
Karl Zhangaff558a2020-05-15 14:28:23 +01001222_builtin_configs = {
Karl Zhang14573bc2020-06-08 09:23:21 +08001223 #release test group
Karl Zhangaff558a2020-05-15 14:28:23 +01001224 "tfm_test": config_tfm_test,
1225 "tfm_test2": config_tfm_test2,
Karl Zhang14573bc2020-06-08 09:23:21 +08001226 "tfm_profile": config_tfm_profile,
Karl Zhangaff558a2020-05-15 14:28:23 +01001227 "tfm_test_otp": config_tfm_test_OTP,
1228 "psa_api": config_PSA_API,
1229 "psa_api_otp": config_PSA_API_OTP,
1230 "psa_ff": config_PSA_FF,
1231 "psa_ff_otp": config_PSA_FF_OTP,
Karl Zhang14573bc2020-06-08 09:23:21 +08001232 "tfm_psoc64": config_PSOC64,
1233
1234 #nightly test group
1235 "nightly_test": config_nightly,
1236 "nightly_profile": config_nightly_profile,
1237 "nightly_psa_api": config_nightly_PSA_API,
1238 "nightly_ff": config_nightly_PSA_FF,
1239 "nightly_otp": config_nightly_OTP,
1240
1241 #per patch test group
1242 "pp_test": config_pp_test,
1243 "pp_OTP": config_pp_OTP,
1244 "pp_PSA_API": config_pp_PSA_API,
1245 "pp_psoc64": config_pp_PSoC64,
1246
Karl Zhangeea16ed2020-06-15 15:03:12 +08001247 #GNU only configs against groups above
1248 #The combinations should be the same except the CLANG ones
1249 #release test group (GNU)
1250 "tfm_test_gnu": config_tfm_test_gnu,
1251 "tfm_test2_gnu": config_tfm_test2_gnu,
1252 "tfm_profile_gnu": config_tfm_profile_gnu,
1253 "tfm_test_otp_gnu": config_tfm_test_OTP_gnu,
1254 "psa_api_gnu": config_PSA_API_gnu,
1255 "psa_api_otp_gnu": config_PSA_API_OTP_gnu,
1256 "psa_ff_gnu": config_PSA_FF_gnu,
1257 "psa_ff_otp_gnu": config_PSA_FF_OTP_gnu,
1258 "tfm_psoc64_gnu": config_PSOC64_gnu,
1259
1260 #nightly test group (GNU)
1261 "nightly_test_gnu": config_nightly_gnu,
1262 "nightly_profile_gnu": config_nightly_profile_gnu,
1263 "nightly_psa_api_gnu": config_nightly_PSA_API_gnu,
1264 "nightly_ff_gnu": config_nightly_PSA_FF_gnu,
1265 "nightly_otp_gnu": config_nightly_OTP_gnu,
1266
1267 #per patch test group (GNU)
1268 "pp_test_gnu": config_pp_test_gnu,
1269 "pp_OTP_gnu": config_pp_OTP_gnu,
1270 "pp_PSA_API_gnu": config_pp_PSA_API_gnu,
1271 "pp_psoc64_gnu": config_pp_PSoC64_gnu,
1272
1273
Karl Zhang14573bc2020-06-08 09:23:21 +08001274 #full test group in the old CI
Karl Zhangaff558a2020-05-15 14:28:23 +01001275 "full": config_full,
Karl Zhang14573bc2020-06-08 09:23:21 +08001276
1277 #specific test group
Karl Zhangaff558a2020-05-15 14:28:23 +01001278 "an539": config_AN539,
1279 "an524": config_AN524,
Minos Galanakisea421232019-06-20 17:11:28 +01001280 "an521": config_AN521,
Karl Zhang14573bc2020-06-08 09:23:21 +08001281 "an521_psa_api": config_AN521_PSA_API,
1282 "an521_psa_ipc": config_AN521_PSA_IPC,
Minos Galanakisea421232019-06-20 17:11:28 +01001283 "an519": config_AN519,
1284 "musca_a": config_MUSCA_A,
1285 "musca_b1": config_MUSCA_B1,
Karl Zhangeffed972020-06-30 15:48:01 +08001286 "musca_s1": config_MUSCA_S1,
Karl Zhang96dfe2d2020-05-11 11:31:40 +08001287 "psoc64": config_PSOC64,
Minos Galanakisea421232019-06-20 17:11:28 +01001288 "ipc": config_IPC,
1289 "doxygen": config_doxygen,
Dean Birch4c6ad622020-03-13 11:28:03 +00001290 "debug": config_debug,
Karl Zhangaff558a2020-05-15 14:28:23 +01001291 "release": config_release,
Matthew Hartfb6fd362020-03-04 21:03:59 +00001292 "debug": config_debug,
Karl Zhang14573bc2020-06-08 09:23:21 +08001293
1294 #DevOps team test group
1295 "full_gnuarm": config_full_gnuarm,
Matthew Hartfb6fd362020-03-04 21:03:59 +00001296 "lava_debug": config_lava_debug,
Dean Birchd6ce2c82020-05-13 13:16:15 +01001297 "ci": config_ci,
1298 "ci_gnuarm": config_ci_gnuarm}
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001299
1300if __name__ == '__main__':
1301 import os
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001302
Minos Galanakisea421232019-06-20 17:11:28 +01001303 # Default behavior is to export refference config when called
1304 _dir = os.getcwd()
1305 from utils import save_json
1306 for _cname, _cfg in _builtin_configs.items():
1307 _fname = os.path.join(_dir, _cname + ".json")
1308 print("Exporting config %s" % _fname)
1309 save_json(_fname, _cfg)