blob: d0cf4218ca456accae27c1147faab6f8a637db9d [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"
95 "/tfm.hex -Intel")]
96 },
97
98 # (Optional) If set will fail if those artefacts are missing post build
99 "required_artefacts": {"all": [
100 "%(_tbm_build_dir_)s/install/outputs/"
101 "%(_tbm_target_platform_)s/tfm_s.bin",
102 "%(_tbm_build_dir_)s/install/outputs/"
103 "%(_tbm_target_platform_)s/tfm_ns.bin"],
104 "MUSCA_A": [
105 "%(_tbm_build_dir_)s/install/outputs/"
106 "%(_tbm_target_platform_)s/tfm.hex",
107 "%(_tbm_build_dir_)s/install/outputs/"
108 "%(_tbm_target_platform_)s/mcuboot.bin",
109 "%(_tbm_build_dir_)s/install/outputs/"
110 "%(_tbm_target_platform_)s/tfm_sign.bin"],
111 "MUSCA_B1": [
112 "%(_tbm_build_dir_)s/install/outputs/"
113 "%(_tbm_target_platform_)s/tfm.hex",
114 "%(_tbm_build_dir_)s/install/outputs/"
115 "%(_tbm_target_platform_)s/mcuboot.bin",
116 "%(_tbm_build_dir_)s/install/outputs/"
117 "%(_tbm_target_platform_)s/tfm_sign.bin"]
118 }
119}
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100120
121# Configure build manager to build several combinations
Karl Zhangaff558a2020-05-15 14:28:23 +0100122config_AN539 = {"seed_params": {
123 "target_platform": ["AN539"],
124 "compiler": ["ARMCLANG", "GNUARM"],
Minos Galanakisea421232019-06-20 17:11:28 +0100125 "proj_config": ["ConfigRegression",
Karl Zhangaff558a2020-05-15 14:28:23 +0100126 "ConfigRegressionIPC",
127 "ConfigRegressionIPCTfmLevel2",
Minos Galanakisea421232019-06-20 17:11:28 +0100128 "ConfigCoreIPC",
129 "ConfigCoreIPCTfmLevel2",
130 "ConfigDefault"],
131 "cmake_build_type": ["Debug", "Release"],
132 "with_mcuboot": [True, False],
133 },
134 "common_params": _common_tfm_builder_cfg,
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100135 # invalid configuations can be added as tuples of adjustable
136 # resolution "AN521" will reject all combinations for that
137 # platform while ("AN521", "GNUARM") will only reject GCC ones
138 "invalid": []
139 }
140
Karl Zhangaff558a2020-05-15 14:28:23 +0100141# Configure build manager to build several combinations
142config_AN524 = {"seed_params": {
143 "target_platform": ["AN524"],
144 "compiler": ["ARMCLANG", "GNUARM"],
145 "proj_config": ["ConfigRegression",
146 "ConfigRegressionIPC",
147 "ConfigRegressionIPCTfmLevel2",
148 "ConfigCoreIPC",
149 "ConfigCoreIPCTfmLevel2",
150 "ConfigDefault"],
151 "cmake_build_type": ["Debug", "Release"],
152 "with_mcuboot": [True, False],
153 },
154 "common_params": _common_tfm_builder_cfg,
155 # invalid configuations can be added as tuples of adjustable
156 # resolution "AN521" will reject all combinations for that
157 # platform while ("AN521", "GNUARM") will only reject GCC ones
158 "invalid": []
159 }
160
161# Configure build manager to build several combinations
162config_AN521 = {"seed_params": {
163 "target_platform": ["AN521"],
164 "compiler": ["ARMCLANG", "GNUARM"],
165 "proj_config": ["ConfigRegression",
166 "ConfigRegressionIPC",
167 "ConfigRegressionIPCTfmLevel2",
168 "ConfigCoreIPC",
169 "ConfigCoreIPCTfmLevel2",
170 "ConfigDefault"],
171 "cmake_build_type": ["Debug", "Release"],
172 "with_mcuboot": [True, False],
173 },
174 "common_params": _common_tfm_builder_cfg,
175 # invalid configuations can be added as tuples of adjustable
176 # resolution "AN521" will reject all combinations for that
177 # platform while ("AN521", "GNUARM") will only reject GCC ones
178 "invalid": []
179 }
180
181# Configure build manager to build several combinations
182config_PSA_API = {"seed_params": {
183 "target_platform": ["AN521", "MUSCA_B1"],
184 "compiler": ["ARMCLANG", "GNUARM"],
185 "proj_config": ["ConfigPsaApiTest",
186 "ConfigPsaApiTestIPC",
187 "ConfigPsaApiTestIPCTfmLevel2"],
188 "psa_api_suit": ["CRYPTO",
189 "PROTECTED_STORAGE",
190 "INITIAL_ATTESTATION",
191 "INTERNAL_TRUSTED_STORAGE"],
192 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
193 "with_mcuboot": [True],
194 },
195 "common_params": _common_tfm_builder_cfg,
196 # invalid configuations can be added as tuples of adjustable
197 # resolution "AN521" will reject all combinations for that
198 # platform while ("AN521", "GNUARM") will only reject GCC ones
199 "invalid": []
200 }
201
202# Configure build manager to build several combinations
203config_PSA_FF = {"seed_params": {
204 "target_platform": ["AN521", "MUSCA_B1"],
205 "compiler": ["ARMCLANG", "GNUARM"],
206 "proj_config": ["ConfigPsaApiTestIPC",
207 "ConfigPsaApiTestIPCTfmLevel2"],
208 # Prefer to use "IPC" from compile command perspective
209 # But the name style is prefer "FF"
210 "psa_api_suit": ["FF"],
211 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
212 "with_mcuboot": [True],
213 },
214 "common_params": _common_tfm_builder_cfg,
215 # invalid configuations can be added as tuples of adjustable
216 # resolution "AN521" will reject all combinations for that
217 # platform while ("AN521", "GNUARM") will only reject GCC ones
218 "invalid": []
219 }
220
221# Configure build manager to build several combinations
222config_PSA_API_OTP = {"seed_params": {
223 "target_platform": ["MUSCA_B1"],#
224 "compiler": ["ARMCLANG", "GNUARM"],
225 "proj_config": ["ConfigPsaApiTest",
226 "ConfigPsaApiTestIPC",
227 "ConfigPsaApiTestIPCTfmLevel2"],
228 "psa_api_suit": ["CRYPTO",
229 "PROTECTED_STORAGE",
230 "INITIAL_ATTESTATION",
231 "INTERNAL_TRUSTED_STORAGE"],
232 "with_OTP": ["OTP"],
233 "cmake_build_type": ["Debug", "Release", "Minsizerel"],#
234 "with_mcuboot": [True],
235 },
236 "common_params": _common_tfm_builder_cfg,
237 # invalid configuations can be added as tuples of adjustable
238 # resolution "AN521" will reject all combinations for that
239 # platform while ("AN521", "GNUARM") will only reject GCC ones
240 "invalid": []
241 }
242
243# Configure build manager to build several combinations
244config_PSA_FF_OTP = {"seed_params": {
245 "target_platform": ["MUSCA_B1"],
246 "compiler": ["ARMCLANG", "GNUARM"],
247 "proj_config": ["ConfigPsaApiTestIPC",
248 "ConfigPsaApiTestIPCTfmLevel2"],
249 # Prefer to use "IPC" from compile command perspective
250 # But the name style is prefer "FF"
251 "psa_api_suit": ["FF"],
252 "with_OTP": ["OTP"],
253 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
254 "with_mcuboot": [True],
255 },
256 "common_params": _common_tfm_builder_cfg,
257 # invalid configuations can be added as tuples of adjustable
258 # resolution "AN521" will reject all combinations for that
259 # platform while ("AN521", "GNUARM") will only reject GCC ones
260 "invalid": []
261 }
Minos Galanakisea421232019-06-20 17:11:28 +0100262
263# Configure build manager to build several combinations
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800264config_PSOC64 = {"seed_params": {
265 "target_platform": ["psoc64"],
266 "compiler": ["ARMCLANG", "GNUARM"],
267 "proj_config": ["ConfigRegressionIPC",
268 "ConfigRegressionIPCTfmLevel2"],
269 "cmake_build_type": ["Release"],
270 "with_mcuboot": [False],
271 },
272 "common_params": _common_tfm_builder_cfg,
273 # invalid configuations can be added as tuples of adjustable
274 # resolution "AN521" will reject all combinations for that
275 # platform while ("AN521", "GNUARM") will only reject GCC ones
276 "invalid": []
277 }
278
279# Configure build manager to build several combinations
Minos Galanakisea421232019-06-20 17:11:28 +0100280config_AN519 = {"seed_params": {
281 "target_platform": ["AN519"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100282 "compiler": ["ARMCLANG", "GNUARM"],
Minos Galanakisea421232019-06-20 17:11:28 +0100283 "proj_config": ["ConfigRegression",
Karl Zhangaff558a2020-05-15 14:28:23 +0100284 "ConfigRegressionIPC",
285 "ConfigRegressionIPCTfmLevel2",
Minos Galanakisea421232019-06-20 17:11:28 +0100286 "ConfigCoreIPC",
287 "ConfigCoreIPCTfmLevel2",
288 "ConfigDefault"],
289 "cmake_build_type": ["Debug", "Release"],
290 "with_mcuboot": [True, False],
291 },
292 "common_params": _common_tfm_builder_cfg,
293 # invalid configuations can be added as tuples of adjustable
294 # resolution "AN521" will reject all combinations for that
295 # platform while ("AN521", "GNUARM") will only reject GCC ones
296 "invalid": []
297 }
298
299config_IPC = {"seed_params": {
300 "target_platform": ["AN521", "AN519", "MUSCA_A", "MUSCA_B1"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100301 "compiler": ["ARMCLANG", "GNUARM"],
Minos Galanakisea421232019-06-20 17:11:28 +0100302 "proj_config": ["ConfigCoreIPC",
Karl Zhangaff558a2020-05-15 14:28:23 +0100303 "ConfigCoreIPCTfmLevel2",
304 "ConfigRegressionIPC",
305 "ConfigRegressionIPCTfmLevel2"],
Minos Galanakisea421232019-06-20 17:11:28 +0100306 "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
313 "invalid": [("MUSCA_B1", "*", "*", "*", False)]
314 }
315
316# Configure build manager to build the maximum number of configurations
317config_full = {"seed_params": {
Karl Zhangaff558a2020-05-15 14:28:23 +0100318 "target_platform": ["AN521", "AN519",
319 "MUSCA_A", "MUSCA_B1",
Karl Zhang81a76772020-05-11 18:28:52 +0800320 "AN524", "AN539",
321 "psoc64"],
Dean Birchd6ce2c82020-05-13 13:16:15 +0100322 "compiler": ["ARMCLANG", "GNUARM"],
323 "proj_config": ["ConfigRegression",
324 "ConfigRegressionIPC",
325 "ConfigRegressionIPCTfmLevel2",
326 "ConfigCoreIPC",
327 "ConfigCoreIPCTfmLevel2",
328 "ConfigDefault"],
329 "cmake_build_type": ["Debug", "Release"],
330 "with_mcuboot": [True, False],
331 },
332 "common_params": _common_tfm_builder_cfg,
333 # invalid configuations can be added as tuples of adjustable
334 # resolution "AN521" will reject all combinations for that
335 # platform while ("AN521", "GNUARM") will only reject GCC ones
336 "invalid": [("MUSCA_A", "*", "*", "*", False),
337 ("MUSCA_B1", "*", "*", "*", False),
Karl Zhang81a76772020-05-11 18:28:52 +0800338 ("psoc64", "*", "*", "*", True),
339 ("psoc64", "*", "*", "Debug", "*"),
340 ("psoc64", "*", "ConfigRegression", "*", "*"),
341 ("psoc64", "*", "ConfigCoreIPC", "*", "*"),
342 ("psoc64", "*", "ConfigCoreIPCTfmLevel2", "*", "*"),
343 ("psoc64", "*", "ConfigDefault", "*", "*")]
344 }
345
346# Configure build manager to build the maximum number of configurations
347config_full_gnuarm = {"seed_params": {
348 "target_platform": ["AN521", "AN519",
349 "MUSCA_A", "MUSCA_B1",
350 "AN524", "AN539",
351 "psoc64"],
352 "compiler": ["GNUARM"],
353 "proj_config": ["ConfigRegression",
354 "ConfigRegressionIPC",
355 "ConfigRegressionIPCTfmLevel2",
356 "ConfigCoreIPC",
357 "ConfigCoreIPCTfmLevel2",
358 "ConfigDefault"],
359 "cmake_build_type": ["Debug", "Release"],
360 "with_mcuboot": [True, False],
361 },
362 "common_params": _common_tfm_builder_cfg,
363 # invalid configuations can be added as tuples of adjustable
364 # resolution "AN521" will reject all combinations for that
365 # platform while ("AN521", "GNUARM") will only reject GCC ones
366 "invalid": [("MUSCA_A", "*", "*", "*", False),
367 ("MUSCA_B1", "*", "*", "*", False),
368 ("psoc64", "*", "*", "*", True),
369 ("psoc64", "*", "*", "Debug", "*"),
370 ("psoc64", "*", "ConfigRegression", "*", "*"),
371 ("psoc64", "*", "ConfigCoreIPC", "*", "*"),
372 ("psoc64", "*", "ConfigCoreIPCTfmLevel2", "*", "*"),
373 ("psoc64", "*", "ConfigDefault", "*", "*")]
Dean Birchd6ce2c82020-05-13 13:16:15 +0100374 }
375
376# Configure build manager to build the maximum number of configurations
Karl Zhangaff558a2020-05-15 14:28:23 +0100377config_tfm_test = {"seed_params": {
378 "target_platform": ["AN521", "MUSCA_A", "MUSCA_B1", "MUSCA_S1"],
379 "compiler": ["ARMCLANG", "GNUARM"],
380 "proj_config": ["ConfigRegression",
381 "ConfigRegressionIPC",
382 "ConfigRegressionIPCTfmLevel2",
383 "ConfigCoreIPC",
384 "ConfigCoreIPCTfmLevel2",
385 "ConfigDefault"],
386 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
387 "with_mcuboot": [True, False],
388 },
389 "common_params": _common_tfm_builder_cfg,
390 # invalid configuations can be added as tuples of adjustable
391 # resolution "AN521" will reject all combinations for that
392 # platform while ("AN521", "GNUARM") will only reject GCC ones
393 "invalid": [("MUSCA_A", "*", "*", "*", False),
394 ("MUSCA_S1", "*", "*", "*", False),
395 ("MUSCA_B1", "*", "*", "*", False)]
396 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800397
Karl Zhangaff558a2020-05-15 14:28:23 +0100398# Configure build manager to build the maximum number of configurations
399config_tfm_test2 = {"seed_params": {
400 "target_platform": ["AN519", "AN524", "AN539", "SSE-200_AWS"],
401 "compiler": ["ARMCLANG", "GNUARM"],
402 "proj_config": ["ConfigRegression",
403 "ConfigRegressionIPC",
404 "ConfigRegressionIPCTfmLevel2",
405 "ConfigCoreIPC",
406 "ConfigCoreIPCTfmLevel2",
407 "ConfigDefault"],
408 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
409 "with_mcuboot": [True, False],
410 },
411 "common_params": _common_tfm_builder_cfg,
412 # invalid configuations can be added as tuples of adjustable
413 # resolution "AN521" will reject all combinations for that
414 # platform while ("AN521", "GNUARM") will only reject GCC ones
415 "invalid": []
416 }
417
418# Configure build manager to build the maximum number of configurations
Karl Zhang14573bc2020-06-08 09:23:21 +0800419config_tfm_profile = {"seed_params": {
420 "target_platform": ["AN519", "AN521"],
421 "compiler": ["ARMCLANG", "GNUARM"],
422 "proj_config": ["ConfigDefaultProfileS",
423 "ConfigRegressionProfileS"],
424 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
425 "with_mcuboot": [True, False],
426 },
427 "common_params": _common_tfm_builder_cfg,
428 # invalid configuations can be added as tuples of adjustable
429 # resolution "AN521" will reject all combinations for that
430 # platform while ("AN521", "GNUARM") will only reject GCC ones
431 "invalid": []
432 }
433
434# Configure build manager to build the maximum number of configurations
Karl Zhangaff558a2020-05-15 14:28:23 +0100435config_tfm_test_OTP = {"seed_params": {
436 "target_platform": ["MUSCA_B1"],
437 "compiler": ["ARMCLANG", "GNUARM"],
438 "proj_config": ["ConfigRegression",
439 "ConfigRegressionIPC",
440 "ConfigRegressionIPCTfmLevel2",
441 "ConfigCoreIPC",
442 "ConfigCoreIPCTfmLevel2",
443 "ConfigDefault"],
444 "with_OTP": ["OTP"],
445 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
446 "with_mcuboot": [True],
447 },
448 "common_params": _common_tfm_builder_cfg,
449 # invalid configuations can be added as tuples of adjustable
450 # resolution "AN521" will reject all combinations for that
451 # platform while ("AN521", "GNUARM") will only reject GCC ones
452 "invalid": []
453 }
454
Minos Galanakisea421232019-06-20 17:11:28 +0100455config_MUSCA_A = {"seed_params": {
456 "target_platform": ["MUSCA_A"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100457 "compiler": ["ARMCLANG", "GNUARM"],
Minos Galanakisea421232019-06-20 17:11:28 +0100458 "proj_config": ["ConfigRegression",
Karl Zhangaff558a2020-05-15 14:28:23 +0100459 "ConfigRegressionIPC",
460 "ConfigRegressionIPCTfmLevel2",
Minos Galanakisea421232019-06-20 17:11:28 +0100461 "ConfigCoreIPC",
462 "ConfigCoreIPCTfmLevel2",
463 "ConfigDefault"],
464 "cmake_build_type": ["Debug", "Release"],
465 "with_mcuboot": [True],
466 },
467 "common_params": _common_tfm_builder_cfg,
468 # invalid configuations can be added as tuples of adjustable
469 # resolution "AN521" will reject all combinations for that
470 # platform while ("AN521", "GNUARM") will only reject GCC
471 "invalid": [("MUSCA_A", "*", "*", "*", False)]
472 }
473
474config_MUSCA_B1 = {"seed_params": {
475 "target_platform": ["MUSCA_B1"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100476 "compiler": ["ARMCLANG", "GNUARM"],
Minos Galanakisea421232019-06-20 17:11:28 +0100477 "proj_config": ["ConfigRegression",
Karl Zhangaff558a2020-05-15 14:28:23 +0100478 "ConfigRegressionIPC",
479 "ConfigRegressionIPCTfmLevel2",
Minos Galanakisea421232019-06-20 17:11:28 +0100480 "ConfigCoreIPC",
481 "ConfigCoreIPCTfmLevel2",
482 "ConfigDefault"],
483 "cmake_build_type": ["Debug", "Release"],
484 "with_mcuboot": [True],
485 },
486 "common_params": _common_tfm_builder_cfg,
487 # invalid configuations can be added as tuples of adjustable
488 # resolution "AN521" will reject all combinations for that
489 # platform while ("AN521", "GNUARM") will only reject GCC
490 "invalid": [("MUSCA_B1", "*", "*", "*", False)]
491 }
492
Karl Zhangaff558a2020-05-15 14:28:23 +0100493# Configure build manager to build the maximum number of configurations
494config_release = {"seed_params": {
495 "target_platform": ["AN521", "AN519",
496 "MUSCA_A", "MUSCA_B1", "MUSCA_S1",
497 "AN524", "AN539"],
498 "compiler": ["ARMCLANG", "GNUARM"],
499 "proj_config": ["ConfigRegression",
500 "ConfigRegressionIPC",
501 "ConfigRegressionIPCTfmLevel2",
502 "ConfigCoreIPC",
503 "ConfigCoreIPCTfmLevel2",
504 "ConfigDefault"],
505 "cmake_build_type": ["Debug", "Release", "MINSIZEREL"],
506 "with_mcuboot": [True, False],
507 },
508 "common_params": _common_tfm_builder_cfg,
509 # invalid configuations can be added as tuples of adjustable
510 # resolution "AN521" will reject all combinations for that
511 # platform while ("AN521", "GNUARM") will only reject GCC ones
512 "invalid": [("MUSCA_A", "*", "*", "*", False),
513 ("MUSCA_S1", "*", "*", "*", False),
514 ("MUSCA_B1", "*", "*", "*", False)]
515 }
516
517# Configure build manager to build several combinations
518config_AN521_PSA_API = {"seed_params": {
519 "target_platform": ["AN521", "AN519", "MUSCA_B1"],
520 "compiler": ["ARMCLANG", "GNUARM"],
521 "proj_config": ["ConfigPsaApiTest",
522 "ConfigPsaApiTestIPC",
523 "ConfigPsaApiTestIPCTfmLevel2"],
524 "psa_api_suit": ["CRYPTO",
525 "PROTECTED_STORAGE",
526 "INITIAL_ATTESTATION",
527 "INTERNAL_TRUSTED_STORAGE",
528 "IPC"],
529 "cmake_build_type": ["Debug", "Release", "MINSIZEREL"],
530 "with_mcuboot": [True],
531 },
532 "common_params": _common_tfm_builder_cfg,
533 # invalid configuations can be added as tuples of adjustable
534 # resolution "AN521" will reject all combinations for that
535 # platform while ("AN521", "GNUARM") will only reject GCC ones
536 "invalid": [("*", "*", "*", "IPC", "*", "*")]
537 }
538
539# Configure build manager to build several combinations
540config_AN521_PSA_IPC = {"seed_params": {
541 "target_platform": ["AN521", "AN519", "MUSCA_B1"],
542 "compiler": ["ARMCLANG", "GNUARM"],
543 "proj_config": ["ConfigPsaApiTestIPC",
544 "ConfigPsaApiTestIPCTfmLevel2"],
545 "psa_api_suit": ["IPC"],
546 "cmake_build_type": ["Debug", "Release", "MINSIZEREL"],
547 "with_mcuboot": [True],
548 },
549 "common_params": _common_tfm_builder_cfg,
550 # invalid configuations can be added as tuples of adjustable
551 # resolution "AN521" will reject all combinations for that
552 # platform while ("AN521", "GNUARM") will only reject GCC ones
553 "invalid": []
554 }
555
Karl Zhang14573bc2020-06-08 09:23:21 +0800556# Configure build manager to build the maximum number of configurations
557config_nightly = {"seed_params": {
558 "target_platform": ["AN521", "AN519",
559 "MUSCA_A", "MUSCA_B1", "MUSCA_S1",
560 "AN524", "AN539", "SSE-200_AWS",
561 "psoc64"],
562 "compiler": ["ARMCLANG", "GNUARM"],
563 "proj_config": ["ConfigRegression",
564 "ConfigRegressionIPC",
565 "ConfigRegressionIPCTfmLevel2",
566 "ConfigDefault"],
567 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
568 "with_mcuboot": [True, False],
569 },
570 "common_params": _common_tfm_builder_cfg,
571 # invalid configuations can be added as tuples of adjustable
572 # resolution "AN521" will reject all combinations for that
573 # platform while ("AN521", "GNUARM") will only reject GCC ones
574 "invalid": [("MUSCA_A", "*", "*", "*", False),
575 ("MUSCA_B1", "*", "*", "*", False),
576 ("psoc64", "*", "*", "*", True),
577 ("psoc64", "*", "*", "Debug", "*"),
578 ("psoc64", "*", "*", "Minsizerel", "*"),
579 ("psoc64", "*", "ConfigDefault", "*", "*"),
580 ("psoc64", "*", "ConfigRegression", "*", "*")]
581 }
582
583# Configure build manager to build the maximum number of configurations
584config_nightly_profile = {"seed_params": {
585 "target_platform": ["AN519", "AN521"],
586 "compiler": ["ARMCLANG", "GNUARM"],
587 "proj_config": ["ConfigDefaultProfileS",
588 "ConfigRegressionProfileS"],
589 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
590 "with_mcuboot": [True, False],
591 },
592 "common_params": _common_tfm_builder_cfg,
593 # invalid configuations can be added as tuples of adjustable
594 # resolution "AN521" will reject all combinations for that
595 # platform while ("AN521", "GNUARM") will only reject GCC ones
596 "invalid": []
597 }
598
599# Configure build manager to build several combinations
600config_nightly_PSA_API = {"seed_params": {
601 "target_platform": ["AN521"],
602 "compiler": ["ARMCLANG", "GNUARM"],
603 "proj_config": ["ConfigPsaApiTest",
604 "ConfigPsaApiTestIPC",
605 "ConfigPsaApiTestIPCTfmLevel2"],
606 "psa_api_suit": ["CRYPTO",
607 "PROTECTED_STORAGE",
608 "INITIAL_ATTESTATION",
609 "INTERNAL_TRUSTED_STORAGE"],
610 "cmake_build_type": ["Debug", "Release"],
611 "with_mcuboot": [True],
612 },
613 "common_params": _common_tfm_builder_cfg,
614 # invalid configuations can be added as tuples of adjustable
615 # resolution "AN521" will reject all combinations for that
616 # platform while ("AN521", "GNUARM") will only reject GCC ones
617 "invalid": []
618 }
619
620# Configure build manager to build several combinations
621config_nightly_PSA_FF = {"seed_params": {
622 "target_platform": ["AN521"],
623 "compiler": ["ARMCLANG", "GNUARM"],
624 "proj_config": ["ConfigPsaApiTestIPC",
625 "ConfigPsaApiTestIPCTfmLevel2"],
626 # Prefer to use "IPC" from compile command perspective
627 # But the name style is prefer "FF"
628 "psa_api_suit": ["FF"],
629 "cmake_build_type": ["Debug", "Release"],
630 "with_mcuboot": [True],
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
636 "invalid": []
637 }
638
639# Configure build manager to build the maximum number of configurations
640config_nightly_OTP = {"seed_params": {
641 "target_platform": ["MUSCA_B1"],
642 "compiler": ["ARMCLANG", "GNUARM"],
643 "proj_config": ["ConfigRegression",
644 "ConfigRegressionIPC",
645 "ConfigRegressionIPCTfmLevel2"],
646 "with_OTP": ["OTP"],
647 "cmake_build_type": ["Debug", "Release"],
648 "with_mcuboot": [True],
649 },
650 "common_params": _common_tfm_builder_cfg,
651 # invalid configuations can be added as tuples of adjustable
652 # resolution "AN521" will reject all combinations for that
653 # platform while ("AN521", "GNUARM") will only reject GCC ones
654 "invalid": []
655 }
656
657# Configure build manager to build the maximum number of configurations
658config_pp_test = {"seed_params": {
659 "target_platform": ["AN521", "AN519", "MUSCA_B1"],
660 "compiler": ["ARMCLANG", "GNUARM"],
661 "proj_config": ["ConfigRegression",
662 "ConfigRegressionIPC",
663 "ConfigRegressionIPCTfmLevel2",
664 "ConfigRegressionProfileS"],
665 "cmake_build_type": ["Release"],
666 "with_mcuboot": [True],
667 },
668 "common_params": _common_tfm_builder_cfg,
669 # invalid configuations can be added as tuples of adjustable
670 # resolution "AN521" will reject all combinations for that
671 # platform while ("AN521", "GNUARM") will only reject GCC ones
672 "invalid": [("MUSCA_B1", "*", "ConfigRegressionProfileS", "*", "*")]
673 }
674
675# Configure build manager to build the maximum number of configurations
676config_pp_OTP = {"seed_params": {
677 "target_platform": ["MUSCA_B1"],
678 "compiler": ["GNUARM"],
679 "proj_config": ["ConfigRegression",
680 "ConfigRegressionIPC",
681 "ConfigRegressionIPCTfmLevel2"],
682 "with_OTP": ["OTP"],
683 "cmake_build_type": ["Release"],
684 "with_mcuboot": [True],
685 },
686 "common_params": _common_tfm_builder_cfg,
687 # invalid configuations can be added as tuples of adjustable
688 # resolution "AN521" will reject all combinations for that
689 # platform while ("AN521", "GNUARM") will only reject GCC ones
690 "invalid": []
691 }
692
693# Configure build manager to build several combinations
694config_pp_PSA_API = {"seed_params": {
695 "target_platform": ["AN521"],
696 "compiler": ["GNUARM"],
697 "proj_config": ["ConfigPsaApiTestIPCTfmLevel2"],
698 "psa_api_suit": ["FF",
699 "CRYPTO",
700 "PROTECTED_STORAGE",
701 "INITIAL_ATTESTATION",
702 "INTERNAL_TRUSTED_STORAGE"],
703 "cmake_build_type": ["Release"],
704 "with_mcuboot": [True],
705 },
706 "common_params": _common_tfm_builder_cfg,
707 # invalid configuations can be added as tuples of adjustable
708 # resolution "AN521" will reject all combinations for that
709 # platform while ("AN521", "GNUARM") will only reject GCC ones
710 "invalid": []
711 }
712
713# Configure build manager to build several combinations
714config_pp_PSoC64 = {"seed_params": {
715 "target_platform": ["psoc64"],
716 "compiler": ["GNUARM"],
717 "proj_config": ["ConfigRegressionIPC",
718 "ConfigRegressionIPCTfmLevel2"],
719 "cmake_build_type": ["Release"],
720 "with_mcuboot": [False],
721 },
722 "common_params": _common_tfm_builder_cfg,
723 # invalid configuations can be added as tuples of adjustable
724 # resolution "AN521" will reject all combinations for that
725 # platform while ("AN521", "GNUARM") will only reject GCC ones
726 "invalid": []
727 }
728
Minos Galanakisea421232019-06-20 17:11:28 +0100729# Configruation used for document building
730config_doxygen = {"common_params": {
731 "config_type": "tf-m_documents",
732 "codebase_root_dir": "tf-m",
733 "build_cmds": {"all": ["cmake -G \"Unix Makefiles\" "
734 "-DPROJ_CONFIG=`readlink -f "
735 "%(_tbm_code_dir_)s/"
736 "configs/ConfigDefault.cmake` "
737 "-DTARGET_PLATFORM=AN521 "
738 "-DCOMPILER=GNUARM "
739 "-DCMAKE_BUILD_TYPE=Debug "
740 "-DBL2=True "
741 "%(_tbm_code_dir_)s/",
742 "cmake --build ./ -- install_doc",
743 "cmake --build ./ "
744 "-- install_userguide"]},
745 "artifact_capture_rex": r'%(_tbm_build_dir_)s/install/'
746 r'doc/reference_manual/(?:pdf|html)'
747 r'/(\w+\.(?:html|md|pdf))$',
748 },
749 "invalid": []
750 }
751
Karl Zhangaff558a2020-05-15 14:28:23 +0100752# Configuration used in testing
Minos Galanakisea421232019-06-20 17:11:28 +0100753config_debug = {"seed_params": {
754 "target_platform": ["AN521"],
755 "compiler": ["ARMCLANG"],
756 "proj_config": ["ConfigDefault"],
757 "cmake_build_type": ["Debug"],
758 "with_mcuboot": [True],
759 },
760 "common_params": _common_tfm_builder_cfg,
Karl Zhangaff558a2020-05-15 14:28:23 +0100761 # invalid configurations can be added as tuples of adjustable
Minos Galanakisea421232019-06-20 17:11:28 +0100762 # resolution "AN521" will reject all combinations for that
763 # platform while ("AN521", "GNUARM") will only reject GCC ones
764 "invalid": [("*", "GNUARM", "*", "*", False),
765 ("AN521", "ARMCLANG", "ConfigRegression",
766 "Release", False),
767 ]
768 }
769
Dean Birch4c6ad622020-03-13 11:28:03 +0000770# Configuration used in CI
771config_ci = {
772 "seed_params": {
773 "target_platform": ["AN521"],
774 "compiler": ["ARMCLANG", "GNUARM"],
Matthew Hartfb6fd362020-03-04 21:03:59 +0000775 "proj_config": ["ConfigDefault", "ConfigCoreIPCTfmLevel2", "ConfigCoreIPC", "ConfigRegression"],
776 "cmake_build_type": ["Release"],
777 "with_mcuboot": [True, False],
778 },
779 "common_params": _common_tfm_builder_cfg,
780 "invalid": [
781 ("AN521", "ARMCLANG", "ConfigDefault", "Release", False),
782 ("AN521", "ARMCLANG", "ConfigCoreIPCTfmLevel2", "Release", False),
783 ("AN521", "ARMCLANG", "ConfigCoreIPCTfmLevel2", "Release", True),
784 ("AN521", "ARMCLANG", "ConfigCoreIPC", "Release", False),
785 ("AN521", "ARMCLANG", "ConfigCoreIPC", "Release", True),
786 ("AN521", "ARMCLANG", "ConfigRegression", "Release", False),
787 ("AN521", "ARMCLANG", "ConfigRegression", "Release", True),
788 ],
789}
790
Dean Birchd6ce2c82020-05-13 13:16:15 +0100791# Configuration used in CI if armclang not available
792config_ci_gnuarm = {
793 "seed_params": {
794 "target_platform": ["AN521"],
795 "compiler": ["ARMCLANG", "GNUARM"],
796 "proj_config": ["ConfigDefault", "ConfigCoreIPCTfmLevel2", "ConfigCoreIPC", "ConfigRegression"],
797 "cmake_build_type": ["Release"],
798 "with_mcuboot": [True, False],
799 },
800 "common_params": _common_tfm_builder_cfg,
801 "invalid": [
802 ("AN521", "ARMCLANG", "ConfigDefault", "Release", False),
803 ("AN521", "ARMCLANG", "ConfigCoreIPCTfmLevel2", "Release", False),
804 ("AN521", "ARMCLANG", "ConfigCoreIPCTfmLevel2", "Release", True),
805 ("AN521", "ARMCLANG", "ConfigCoreIPC", "Release", False),
806 ("AN521", "ARMCLANG", "ConfigCoreIPC", "Release", True),
807 ("AN521", "ARMCLANG", "ConfigRegression", "Release", False),
808 ("AN521", "ARMCLANG", "ConfigRegression", "Release", True),
809 ("*", "ARMCLANG", "*", "*", "*"), # Disable ARMCLANG for now
810 ],
811}
812
813
Matthew Hartfb6fd362020-03-04 21:03:59 +0000814config_lava_debug = {
815 "seed_params": {
Matthew Hart2c2688f2020-05-26 13:09:20 +0100816 "target_platform": ["AN521", "AN519"],
Matthew Hartfb6fd362020-03-04 21:03:59 +0000817 "compiler": ["GNUARM"],
Matthew Hart2c2688f2020-05-26 13:09:20 +0100818 "proj_config": ["ConfigRegressionIPC", "ConfigRegressionIPCTfmLevel2", "ConfigRegression"],
Dean Birch4c6ad622020-03-13 11:28:03 +0000819 "cmake_build_type": ["Release"],
Matthew Hart2c2688f2020-05-26 13:09:20 +0100820 "with_mcuboot": [True, False],
Dean Birch4c6ad622020-03-13 11:28:03 +0000821 },
822 "common_params": _common_tfm_builder_cfg,
823 "invalid": [
824 ("AN521", "ARMCLANG", "ConfigDefault", "Release", True),
825 ("AN521", "GNUARM", "ConfigCoreIPCTfmLevel2", "Release", True),
826 ],
827}
828
Karl Zhangeea16ed2020-06-15 15:03:12 +0800829#GNU groups for external CI only
830# Configure build manager to build the maximum number of configurations
831config_tfm_test_gnu = {"seed_params": {
832 "target_platform": ["AN521", "MUSCA_A", "MUSCA_B1", "MUSCA_S1"],
833 "compiler": ["GNUARM"],
834 "proj_config": ["ConfigRegression",
835 "ConfigRegressionIPC",
836 "ConfigRegressionIPCTfmLevel2",
837 "ConfigCoreIPC",
838 "ConfigCoreIPCTfmLevel2",
839 "ConfigDefault"],
840 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
841 "with_mcuboot": [True, False],
842 },
843 "common_params": _common_tfm_builder_cfg,
844 # invalid configuations can be added as tuples of adjustable
845 # resolution "AN521" will reject all combinations for that
846 # platform while ("AN521", "GNUARM") will only reject GCC ones
847 "invalid": [("MUSCA_A", "*", "*", "*", False),
848 ("MUSCA_S1", "*", "*", "*", False),
849 ("MUSCA_B1", "*", "*", "*", False)]
850 }
851
852# Configure build manager to build the maximum number of configurations
853config_tfm_test2_gnu = {"seed_params": {
854 "target_platform": ["AN519", "AN524", "AN539", "SSE-200_AWS"],
855 "compiler": ["GNUARM"],
856 "proj_config": ["ConfigRegression",
857 "ConfigRegressionIPC",
858 "ConfigRegressionIPCTfmLevel2",
859 "ConfigCoreIPC",
860 "ConfigCoreIPCTfmLevel2",
861 "ConfigDefault"],
862 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
863 "with_mcuboot": [True, False],
864 },
865 "common_params": _common_tfm_builder_cfg,
866 # invalid configuations can be added as tuples of adjustable
867 # resolution "AN521" will reject all combinations for that
868 # platform while ("AN521", "GNUARM") will only reject GCC ones
869 "invalid": []
870 }
871
872# Configure build manager to build the maximum number of configurations
873config_tfm_profile_gnu = {"seed_params": {
874 "target_platform": ["AN519", "AN521"],
875 "compiler": ["GNUARM"],
876 "proj_config": ["ConfigDefaultProfileS",
877 "ConfigRegressionProfileS"],
878 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
879 "with_mcuboot": [True, False],
880 },
881 "common_params": _common_tfm_builder_cfg,
882 # invalid configuations can be added as tuples of adjustable
883 # resolution "AN521" will reject all combinations for that
884 # platform while ("AN521", "GNUARM") will only reject GCC ones
885 "invalid": []
886 }
887
888# Configure build manager to build the maximum number of configurations
889config_tfm_test_OTP_gnu = {"seed_params": {
890 "target_platform": ["MUSCA_B1"],
891 "compiler": ["GNUARM"],
892 "proj_config": ["ConfigRegression",
893 "ConfigRegressionIPC",
894 "ConfigRegressionIPCTfmLevel2",
895 "ConfigCoreIPC",
896 "ConfigCoreIPCTfmLevel2",
897 "ConfigDefault"],
898 "with_OTP": ["OTP"],
899 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
900 "with_mcuboot": [True],
901 },
902 "common_params": _common_tfm_builder_cfg,
903 # invalid configuations can be added as tuples of adjustable
904 # resolution "AN521" will reject all combinations for that
905 # platform while ("AN521", "GNUARM") will only reject GCC ones
906 "invalid": []
907 }
908
909# Configure build manager to build several combinations
910config_PSA_API_gnu = {"seed_params": {
911 "target_platform": ["AN521", "MUSCA_B1"],
912 "compiler": ["GNUARM"],
913 "proj_config": ["ConfigPsaApiTest",
914 "ConfigPsaApiTestIPC",
915 "ConfigPsaApiTestIPCTfmLevel2"],
916 "psa_api_suit": ["CRYPTO",
917 "PROTECTED_STORAGE",
918 "INITIAL_ATTESTATION",
919 "INTERNAL_TRUSTED_STORAGE"],
920 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
921 "with_mcuboot": [True],
922 },
923 "common_params": _common_tfm_builder_cfg,
924 # invalid configuations can be added as tuples of adjustable
925 # resolution "AN521" will reject all combinations for that
926 # platform while ("AN521", "GNUARM") will only reject GCC ones
927 "invalid": []
928 }
929
930# Configure build manager to build several combinations
931config_PSA_FF_gnu = {"seed_params": {
932 "target_platform": ["AN521", "MUSCA_B1"],
933 "compiler": ["GNUARM"],
934 "proj_config": ["ConfigPsaApiTestIPC",
935 "ConfigPsaApiTestIPCTfmLevel2"],
936 # Prefer to use "IPC" from compile command perspective
937 # But the name style is prefer "FF"
938 "psa_api_suit": ["FF"],
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_OTP_gnu = {"seed_params": {
951 "target_platform": ["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 "with_OTP": ["OTP"],
961 "cmake_build_type": ["Debug", "Release", "Minsizerel"],#
962 "with_mcuboot": [True],
963 },
964 "common_params": _common_tfm_builder_cfg,
965 # invalid configuations can be added as tuples of adjustable
966 # resolution "AN521" will reject all combinations for that
967 # platform while ("AN521", "GNUARM") will only reject GCC ones
968 "invalid": []
969 }
970
971# Configure build manager to build several combinations
972config_PSA_FF_OTP_gnu = {"seed_params": {
973 "target_platform": ["MUSCA_B1"],
974 "compiler": ["GNUARM"],
975 "proj_config": ["ConfigPsaApiTestIPC",
976 "ConfigPsaApiTestIPCTfmLevel2"],
977 # Prefer to use "IPC" from compile command perspective
978 # But the name style is prefer "FF"
979 "psa_api_suit": ["FF"],
980 "with_OTP": ["OTP"],
981 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
982 "with_mcuboot": [True],
983 },
984 "common_params": _common_tfm_builder_cfg,
985 # invalid configuations can be added as tuples of adjustable
986 # resolution "AN521" will reject all combinations for that
987 # platform while ("AN521", "GNUARM") will only reject GCC ones
988 "invalid": []
989 }
990
991# Configure build manager to build several combinations
992config_PSOC64_gnu = {"seed_params": {
993 "target_platform": ["psoc64"],
994 "compiler": ["GNUARM"],
995 "proj_config": ["ConfigRegressionIPC",
996 "ConfigRegressionIPCTfmLevel2"],
997 "cmake_build_type": ["Release"],
998 "with_mcuboot": [False],
999 },
1000 "common_params": _common_tfm_builder_cfg,
1001 # invalid configuations can be added as tuples of adjustable
1002 # resolution "AN521" will reject all combinations for that
1003 # platform while ("AN521", "GNUARM") will only reject GCC ones
1004 "invalid": []
1005 }
1006
1007# Configure build manager to build the maximum number of configurations
1008config_nightly_gnu = {"seed_params": {
1009 "target_platform": ["AN521", "AN519",
1010 "MUSCA_A", "MUSCA_B1", "MUSCA_S1",
1011 "AN524", "AN539", "SSE-200_AWS",
1012 "psoc64"],
1013 "compiler": ["GNUARM"],
1014 "proj_config": ["ConfigRegression",
1015 "ConfigRegressionIPC",
1016 "ConfigRegressionIPCTfmLevel2",
1017 "ConfigDefault"],
1018 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
1019 "with_mcuboot": [True, False],
1020 },
1021 "common_params": _common_tfm_builder_cfg,
1022 # invalid configuations can be added as tuples of adjustable
1023 # resolution "AN521" will reject all combinations for that
1024 # platform while ("AN521", "GNUARM") will only reject GCC ones
1025 "invalid": [("MUSCA_A", "*", "*", "*", False),
1026 ("MUSCA_B1", "*", "*", "*", False),
1027 ("psoc64", "*", "*", "*", True),
1028 ("psoc64", "*", "*", "Debug", "*"),
1029 ("psoc64", "*", "*", "Minsizerel", "*"),
1030 ("psoc64", "*", "ConfigDefault", "*", "*"),
1031 ("psoc64", "*", "ConfigRegression", "*", "*")]
1032 }
1033
1034# Configure build manager to build the maximum number of configurations
1035config_nightly_profile_gnu = {"seed_params": {
1036 "target_platform": ["AN519", "AN521"],
1037 "compiler": ["GNUARM"],
1038 "proj_config": ["ConfigDefaultProfileS",
1039 "ConfigRegressionProfileS"],
1040 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
1041 "with_mcuboot": [True, False],
1042 },
1043 "common_params": _common_tfm_builder_cfg,
1044 # invalid configuations can be added as tuples of adjustable
1045 # resolution "AN521" will reject all combinations for that
1046 # platform while ("AN521", "GNUARM") will only reject GCC ones
1047 "invalid": []
1048 }
1049
1050# Configure build manager to build several combinations
1051config_nightly_PSA_API_gnu = {"seed_params": {
1052 "target_platform": ["AN521"],
1053 "compiler": ["GNUARM"],
1054 "proj_config": ["ConfigPsaApiTest",
1055 "ConfigPsaApiTestIPC",
1056 "ConfigPsaApiTestIPCTfmLevel2"],
1057 "psa_api_suit": ["CRYPTO",
1058 "PROTECTED_STORAGE",
1059 "INITIAL_ATTESTATION",
1060 "INTERNAL_TRUSTED_STORAGE"],
1061 "cmake_build_type": ["Debug", "Release"],
1062 "with_mcuboot": [True],
1063 },
1064 "common_params": _common_tfm_builder_cfg,
1065 # invalid configuations can be added as tuples of adjustable
1066 # resolution "AN521" will reject all combinations for that
1067 # platform while ("AN521", "GNUARM") will only reject GCC ones
1068 "invalid": []
1069 }
1070
1071# Configure build manager to build several combinations
1072config_nightly_PSA_FF_gnu = {"seed_params": {
1073 "target_platform": ["AN521"],
1074 "compiler": ["GNUARM"],
1075 "proj_config": ["ConfigPsaApiTestIPC",
1076 "ConfigPsaApiTestIPCTfmLevel2"],
1077 # Prefer to use "IPC" from compile command perspective
1078 # But the name style is prefer "FF"
1079 "psa_api_suit": ["FF"],
1080 "cmake_build_type": ["Debug", "Release"],
1081 "with_mcuboot": [True],
1082 },
1083 "common_params": _common_tfm_builder_cfg,
1084 # invalid configuations can be added as tuples of adjustable
1085 # resolution "AN521" will reject all combinations for that
1086 # platform while ("AN521", "GNUARM") will only reject GCC ones
1087 "invalid": []
1088 }
1089
1090# Configure build manager to build the maximum number of configurations
1091config_nightly_OTP_gnu = {"seed_params": {
1092 "target_platform": ["MUSCA_B1"],
1093 "compiler": ["GNUARM"],
1094 "proj_config": ["ConfigRegression",
1095 "ConfigRegressionIPC",
1096 "ConfigRegressionIPCTfmLevel2"],
1097 "with_OTP": ["OTP"],
1098 "cmake_build_type": ["Debug", "Release"],
1099 "with_mcuboot": [True],
1100 },
1101 "common_params": _common_tfm_builder_cfg,
1102 # invalid configuations can be added as tuples of adjustable
1103 # resolution "AN521" will reject all combinations for that
1104 # platform while ("AN521", "GNUARM") will only reject GCC ones
1105 "invalid": []
1106 }
1107
1108# Configure build manager to build the maximum number of configurations
1109config_pp_test_gnu = {"seed_params": {
1110 "target_platform": ["AN521", "AN519", "MUSCA_B1"],
1111 "compiler": ["GNUARM"],
1112 "proj_config": ["ConfigRegression",
1113 "ConfigRegressionIPC",
1114 "ConfigRegressionIPCTfmLevel2",
1115 "ConfigRegressionProfileS"],
1116 "cmake_build_type": ["Release"],
1117 "with_mcuboot": [True],
1118 },
1119 "common_params": _common_tfm_builder_cfg,
1120 # invalid configuations can be added as tuples of adjustable
1121 # resolution "AN521" will reject all combinations for that
1122 # platform while ("AN521", "GNUARM") will only reject GCC ones
1123 "invalid": [("MUSCA_B1", "*", "ConfigRegressionProfileS", "*", "*")]
1124 }
1125
1126# Configure build manager to build the maximum number of configurations
1127config_pp_OTP_gnu = {"seed_params": {
1128 "target_platform": ["MUSCA_B1"],
1129 "compiler": ["GNUARM"],
1130 "proj_config": ["ConfigRegression",
1131 "ConfigRegressionIPC",
1132 "ConfigRegressionIPCTfmLevel2"],
1133 "with_OTP": ["OTP"],
1134 "cmake_build_type": ["Release"],
1135 "with_mcuboot": [True],
1136 },
1137 "common_params": _common_tfm_builder_cfg,
1138 # invalid configuations can be added as tuples of adjustable
1139 # resolution "AN521" will reject all combinations for that
1140 # platform while ("AN521", "GNUARM") will only reject GCC ones
1141 "invalid": []
1142 }
1143
1144# Configure build manager to build several combinations
1145config_pp_PSA_API_gnu = {"seed_params": {
1146 "target_platform": ["AN521"],
1147 "compiler": ["GNUARM"],
1148 "proj_config": ["ConfigPsaApiTestIPCTfmLevel2"],
1149 "psa_api_suit": ["FF",
1150 "CRYPTO",
1151 "PROTECTED_STORAGE",
1152 "INITIAL_ATTESTATION",
1153 "INTERNAL_TRUSTED_STORAGE"],
1154 "cmake_build_type": ["Release"],
1155 "with_mcuboot": [True],
1156 },
1157 "common_params": _common_tfm_builder_cfg,
1158 # invalid configuations can be added as tuples of adjustable
1159 # resolution "AN521" will reject all combinations for that
1160 # platform while ("AN521", "GNUARM") will only reject GCC ones
1161 "invalid": []
1162 }
1163
1164# Configure build manager to build several combinations
1165config_pp_PSoC64_gnu = {"seed_params": {
1166 "target_platform": ["psoc64"],
1167 "compiler": ["GNUARM"],
1168 "proj_config": ["ConfigRegressionIPC",
1169 "ConfigRegressionIPCTfmLevel2"],
1170 "cmake_build_type": ["Release"],
1171 "with_mcuboot": [False],
1172 },
1173 "common_params": _common_tfm_builder_cfg,
1174 # invalid configuations can be added as tuples of adjustable
1175 # resolution "AN521" will reject all combinations for that
1176 # platform while ("AN521", "GNUARM") will only reject GCC ones
1177 "invalid": []
1178 }
1179
Karl Zhangaff558a2020-05-15 14:28:23 +01001180_builtin_configs = {
Karl Zhang14573bc2020-06-08 09:23:21 +08001181 #release test group
Karl Zhangaff558a2020-05-15 14:28:23 +01001182 "tfm_test": config_tfm_test,
1183 "tfm_test2": config_tfm_test2,
Karl Zhang14573bc2020-06-08 09:23:21 +08001184 "tfm_profile": config_tfm_profile,
Karl Zhangaff558a2020-05-15 14:28:23 +01001185 "tfm_test_otp": config_tfm_test_OTP,
1186 "psa_api": config_PSA_API,
1187 "psa_api_otp": config_PSA_API_OTP,
1188 "psa_ff": config_PSA_FF,
1189 "psa_ff_otp": config_PSA_FF_OTP,
Karl Zhang14573bc2020-06-08 09:23:21 +08001190 "tfm_psoc64": config_PSOC64,
1191
1192 #nightly test group
1193 "nightly_test": config_nightly,
1194 "nightly_profile": config_nightly_profile,
1195 "nightly_psa_api": config_nightly_PSA_API,
1196 "nightly_ff": config_nightly_PSA_FF,
1197 "nightly_otp": config_nightly_OTP,
1198
1199 #per patch test group
1200 "pp_test": config_pp_test,
1201 "pp_OTP": config_pp_OTP,
1202 "pp_PSA_API": config_pp_PSA_API,
1203 "pp_psoc64": config_pp_PSoC64,
1204
Karl Zhangeea16ed2020-06-15 15:03:12 +08001205 #GNU only configs against groups above
1206 #The combinations should be the same except the CLANG ones
1207 #release test group (GNU)
1208 "tfm_test_gnu": config_tfm_test_gnu,
1209 "tfm_test2_gnu": config_tfm_test2_gnu,
1210 "tfm_profile_gnu": config_tfm_profile_gnu,
1211 "tfm_test_otp_gnu": config_tfm_test_OTP_gnu,
1212 "psa_api_gnu": config_PSA_API_gnu,
1213 "psa_api_otp_gnu": config_PSA_API_OTP_gnu,
1214 "psa_ff_gnu": config_PSA_FF_gnu,
1215 "psa_ff_otp_gnu": config_PSA_FF_OTP_gnu,
1216 "tfm_psoc64_gnu": config_PSOC64_gnu,
1217
1218 #nightly test group (GNU)
1219 "nightly_test_gnu": config_nightly_gnu,
1220 "nightly_profile_gnu": config_nightly_profile_gnu,
1221 "nightly_psa_api_gnu": config_nightly_PSA_API_gnu,
1222 "nightly_ff_gnu": config_nightly_PSA_FF_gnu,
1223 "nightly_otp_gnu": config_nightly_OTP_gnu,
1224
1225 #per patch test group (GNU)
1226 "pp_test_gnu": config_pp_test_gnu,
1227 "pp_OTP_gnu": config_pp_OTP_gnu,
1228 "pp_PSA_API_gnu": config_pp_PSA_API_gnu,
1229 "pp_psoc64_gnu": config_pp_PSoC64_gnu,
1230
1231
Karl Zhang14573bc2020-06-08 09:23:21 +08001232 #full test group in the old CI
Karl Zhangaff558a2020-05-15 14:28:23 +01001233 "full": config_full,
Karl Zhang14573bc2020-06-08 09:23:21 +08001234
1235 #specific test group
Karl Zhangaff558a2020-05-15 14:28:23 +01001236 "an539": config_AN539,
1237 "an524": config_AN524,
Minos Galanakisea421232019-06-20 17:11:28 +01001238 "an521": config_AN521,
Karl Zhang14573bc2020-06-08 09:23:21 +08001239 "an521_psa_api": config_AN521_PSA_API,
1240 "an521_psa_ipc": config_AN521_PSA_IPC,
Minos Galanakisea421232019-06-20 17:11:28 +01001241 "an519": config_AN519,
1242 "musca_a": config_MUSCA_A,
1243 "musca_b1": config_MUSCA_B1,
Karl Zhang96dfe2d2020-05-11 11:31:40 +08001244 "psoc64": config_PSOC64,
Minos Galanakisea421232019-06-20 17:11:28 +01001245 "ipc": config_IPC,
1246 "doxygen": config_doxygen,
Dean Birch4c6ad622020-03-13 11:28:03 +00001247 "debug": config_debug,
Karl Zhangaff558a2020-05-15 14:28:23 +01001248 "release": config_release,
Matthew Hartfb6fd362020-03-04 21:03:59 +00001249 "debug": config_debug,
Karl Zhang14573bc2020-06-08 09:23:21 +08001250
1251 #DevOps team test group
1252 "full_gnuarm": config_full_gnuarm,
Matthew Hartfb6fd362020-03-04 21:03:59 +00001253 "lava_debug": config_lava_debug,
Dean Birchd6ce2c82020-05-13 13:16:15 +01001254 "ci": config_ci,
1255 "ci_gnuarm": config_ci_gnuarm}
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001256
1257if __name__ == '__main__':
1258 import os
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001259
Minos Galanakisea421232019-06-20 17:11:28 +01001260 # Default behavior is to export refference config when called
1261 _dir = os.getcwd()
1262 from utils import save_json
1263 for _cname, _cfg in _builtin_configs.items():
1264 _fname = os.path.join(_dir, _cname + ".json")
1265 print("Exporting config %s" % _fname)
1266 save_json(_fname, _cfg)