blob: b7f89939e4363992a740d650e4fd5e6b3fa3200a [file] [log] [blame]
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001#!/usr/bin/env python3
2
3""" builtin_configs.py:
4
5 Default configuration files used as reference """
6
7from __future__ import print_function
8
9__copyright__ = """
10/*
Xinyu Zhangeb442a12021-02-01 15:16:19 +080011 * Copyright (c) 2018-2021, Arm Limited. All rights reserved.
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +010012 *
13 * SPDX-License-Identifier: BSD-3-Clause
14 *
15 */
16 """
Karl Zhang08681e62020-10-30 13:56:03 +080017
18__author__ = "tf-m@lists.trustedfirmware.org"
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +010019__project__ = "Trusted Firmware-M Open CI"
Karl Zhang08681e62020-10-30 13:56:03 +080020__version__ = "1.2.0"
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +010021
Minos Galanakisea421232019-06-20 17:11:28 +010022# common parameters for tf-m build system
23# This configuration template will be passed into the tfm-builder module after
24# the template evaluation is converted to a command
25
26_common_tfm_builder_cfg = {
27 "config_type": "tf-m",
28 "codebase_root_dir": "tf-m",
29 # Order to which the variants are evaluated. This affects the name of
30 # variant configuration and the wildcard replacement logic in invalid
31 # configuration tuples
Xinyu Zhangb708f572020-09-15 11:43:46 +080032 "sort_order": ["tfm_platform",
33 "toolchain_file",
34 "psa_api",
35 "isolation_level",
36 "test_regression",
37 "test_psa_api",
Minos Galanakisea421232019-06-20 17:11:28 +010038 "cmake_build_type",
Xinyu Zhangb708f572020-09-15 11:43:46 +080039 "with_otp",
40 "with_bl2",
41 "with_ns",
Xinyu Zhang9fd74242020-10-22 11:30:50 +080042 "profile",
43 "partition_ps"],
Minos Galanakisea421232019-06-20 17:11:28 +010044
45 # Keys for the templace will come from the combinations of parameters
46 # provided in the seed dictionary.
47
Xinyu Zhangb708f572020-09-15 11:43:46 +080048 "config_template": "cmake " + \
49 "-DTFM_PLATFORM=%(tfm_platform)s " + \
Fathi Boudra324fee72020-11-20 10:31:12 +010050 "-DTFM_TOOLCHAIN_FILE=%(codebase_root_dir)s/%(toolchain_file)s " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080051 "-DTFM_PSA_API=%(psa_api)s " + \
52 "-DTFM_ISOLATION_LEVEL=%(isolation_level)s " + \
53 "-DTEST_NS=%(test_regression)s -DTEST_S=%(test_regression)s " + \
54 "-DTEST_PSA_API=%(test_psa_api)s " + \
55 "-DCMAKE_BUILD_TYPE=%(cmake_build_type)s " + \
56 "-DCRYPTO_HW_ACCELERATOR_OTP_STATE=%(with_otp)s " + \
57 "-DBL2=%(with_bl2)s " + \
58 "-DNS=%(with_ns)s " + \
59 "-DTFM_TEST_REPO_PATH=%(codebase_root_dir)s/../tf-m-tests " + \
60 "-DMBEDCRYPTO_PATH=%(codebase_root_dir)s/../mbedtls " + \
61 "-DPSA_ARCH_TESTS_PATH=%(codebase_root_dir)s/../psa-arch-tests " + \
62 "-DMCUBOOT_PATH=%(codebase_root_dir)s/../mcuboot " + \
63 "-DTFM_PROFILE=%(profile)s " + \
Xinyu Zhangb5bbb692020-10-26 10:14:33 +080064 "-DTFM_PARTITION_PROTECTED_STORAGE=%(partition_ps)s " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080065 "%(codebase_root_dir)s",
Karl Zhangaff558a2020-05-15 14:28:23 +010066
Minos Galanakisea421232019-06-20 17:11:28 +010067 # A small subset of string substitution params is allowed in commands.
68 # tfm_build_manager will replace %(_tbm_build_dir_)s, %(_tbm_code_dir_)s,
69 # _tbm_target_platform_ with the paths set when building
70
Xinyu Zhangb708f572020-09-15 11:43:46 +080071 "artifact_capture_rex": (r'%(_tbm_build_dir_)s/bin'
Minos Galanakisea421232019-06-20 17:11:28 +010072 r'/(\w+\.(?:axf|bin|hex))$'),
73
74 # ALL commands will be executed for every build.
75 # Other keys will append extra commands when matching target_platform
Fathi Boudra83e4f292020-12-04 22:33:40 +010076 "build_cmds": {"all": ["cmake --build ./ -- install"],
Summer Qin3c2b5722021-05-26 10:43:45 +080077 "arm/musca_b1/sse_200": [("srec_cat "
Mark Horvath8d281cd2020-12-07 15:20:26 +010078 "%(_tbm_build_dir_)s/bin/"
79 "bl2.bin "
80 "-Binary -offset 0xA000000 "
81 "-fill 0xFF 0xA000000 0xA020000 "
82 "%(_tbm_build_dir_)s/bin/"
83 "tfm_s_ns_signed.bin "
84 "-Binary -offset 0xA020000 "
85 "-fill 0xFF 0xA020000 0xA200000 "
86 "-o %(_tbm_build_dir_)s/bin/"
87 "tfm.hex -Intel")],
Summer Qin3c2b5722021-05-26 10:43:45 +080088 "arm/musca_s1": [("srec_cat "
Xinyu Zhangb708f572020-09-15 11:43:46 +080089 "%(_tbm_build_dir_)s/bin/"
90 "bl2.bin "
Karl Zhangeffed972020-06-30 15:48:01 +080091 "-Binary -offset 0xA000000 "
Raef Coles543aab32020-12-03 11:12:02 +000092 "-fill 0xFF 0xA000000 0xA020000 "
Xinyu Zhangb708f572020-09-15 11:43:46 +080093 "%(_tbm_build_dir_)s/bin/"
Xinyu Zhang694eb492020-11-04 18:29:08 +080094 "tfm_s_ns_signed.bin "
Raef Coles543aab32020-12-03 11:12:02 +000095 "-Binary -offset 0xA020000 "
96 "-fill 0xFF 0xA020000 0xA200000 "
97 "-o %(_tbm_build_dir_)s/bin/"
Arthur She19c0e1a2021-06-02 11:06:19 -070098 "tfm.hex -Intel")],
99 "stm/stm32l562e_dk": [("echo 'STM32L562E-DK board post process';"
100 "%(_tbm_build_dir_)s/postbuild.sh;"
101 "pushd %(_tbm_build_dir_)s;"
102 "sed 's/^echo/#echo/; s/.*\$BINPATH/echo $BINPATH/; s/ -v//' TFM_UPDATE.sh > fwlayout.sh;"
103 "chmod a+x fwlayout.sh;"
104 "./fwlayout.sh | sed s:%(_tbm_build_dir_)s/:: | tee ./bin/layout.txt;"
105 "awk '{print $1}' bin/layout.txt | xargs tar jcf ./bin/stm32l562e-dk-tfm.tar.bz2; popd")]
Minos Galanakisea421232019-06-20 17:11:28 +0100106 },
107
108 # (Optional) If set will fail if those artefacts are missing post build
109 "required_artefacts": {"all": [
Xinyu Zhangb708f572020-09-15 11:43:46 +0800110 "%(_tbm_build_dir_)s/bin/"
111 "tfm_s.bin",
112 "%(_tbm_build_dir_)s/bin/"
113 "tfm_ns.bin"],
Summer Qin3c2b5722021-05-26 10:43:45 +0800114 "arm/musca_b1/sse_200": [
Xinyu Zhangb708f572020-09-15 11:43:46 +0800115 "%(_tbm_build_dir_)s/bin/"
116 "tfm.hex",
117 "%(_tbm_build_dir_)s/bin/"
Xinyu Zhang694eb492020-11-04 18:29:08 +0800118 "bl2.bin",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800119 "%(_tbm_build_dir_)s/bin/"
120 "tfm_sign.bin"],
Summer Qin3c2b5722021-05-26 10:43:45 +0800121 "arm/musca_s1": [
Xinyu Zhangb708f572020-09-15 11:43:46 +0800122 "%(_tbm_build_dir_)s/bin/"
123 "tfm.hex",
124 "%(_tbm_build_dir_)s/bin/"
Xinyu Zhang694eb492020-11-04 18:29:08 +0800125 "bl2.bin",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800126 "%(_tbm_build_dir_)s/bin/"
127 "tfm_sign.bin"]
Minos Galanakisea421232019-06-20 17:11:28 +0100128 }
129}
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100130
Xinyu Zhangb708f572020-09-15 11:43:46 +0800131# List of all build configs that are impossible under all circumstances
132_common_tfm_invalid_configs = [
Karl Zhangc858a722021-03-22 21:38:19 +0800133 # Load range overlap on Musca for IPC Debug type: T895
Summer Qin3c2b5722021-05-26 10:43:45 +0800134 ("arm/musca_b1/sse_200", "toolchain_ARMCLANG.cmake", "*", "*", "*", "IPC", "Debug", "*", "*", "*", "*", "*"),
135 ("arm/musca_s1", "toolchain_ARMCLANG.cmake", "*", "*", "*", "IPC", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800136 # LVL2 and LVL3 requires PSA api
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800137 ("*", "*", False, "2", "*", "*", "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800138 ("*", "*", False, "3", "*", "*", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800139 # Regression requires NS
140 ("*", "*", "*", "*", True, "*", "*", "*", "*", False, "*", "*"),
Xinyu Zhang11d66112020-11-04 15:38:29 +0800141 # psoc64 requires PSA api
142 ("cypress/psoc64", "*", False, "*", "*", "*", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800143 # No PSA_ACK with regression
144 ("*", "*", "*", "*", True, "IPC", "*", "*", "*", "*", "*", "*"),
145 ("*", "*", "*", "*", True, "CRYPTO", "*", "*", "*", "*", "*", "*"),
146 ("*", "*", "*", "*", True, "PROTECTED_STORAGE", "*", "*", "*", "*", "*", "*"),
147 ("*", "*", "*", "*", True, "INITIAL_ATTESTATION", "*", "*", "*", "*", "*", "*"),
148 ("*", "*", "*", "*", True, "INTERNAL_TRUSTED_STORAGE", "*", "*", "*", "*", "*", "*"),
149 # PSA_ACK requires NS
150 ("*", "*", "*", "*", "*", "IPC", "*", "*", "*", False, "*", "*"),
151 ("*", "*", "*", "*", "*", "CRYPTO", "*", "*", "*", False, "*", "*"),
152 ("*", "*", "*", "*", "*", "PROTECTED_STORAGE", "*", "*", "*", False, "*", "*"),
153 ("*", "*", "*", "*", "*", "INITIAL_ATTESTATION", "*", "*", "*", False, "*", "*"),
154 ("*", "*", "*", "*", "*", "INTERNAL_TRUSTED_STORAGE", "*", "*", "*", False, "*", "*"),
Xinyu Zhang3227da42021-03-19 17:37:17 +0800155 # PSA_ACK does not support LVL3
156 ("*", "*", "*", "3", "*", "IPC", "*", "*", "*", "*", "*", "*"),
157 ("*", "*", "*", "3", "*", "CRYPTO", "*", "*", "*", "*", "*", "*"),
158 ("*", "*", "*", "3", "*", "PROTECTED_STORAGE", "*", "*", "*", "*", "*", "*"),
159 ("*", "*", "*", "3", "*", "INITIAL_ATTESTATION", "*", "*", "*", "*", "*", "*"),
160 ("*", "*", "*", "3", "*", "INTERNAL_TRUSTED_STORAGE", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800161 # Musca requires BL2
Summer Qin3c2b5722021-05-26 10:43:45 +0800162 ("arm/musca_b1/sse_200", "*", "*", "*", "*", "*", "*", "*", False, "*", "*", "*"),
163 ("arm/musca_s1", "*", "*", "*", "*", "*", "*", "*", False, "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800164 # psoc64 cannot use BL2
165 ("cypress/psoc64", "*", "*", "*", "*", "*", "*", "*", True, "*", "*", "*"),
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800166 # psoc64 does not support Debug build type
167 ("cypress/psoc64", "*", "*", "*", "*", "*", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800168 # Musca b1 does not support Profile S
Summer Qin3c2b5722021-05-26 10:43:45 +0800169 ("arm/musca_b1/sse_200", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_small", "*"),
Mark Horvath8d281cd2020-12-07 15:20:26 +0100170 # Musca B1 Secure Enclave requires PSA api, BL2, and supports only Isolation Level 1
Summer Qin3c2b5722021-05-26 10:43:45 +0800171 ("arm/musca_b1/secure_enclave", "*", False, "*", "*", "*", "*", "*", "*", "*", "*", "*"),
172 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "*", "*", "*", False, "*", "*", "*"),
173 ("arm/musca_b1/secure_enclave", "*", "*", "2", "*", "*", "*", "*", "*", "*", "*", "*"),
Mark Horvath8d281cd2020-12-07 15:20:26 +0100174 # Musca B1 Secure Enclave does not support tests, profiles, NS side building
Summer Qin3c2b5722021-05-26 10:43:45 +0800175 ("arm/musca_b1/secure_enclave", "*", "*", "*", True, "*", "*", "*", "*", "*", "*", "*"),
176 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "IPC", "*", "*", "*", "*", "*", "*"),
177 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "CRYPTO", "*", "*", "*", "*", "*", "*"),
178 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "PROTECTED_STORAGE", "*", "*", "*", "*", "*", "*"),
179 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "INITIAL_ATTESTATION", "*", "*", "*", "*", "*", "*"),
180 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "INTERNAL_TRUSTED_STORAGE", "*", "*", "*", "*", "*", "*"),
181 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_small", "*"),
182 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_medium", "*"),
183 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "*", "*", "*", "*", True, "*", "*"),
Xinyu Zhang709c1542020-11-02 18:41:07 +0800184 # PARTITION_PS could be OFF only for Profile S and M
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800185 ("*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "", "OFF"),
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800186 ("*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_large", "OFF"),
Xinyu Zhang709c1542020-11-02 18:41:07 +0800187 # PARTITION_PS should be OFF for Profile S
188 ("*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_small", "ON"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800189 # Proile M only support for PSA_API
190 ("*", "*", False, "*", "*", "*", "*", "*", "*", "*", "profile_medium", "*"),
191 # Profile M only support for Isolation Level 2
192 ("*", "*", "*", "1", "*", "*", "*", "*", "*", "*", "profile_medium", "*"),
Xinyu Zhange8de4512020-11-13 10:37:56 +0800193 ("*", "*", "*", "3", "*", "*", "*", "*", "*", "*", "profile_medium", "*"),
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800194 # Profile L only support for Isolation Level 3
195 ("*", "*", "*", "1", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
196 ("*", "*", "*", "2", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800197 # Profile S does not support PSA_API
198 ("*", "*", True, "*", "*", "*", "*", "*", "*", "*", "profile_small", "*"),
199 # Profile S only supports Isolation Level 2
200 ("*", "*", "*", "2", "*", "*", "*", "*", "*", "*", "profile_small", "*"),
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800201 # Only AN521 and MUSCA_B1 support Isolation Level 3
Summer Qin3c2b5722021-05-26 10:43:45 +0800202 ("arm/mps2/an519", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
203 ("arm/mps3/an524", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
204 ("arm/musca_s1", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800205 ("cypress/psoc64", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800206 ("arm/musca_b1/secure_enclave", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
Arthur She19c0e1a2021-06-02 11:06:19 -0700207 # stm/stm32l562e_dk uses BL2
208 ("stm/stm32l562e_dk", "*", "*", "*", "*", "*", "*", "*", False, "*", "*", "*"),
209 # stm/stm32l562e_dk does not support Debug build type
210 ("stm/stm32l562e_dk", "*", "*", "*", "*", "*", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800211 ]
212
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100213# Configure build manager to build several combinations
Karl Zhangaff558a2020-05-15 14:28:23 +0100214config_AN524 = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800215 "tfm_platform": ["arm/mps3/an524"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800216 "toolchain_file": ["toolchain_GNUARM.cmake",
217 "toolchain_ARMCLANG.cmake"],
218 "psa_api": [True, False],
219 "isolation_level": ["1", "2"],
220 "test_regression": [True, False],
221 "test_psa_api": ["OFF"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100222 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800223 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800224 "with_bl2": [True, False],
225 "with_ns": [True, False],
226 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800227 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100228 },
229 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800230 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100231 }
232
Karl Zhangaff558a2020-05-15 14:28:23 +0100233config_AN521 = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800234 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800235 "toolchain_file": ["toolchain_GNUARM.cmake",
236 "toolchain_ARMCLANG.cmake"],
237 "psa_api": [True, False],
238 "isolation_level": ["1", "2"],
239 "test_regression": [True, False],
240 "test_psa_api": ["OFF"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100241 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800242 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800243 "with_bl2": [True, False],
244 "with_ns": [True, False],
245 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800246 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100247 },
248 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800249 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100250 }
251
Karl Zhangaff558a2020-05-15 14:28:23 +0100252config_PSA_API = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800253 "tfm_platform": ["arm/mps2/an521", "arm/musca_b1/sse_200",
254 "arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800255 "toolchain_file": ["toolchain_GNUARM.cmake",
256 "toolchain_ARMCLANG.cmake"],
257 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800258 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800259 "test_regression": [False],
260 "test_psa_api": ["CRYPTO",
261 "PROTECTED_STORAGE",
262 "INITIAL_ATTESTATION",
263 "INTERNAL_TRUSTED_STORAGE"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100264 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800265 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800266 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800267 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800268 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800269 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100270 },
271 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800272 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100273 }
274
Karl Zhangaff558a2020-05-15 14:28:23 +0100275config_PSA_FF = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800276 "tfm_platform": ["arm/mps2/an521", "arm/musca_b1/sse_200",
277 "arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800278 "toolchain_file": ["toolchain_GNUARM.cmake",
279 "toolchain_ARMCLANG.cmake"],
280 "psa_api": [True],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800281 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800282 "test_regression": [False],
283 "test_psa_api": ["IPC"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100284 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800285 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800286 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800287 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800288 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800289 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100290 },
291 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800292 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100293 }
294
Karl Zhangaff558a2020-05-15 14:28:23 +0100295config_PSA_API_OTP = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800296 "tfm_platform": ["arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800297 "toolchain_file": ["toolchain_GNUARM.cmake",
298 "toolchain_ARMCLANG.cmake"],
299 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800300 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800301 "test_regression": [False],
302 "test_psa_api": ["CRYPTO",
303 "PROTECTED_STORAGE",
304 "INITIAL_ATTESTATION",
305 "INTERNAL_TRUSTED_STORAGE"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100306 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800307 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800308 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800309 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800310 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800311 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100312 },
313 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800314 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100315 }
Minos Galanakisea421232019-06-20 17:11:28 +0100316
Xinyu Zhangb708f572020-09-15 11:43:46 +0800317config_PSA_FF_OTP = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800318 "tfm_platform": ["arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800319 "toolchain_file": ["toolchain_GNUARM.cmake",
320 "toolchain_ARMCLANG.cmake"],
321 "psa_api": [True],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800322 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800323 "test_regression": [False],
324 "test_psa_api": ["IPC"],
325 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800326 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800327 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800328 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800329 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800330 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800331 },
332 "common_params": _common_tfm_builder_cfg,
333 "invalid": _common_tfm_invalid_configs + []
334 }
335
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800336config_PSOC64 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800337 "tfm_platform": ["cypress/psoc64"],
338 "toolchain_file": ["toolchain_GNUARM.cmake",
339 "toolchain_ARMCLANG.cmake"],
340 "psa_api": [True],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800341 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800342 "test_regression": [True],
343 "test_psa_api": ["OFF"],
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800344 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800345 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800346 "with_bl2": [False],
347 "with_ns": [True, False],
348 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800349 "partition_ps": ["ON"],
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800350 },
351 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800352 "invalid": _common_tfm_invalid_configs + []
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800353 }
354
Arthur She19c0e1a2021-06-02 11:06:19 -0700355config_STM32L562E_DK = {"seed_params": {
356 "tfm_platform": ["stm/stm32l562e_dk"],
357 "toolchain_file": ["toolchain_GNUARM.cmake",
358 "toolchain_ARMCLANG.cmake"],
359 "psa_api": [True, False],
360 "isolation_level": ["1", "2", "3"],
361 "test_regression": [True],
362 "test_psa_api": ["OFF"],
363 "cmake_build_type": ["Release"],
364 "with_otp": ["off"],
365 "with_bl2": [True],
366 "with_ns": [True],
367 "profile": [""],
368 "partition_ps": ["ON"],
369 },
370 "common_params": _common_tfm_builder_cfg,
371 "invalid": _common_tfm_invalid_configs + []
372 }
373
Minos Galanakisea421232019-06-20 17:11:28 +0100374config_AN519 = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800375 "tfm_platform": ["arm/mps2/an519"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800376 "toolchain_file": ["toolchain_GNUARM.cmake",
377 "toolchain_ARMCLANG.cmake"],
378 "psa_api": [True, False],
379 "isolation_level": ["1", "2"],
380 "test_regression": [True, False],
381 "test_psa_api": ["OFF"],
Minos Galanakisea421232019-06-20 17:11:28 +0100382 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800383 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800384 "with_bl2": [True, False],
385 "with_ns": [True, False],
386 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800387 "partition_ps": ["ON"],
Minos Galanakisea421232019-06-20 17:11:28 +0100388 },
389 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800390 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +0100391 }
392
Xinyu Zhangb708f572020-09-15 11:43:46 +0800393config_IPC = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800394 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
395 "arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800396 "toolchain_file": ["toolchain_GNUARM.cmake",
397 "toolchain_ARMCLANG.cmake"],
398 "psa_api": [True],
399 "isolation_level": ["1", "2"],
400 "test_regression": [True, False],
401 "test_psa_api": ["OFF"],
402 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800403 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800404 "with_bl2": [True, False],
405 "with_ns": [True, False],
406 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800407 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800408 },
Minos Galanakisea421232019-06-20 17:11:28 +0100409 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800410 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +0100411 }
412
Minos Galanakisea421232019-06-20 17:11:28 +0100413config_full = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800414 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
415 "arm/musca_b1/sse_200",
416 "arm/mps3/an524", "cypress/psoc64",
Arthur She19c0e1a2021-06-02 11:06:19 -0700417 "arm/musca_b1/secure_enclave",
418 "stm/stm32l562e_dk"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800419 "toolchain_file": ["toolchain_GNUARM.cmake",
420 "toolchain_ARMCLANG.cmake"],
421 "psa_api": [True, False],
422 "isolation_level": ["1", "2"],
423 "test_regression": [True, False],
424 "test_psa_api": ["OFF"],
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800425 "cmake_build_type": ["Debug", "Release", "RelWithDebInfo"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800426 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800427 "with_bl2": [True, False],
428 "with_ns": [True, False],
429 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800430 "partition_ps": ["ON"],
Dean Birchd6ce2c82020-05-13 13:16:15 +0100431 },
432 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800433 "invalid": _common_tfm_invalid_configs + [
434 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800435 "*", "*", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800436 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800437 "*", "*", "*", "*", True, True, "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800438 ("arm/mps2/an521", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800439 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800440 ("arm/mps2/an519", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800441 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800442 ("arm/musca_b1/sse_200", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800443 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800444 ("arm/mps3/an524", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800445 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800446 ]
Karl Zhang81a76772020-05-11 18:28:52 +0800447 }
448
Karl Zhangaff558a2020-05-15 14:28:23 +0100449config_tfm_test = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800450 "tfm_platform": ["arm/mps2/an521",
451 "arm/musca_b1/sse_200", "arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800452 "toolchain_file": ["toolchain_ARMCLANG.cmake",
453 "toolchain_GNUARM.cmake"],
454 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800455 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800456 "test_regression": [True, False],
457 "test_psa_api": ["OFF"],
458 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800459 "with_otp": ["off"],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800460 "with_bl2": [True],
461 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800462 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800463 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800464 },
465 "common_params": _common_tfm_builder_cfg,
466 "invalid": _common_tfm_invalid_configs + []
467 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800468
Karl Zhangaff558a2020-05-15 14:28:23 +0100469config_tfm_test2 = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800470 "tfm_platform": ["arm/mps2/an519", "arm/mps3/an524"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800471 "toolchain_file": ["toolchain_ARMCLANG.cmake",
472 "toolchain_GNUARM.cmake"],
473 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800474 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800475 "test_regression": [True, False],
476 "test_psa_api": ["OFF"],
477 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800478 "with_otp": ["off"],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800479 "with_bl2": [True],
480 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800481 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800482 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800483 },
484 "common_params": _common_tfm_builder_cfg,
485 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800486 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800487 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800488 ]
489 }
Karl Zhangaff558a2020-05-15 14:28:23 +0100490
Karl Zhang14573bc2020-06-08 09:23:21 +0800491config_tfm_profile = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800492 "tfm_platform": ["arm/mps2/an519", "arm/mps2/an521",
493 "arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800494 "toolchain_file": ["toolchain_ARMCLANG.cmake",
495 "toolchain_GNUARM.cmake"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800496 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800497 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800498 "test_regression": [True, False],
499 "test_psa_api": ["OFF"],
500 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800501 "with_otp": ["off"],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800502 "with_bl2": [True],
503 "with_ns": [True],
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800504 "profile": ["profile_small", "profile_medium", "profile_large"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800505 "partition_ps": ["ON", "OFF"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800506 },
507 "common_params": _common_tfm_builder_cfg,
508 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800509 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800510 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800511 # Profile Large is only supported by AN521
Summer Qin3c2b5722021-05-26 10:43:45 +0800512 ("arm/mps2/an519", "*", "*",
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800513 "*", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800514 ("arm/musca_b1/sse_200", "*", "*",
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800515 "*", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800516 ]
517 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800518
Karl Zhangaff558a2020-05-15 14:28:23 +0100519config_tfm_test_OTP = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800520 "tfm_platform": ["arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800521 "toolchain_file": ["toolchain_ARMCLANG.cmake",
522 "toolchain_GNUARM.cmake"],
523 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800524 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800525 "test_regression": [True, False],
526 "test_psa_api": ["OFF"],
527 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800528 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800529 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800530 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800531 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800532 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800533 },
534 "common_params": _common_tfm_builder_cfg,
535 "invalid": _common_tfm_invalid_configs + []
536 }
Karl Zhangaff558a2020-05-15 14:28:23 +0100537
Minos Galanakisea421232019-06-20 17:11:28 +0100538config_MUSCA_B1 = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800539 "tfm_platform": ["arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800540 "toolchain_file": ["toolchain_ARMCLANG.cmake",
541 "toolchain_GNUARM.cmake"],
542 "psa_api": [True, False],
543 "isolation_level": ["1", "2"],
544 "test_regression": [True, False],
545 "test_psa_api": ["OFF"],
546 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800547 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800548 "with_bl2": [True],
549 "with_ns": [True, False],
550 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800551 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800552 },
553 "common_params": _common_tfm_builder_cfg,
554 "invalid": _common_tfm_invalid_configs + []
555 }
Minos Galanakisea421232019-06-20 17:11:28 +0100556
Mark Horvath8d281cd2020-12-07 15:20:26 +0100557config_MUSCA_B1_SE = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800558 "tfm_platform": ["arm/musca_b1/secure_enclave"],
Mark Horvath8d281cd2020-12-07 15:20:26 +0100559 "toolchain_file": ["toolchain_ARMCLANG.cmake",
560 "toolchain_GNUARM.cmake"],
561 "psa_api": [True],
562 "isolation_level": ["1"],
563 "test_regression": [False],
564 "test_psa_api": ["OFF"],
565 "cmake_build_type": ["Debug", "Release"],
566 "with_otp": ["off"],
567 "with_bl2": [True],
568 "with_ns": [False],
569 "profile": [""],
570 "partition_ps": ["ON"],
571 },
572 "common_params": _common_tfm_builder_cfg,
573 "invalid": _common_tfm_invalid_configs + []
574 }
575
Karl Zhangeffed972020-06-30 15:48:01 +0800576config_MUSCA_S1 = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800577 "tfm_platform": ["arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800578 "toolchain_file": ["toolchain_ARMCLANG.cmake",
579 "toolchain_GNUARM.cmake"],
580 "psa_api": [True, False],
581 "isolation_level": ["1", "2"],
582 "test_regression": [True, False],
583 "test_psa_api": ["OFF"],
584 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800585 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800586 "with_bl2": [True],
587 "with_ns": [True, False],
588 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800589 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800590 },
591 "common_params": _common_tfm_builder_cfg,
592 "invalid": _common_tfm_invalid_configs + []
593 }
Karl Zhangeffed972020-06-30 15:48:01 +0800594
Karl Zhangaff558a2020-05-15 14:28:23 +0100595config_release = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800596 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
597 "arm/musca_b1/sse_200", "arm/musca_s1",
598 "arm/mps3/an524"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800599 "toolchain_file": ["toolchain_ARMCLANG.cmake",
600 "toolchain_GNUARM.cmake"],
601 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800602 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800603 "test_regression": [True, False],
604 "test_psa_api": ["OFF"],
605 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800606 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800607 "with_bl2": [True, False],
608 "with_ns": [True, False],
609 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800610 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800611 },
612 "common_params": _common_tfm_builder_cfg,
613 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800614 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800615 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800616 ]
617 }
Karl Zhangaff558a2020-05-15 14:28:23 +0100618
619# Configure build manager to build several combinations
620config_AN521_PSA_API = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800621 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
622 "arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800623 "toolchain_file": ["toolchain_GNUARM.cmake",
624 "toolchain_ARMCLANG.cmake"],
625 "psa_api": [True, False],
626 "isolation_level": ["1", "2"],
627 "test_regression": [False],
628 "test_psa_api": ["IPC",
629 "CRYPTO",
630 "PROTECTED_STORAGE",
631 "INITIAL_ATTESTATION",
632 "INTERNAL_TRUSTED_STORAGE"],
633 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800634 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800635 "with_bl2": [True],
636 "with_ns": [True, False],
637 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800638 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100639 },
640 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800641 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800642 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800643 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800644 ]
Karl Zhangaff558a2020-05-15 14:28:23 +0100645 }
646
Karl Zhangaff558a2020-05-15 14:28:23 +0100647config_AN521_PSA_IPC = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800648 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
649 "arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800650 "toolchain_file": ["toolchain_GNUARM.cmake",
651 "toolchain_ARMCLANG.cmake"],
652 "psa_api": [True],
653 "isolation_level": ["1", "2"],
654 "test_regression": [False],
655 "test_psa_api": ["IPC"],
656 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800657 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800658 "with_bl2": [True],
659 "with_ns": [True, False],
660 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800661 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100662 },
663 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800664 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800665 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800666 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800667 ]
Karl Zhangaff558a2020-05-15 14:28:23 +0100668 }
669
Karl Zhang14573bc2020-06-08 09:23:21 +0800670config_nightly = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800671 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
672 "arm/musca_b1/sse_200", "arm/musca_s1",
673 "arm/mps3/an524", "cypress/psoc64",
Arthur She19c0e1a2021-06-02 11:06:19 -0700674 "arm/musca_b1/secure_enclave",
675 "stm/stm32l562e_dk"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800676 "toolchain_file": ["toolchain_GNUARM.cmake",
677 "toolchain_ARMCLANG.cmake"],
678 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800679 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800680 "test_regression": [True, False],
681 "test_psa_api": ["OFF"],
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800682 "cmake_build_type": ["Debug", "Release", "Minsizerel", "RelWithDebInfo"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800683 "with_otp": ["off"],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800684 "with_bl2": [True],
685 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800686 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800687 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800688 },
689 "common_params": _common_tfm_builder_cfg,
690 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800691 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800692 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800693 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800694 "*", "*", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800695 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800696 "*", "*", "*", "*", True, True, "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800697 ("arm/mps2/an521", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800698 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800699 ("arm/mps2/an519", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800700 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800701 ("arm/musca_b1/sse_200", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800702 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800703 ("arm/musca_s1", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800704 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800705 ("arm/mps3/an524", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800706 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800707 ]
708 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800709
Karl Zhang14573bc2020-06-08 09:23:21 +0800710config_nightly_profile = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800711 "tfm_platform": ["arm/mps2/an519", "arm/mps2/an521",
712 "arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800713 "toolchain_file": ["toolchain_ARMCLANG.cmake",
714 "toolchain_GNUARM.cmake"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800715 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800716 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800717 "test_regression": [True, False],
718 "test_psa_api": ["OFF"],
719 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800720 "with_otp": ["off"],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800721 "with_bl2": [True],
722 "with_ns": [True],
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800723 "profile": ["profile_small", "profile_medium", "profile_large"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800724 "partition_ps": ["ON", "OFF"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800725 },
726 "common_params": _common_tfm_builder_cfg,
727 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800728 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800729 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800730 # Profile Large is only supported by AN521
Summer Qin3c2b5722021-05-26 10:43:45 +0800731 ("arm/mps2/an519", "*", "*",
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800732 "*", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800733 ("arm/musca_b1/sse_200", "*", "*",
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800734 "*", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800735 ]
736 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800737
Karl Zhang14573bc2020-06-08 09:23:21 +0800738config_nightly_PSA_API = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800739 "tfm_platform": ["arm/mps2/an521", "arm/musca_b1/sse_200",
740 "arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800741 "toolchain_file": ["toolchain_GNUARM.cmake",
742 "toolchain_ARMCLANG.cmake"],
743 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800744 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800745 "test_regression": [False],
746 "test_psa_api": ["CRYPTO",
747 "PROTECTED_STORAGE",
748 "INITIAL_ATTESTATION",
749 "INTERNAL_TRUSTED_STORAGE"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800750 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800751 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800752 "with_bl2": [True],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800753 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800754 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800755 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800756 },
757 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800758 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800759 }
760
Karl Zhang14573bc2020-06-08 09:23:21 +0800761config_nightly_PSA_FF = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800762 "tfm_platform": ["arm/mps2/an521", "arm/musca_b1/sse_200",
763 "arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800764 "toolchain_file": ["toolchain_GNUARM.cmake",
765 "toolchain_ARMCLANG.cmake"],
766 "psa_api": [True],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800767 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800768 "test_regression": [False],
769 "test_psa_api": ["IPC"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800770 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800771 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800772 "with_bl2": [True],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800773 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800774 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800775 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800776 },
777 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800778 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800779 }
780
Karl Zhang14573bc2020-06-08 09:23:21 +0800781config_nightly_OTP = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800782 "tfm_platform": ["arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800783 "toolchain_file": ["toolchain_GNUARM.cmake",
784 "toolchain_ARMCLANG.cmake"],
785 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800786 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800787 "test_regression": [True],
788 "test_psa_api": ["OFF"],
789 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800790 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800791 "with_bl2": [True],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800792 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800793 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800794 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800795 },
796 "common_params": _common_tfm_builder_cfg,
797 "invalid": _common_tfm_invalid_configs + []
798 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800799
Xinyu Zhangfd70cfe2021-06-29 11:14:13 +0800800config_nightly_STM32L562E_DK = {"seed_params": {
801 "tfm_platform": ["stm/stm32l562e_dk"],
802 "toolchain_file": ["toolchain_GNUARM.cmake",
803 "toolchain_ARMCLANG.cmake"],
804 "psa_api": [True, False],
805 "isolation_level": ["1", "2", "3"],
806 "test_regression": [True],
807 "test_psa_api": ["OFF"],
808 "cmake_build_type": ["Release"],
809 "with_otp": ["off"],
810 "with_bl2": [True],
811 "with_ns": [True],
812 "profile": [""],
813 "partition_ps": ["ON"],
814 },
815 "common_params": _common_tfm_builder_cfg,
816 "invalid": _common_tfm_invalid_configs + []
817 }
818
Karl Zhang14573bc2020-06-08 09:23:21 +0800819config_pp_test = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800820 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
Xinyu Zhangd1ef9982021-06-24 11:31:11 +0800821 "arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800822 "toolchain_file": ["toolchain_GNUARM.cmake",
823 "toolchain_ARMCLANG.cmake"],
824 "psa_api": [True, False],
Karl Zhangde36b772021-01-08 10:17:03 +0800825 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800826 "test_regression": [True],
827 "test_psa_api": ["OFF"],
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800828 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800829 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800830 "with_bl2": [True],
831 "with_ns": [True, False],
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800832 "profile": ["", "profile_small", "profile_medium"],
833 "partition_ps": ["ON", "OFF"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800834 },
835 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800836 "valid": [
Summer Qin3c2b5722021-05-26 10:43:45 +0800837 ("arm/mps2/an521", "toolchain_GNUARM.cmake",
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800838 False, "1", False, "OFF", "Debug",
839 "off", True, True, "", "ON"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800840 ("arm/mps2/an521", "toolchain_ARMCLANG.cmake",
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800841 True, "2", False, "OFF", "Debug",
842 "off", True, True, "", "ON"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800843 ("arm/mps2/an521", "toolchain_ARMCLANG.cmake",
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800844 True, "3", False, "OFF", "Release",
845 "off", True, True, "", "ON"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800846 ("arm/mps2/an521", "toolchain_GNUARM.cmake",
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800847 True, "2", False, "OFF", "Debug",
848 "off", True, True, "profile_medium", "ON"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800849 ("arm/mps2/an521", "toolchain_GNUARM.cmake",
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800850 True, "3", False, "OFF", "Debug",
851 "off", True, True, "profile_large", "ON"),
Xinyu Zhangd1ef9982021-06-24 11:31:11 +0800852 # AN521_GNUARM_PSA_2_REG_Release_BL2_NS_MEDIUM_PSOFF
853 ("arm/mps2/an521", "toolchain_GNUARM.cmake", True,
854 "2", True, "OFF", "Release", "off", True, True, "profile_medium", "OFF"),
855 # MUSCA_B1_ARMCLANG_PSA_3_REG_Debug_BL2_NS
856 ("arm/musca_b1/sse_200", "toolchain_ARMCLANG.cmake",True,
857 "3", True, "OFF", "Debug", "off", True, True, "", "ON"),
858 # MUSCA_B1_GNUARM_1_REG_Minsizerel_BL2_NS
859 ("arm/musca_b1/sse_200", "toolchain_GNUARM.cmake", False,
860 "1", True, "OFF", "Minsizerel", "off", True, True, "", "ON"),
861 # stm32l562e_dk_ARMCLANG_PSA_1_REG_Release_BL2_NS
862 ("stm/stm32l562e_dk", "toolchain_ARMCLANG.cmake", True,
863 "1", True, "OFF", "Release", "off", True, True, "", "ON"),
864 # stm32l562e_dk_GNUARM_PSA_2_REG_Release_BL2_NS
865 ("stm/stm32l562e_dk", "toolchain_GNUARM.cmake", True,
866 "2", True, "OFF", "Release", "off", True, True, "", "ON"),
867 # stm32l562e_dk_GNUARM_PSA_3_REG_Release_BL2_NS
868 ("stm/stm32l562e_dk", "toolchain_GNUARM.cmake", True,
869 "3", True, "OFF", "Release", "off", True, True, "", "ON"),
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800870 ],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800871 "invalid": _common_tfm_invalid_configs + [
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800872 # invalid configs that are not supported by TF-M
Summer Qin3c2b5722021-05-26 10:43:45 +0800873 ("arm/musca_s1", "*", "*", "*", "*", "*",
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800874 "*", "*", "*", "*", "profile_medium", "*"),
875 # valid configs supported by TF-M but not needed in per-patch
876 ("*", "*", "*", "1", "*", "*", "Release",
877 "*", "*", "*", "*", "*"),
878 ("*", "*", "*", "1", "*", "*", "Minsizerel",
879 "*", "*", "*", "*", "*"),
880 ("*", "*", "*", "2", "*", "*", "Debug",
881 "*", "*", "*", "*", "*"),
882 ("*", "*", "*", "2", "*", "*", "Minsizerel",
883 "*", "*", "*", "*", "*"),
884 ("*", "*", "*", "3", "*", "*", "Debug",
885 "*", "*", "*", "*", "*"),
886 ("*", "*", "*", "3", "*", "*", "Release",
887 "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800888 ("arm/mps2/an519", "*", "*", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800889 "*", "*", "*", "*", "profile_small", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800890 ("arm/musca_s1", "*", "*", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800891 "*", "*", "*", "*", "profile_small", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800892 ("arm/mps2/an519", "*", "*", "*", "*", "*",
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800893 "*", "*", "*", "*", "profile_medium", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800894 ("arm/mps2/an521", "*", "*", "*", "*", "*",
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800895 "*", "*", "*", "*", "profile_medium", "*"),
896 ("*", "toolchain_GNUARM.cmake", "*", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800897 "*", "*", "*", "*", "profile_small", "*"),
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800898 ("*", "toolchain_ARMCLANG.cmake", "*", "*", "*", "*",
899 "*", "*", "*", "*", "profile_medium", "*"),
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800900 ("*", "toolchain_ARMCLANG.cmake", False, "*", "*", "*",
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800901 "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800902 ]
903 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800904
Karl Zhang14573bc2020-06-08 09:23:21 +0800905config_pp_OTP = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800906 "tfm_platform": ["arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800907 "toolchain_file": ["toolchain_GNUARM.cmake"],
908 "psa_api": [True, False],
909 "isolation_level": ["1", "2"],
910 "test_regression": [True],
911 "test_psa_api": ["OFF"],
912 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800913 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800914 "with_bl2": [True],
915 "with_ns": [True, False],
916 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800917 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800918 },
919 "common_params": _common_tfm_builder_cfg,
920 "invalid": _common_tfm_invalid_configs + []
921 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800922
923# Configure build manager to build several combinations
924config_pp_PSA_API = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800925 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800926 "toolchain_file": ["toolchain_GNUARM.cmake"],
927 "psa_api": [True],
928 "isolation_level": ["2"],
929 "test_regression": [False],
930 "test_psa_api": ["IPC",
931 "CRYPTO",
932 "PROTECTED_STORAGE",
933 "INITIAL_ATTESTATION",
934 "INTERNAL_TRUSTED_STORAGE"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800935 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800936 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800937 "with_bl2": [True],
938 "with_ns": [True, False],
939 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800940 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800941 },
942 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800943 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800944 }
945
Karl Zhang14573bc2020-06-08 09:23:21 +0800946config_pp_PSoC64 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800947 "tfm_platform": ["cypress/psoc64"],
948 "toolchain_file": ["toolchain_GNUARM.cmake"],
949 "psa_api": [True],
950 "isolation_level": ["1", "2"],
951 "test_regression": [True],
952 "test_psa_api": ["OFF"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800953 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800954 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800955 "with_bl2": [False],
956 "with_ns": [True, False],
957 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800958 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800959 },
960 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800961 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800962 }
963
Xinyu Zhangf25856a2021-06-17 14:06:46 +0800964config_cov_an519 = {"seed_params": {
965 "tfm_platform": ["arm/mps2/an519"],
966 "toolchain_file": ["toolchain_GNUARM.cmake"],
967 "psa_api": [True, False],
968 "isolation_level": ["1", "2", "3"],
969 "test_regression": [True, False],
970 "test_psa_api": ["OFF"],
971 "cmake_build_type": ["Debug", "Release"],
972 "with_otp": ["off"],
973 "with_bl2": [True],
974 "with_ns": [True],
975 "profile": ["", "profile_small", "profile_medium"],
976 "partition_ps": ["ON", "OFF"],
977 },
978 "common_params": _common_tfm_builder_cfg,
979 "invalid": _common_tfm_invalid_configs + []
980 }
981
982config_cov_an521 = {"seed_params": {
983 "tfm_platform": ["arm/mps2/an521"],
984 "toolchain_file": ["toolchain_GNUARM.cmake"],
985 "psa_api": [True, False],
986 "isolation_level": ["1", "2", "3"],
987 "test_regression": [True, False],
988 "test_psa_api": ["OFF"],
989 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
990 "with_otp": ["off"],
991 "with_bl2": [True],
992 "with_ns": [True],
993 "profile": ["", "profile_small", "profile_medium", "profile_large"],
994 "partition_ps": ["ON", "OFF"],
995 },
996 "common_params": _common_tfm_builder_cfg,
997 "invalid": _common_tfm_invalid_configs + []
998 }
999
Minos Galanakisea421232019-06-20 17:11:28 +01001000# Configruation used for document building
1001config_doxygen = {"common_params": {
1002 "config_type": "tf-m_documents",
1003 "codebase_root_dir": "tf-m",
Summer Qin3c2b5722021-05-26 10:43:45 +08001004 "build_cmds": {"all": ["-DTFM_PLATFORM=arm/mps2/an521 "
Fathi Boudra324fee72020-11-20 10:31:12 +01001005 "-DTFM_TOOLCHAIN_FILE=%(_tfm_code_dir_)s/toolchain_GNUARM.cmake"
Minos Galanakisea421232019-06-20 17:11:28 +01001006 "-DCMAKE_BUILD_TYPE=Debug "
Minos Galanakisea421232019-06-20 17:11:28 +01001007 "%(_tbm_code_dir_)s/",
Xinyu Zhangb708f572020-09-15 11:43:46 +08001008 "cmake --build ./ -- docs"]},
1009 "artifact_capture_rex": r'%(_tbm_build_dir_)s/docs/'
1010 r'reference_manual/(?:latex|html)'
Minos Galanakisea421232019-06-20 17:11:28 +01001011 r'/(\w+\.(?:html|md|pdf))$',
1012 },
Xinyu Zhangb708f572020-09-15 11:43:46 +08001013 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +01001014 }
1015
Karl Zhangaff558a2020-05-15 14:28:23 +01001016# Configuration used in testing
Minos Galanakisea421232019-06-20 17:11:28 +01001017config_debug = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +08001018 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001019 "toolchain_file": ["toolchain_ARMCLANG.cmake"],
1020 "psa_api": [False],
1021 "isolation_level": ["1"],
1022 "test_regression": [False],
1023 "test_psa_api": ["OFF"],
Minos Galanakisea421232019-06-20 17:11:28 +01001024 "cmake_build_type": ["Debug"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +08001025 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001026 "with_bl2": [True],
1027 "with_ns": [True],
1028 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001029 "partition_ps": ["ON"],
Minos Galanakisea421232019-06-20 17:11:28 +01001030 },
1031 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +08001032 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +01001033 }
1034
Dean Birch4c6ad622020-03-13 11:28:03 +00001035# Configuration used in CI
Xinyu Zhangb708f572020-09-15 11:43:46 +08001036config_ci = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +08001037 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001038 "toolchain_file": ["toolchain_ARMCLANG.cmake",
1039 "toolchain_GNUARM.cmake"],
1040 "psa_api": [True, False],
1041 "isolation_level": ["1", "2"],
1042 "test_regression": [True, False],
1043 "test_psa_api": ["OFF"],
1044 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +08001045 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001046 "with_bl2": [True, False],
1047 "with_ns": [True],
1048 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001049 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001050 },
1051 "common_params": _common_tfm_builder_cfg,
1052 "invalid": _common_tfm_invalid_configs + [
1053 ("*", "toolchain_ARMCLANG.cmake", True, "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001054 "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +08001055 ("*", "toolchain_ARMCLANG.cmake", False, "1", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001056 "*", "*", False, "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +08001057 ]
1058 }
Matthew Hartfb6fd362020-03-04 21:03:59 +00001059
Xinyu Zhangb708f572020-09-15 11:43:46 +08001060config_lava_debug = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +08001061 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001062 "toolchain_file": ["toolchain_GNUARM.cmake"],
1063 "psa_api": [True, False],
1064 "isolation_level": ["1", "2"],
1065 "test_regression": [True],
1066 "test_psa_api": ["OFF"],
1067 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +08001068 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001069 "with_bl2": [True, False],
1070 "with_ns": [True, False],
1071 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001072 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001073 },
1074 "common_params": _common_tfm_builder_cfg,
1075 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +08001076 ("arm/mps2/an521", "toolchain_GNUARM.cmake", True, "2", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001077 "*", "*", True, "*", "*", "*")
Xinyu Zhangb708f572020-09-15 11:43:46 +08001078 ]
1079 }
Dean Birch4c6ad622020-03-13 11:28:03 +00001080
Karl Zhangaff558a2020-05-15 14:28:23 +01001081_builtin_configs = {
Karl Zhang14573bc2020-06-08 09:23:21 +08001082 #release test group
Karl Zhangaff558a2020-05-15 14:28:23 +01001083 "tfm_test": config_tfm_test,
1084 "tfm_test2": config_tfm_test2,
Karl Zhang14573bc2020-06-08 09:23:21 +08001085 "tfm_profile": config_tfm_profile,
Karl Zhangaff558a2020-05-15 14:28:23 +01001086 "tfm_test_otp": config_tfm_test_OTP,
1087 "psa_api": config_PSA_API,
1088 "psa_api_otp": config_PSA_API_OTP,
1089 "psa_ff": config_PSA_FF,
1090 "psa_ff_otp": config_PSA_FF_OTP,
Karl Zhang14573bc2020-06-08 09:23:21 +08001091 "tfm_psoc64": config_PSOC64,
Arthur She19c0e1a2021-06-02 11:06:19 -07001092 "tfm_stm32l562e_dk": config_STM32L562E_DK,
Karl Zhang14573bc2020-06-08 09:23:21 +08001093
1094 #nightly test group
1095 "nightly_test": config_nightly,
1096 "nightly_profile": config_nightly_profile,
1097 "nightly_psa_api": config_nightly_PSA_API,
1098 "nightly_ff": config_nightly_PSA_FF,
1099 "nightly_otp": config_nightly_OTP,
Xinyu Zhangfd70cfe2021-06-29 11:14:13 +08001100 "nightly_stm32l562e_dk": config_nightly_STM32L562E_DK,
Karl Zhang14573bc2020-06-08 09:23:21 +08001101
1102 #per patch test group
1103 "pp_test": config_pp_test,
1104 "pp_OTP": config_pp_OTP,
1105 "pp_PSA_API": config_pp_PSA_API,
1106 "pp_psoc64": config_pp_PSoC64,
1107
Xinyu Zhangf25856a2021-06-17 14:06:46 +08001108 #code coverage test group
1109 "coverage_an519": config_cov_an519,
1110 "coverage_an521": config_cov_an521,
1111
Karl Zhang14573bc2020-06-08 09:23:21 +08001112 #full test group in the old CI
Karl Zhangaff558a2020-05-15 14:28:23 +01001113 "full": config_full,
Karl Zhang14573bc2020-06-08 09:23:21 +08001114
1115 #specific test group
Karl Zhangaff558a2020-05-15 14:28:23 +01001116 "an524": config_AN524,
Minos Galanakisea421232019-06-20 17:11:28 +01001117 "an521": config_AN521,
Karl Zhang14573bc2020-06-08 09:23:21 +08001118 "an521_psa_api": config_AN521_PSA_API,
1119 "an521_psa_ipc": config_AN521_PSA_IPC,
Minos Galanakisea421232019-06-20 17:11:28 +01001120 "an519": config_AN519,
Minos Galanakisea421232019-06-20 17:11:28 +01001121 "musca_b1": config_MUSCA_B1,
Mark Horvath8d281cd2020-12-07 15:20:26 +01001122 "musca_b1_se": config_MUSCA_B1_SE,
Karl Zhangeffed972020-06-30 15:48:01 +08001123 "musca_s1": config_MUSCA_S1,
Karl Zhang96dfe2d2020-05-11 11:31:40 +08001124 "psoc64": config_PSOC64,
Minos Galanakisea421232019-06-20 17:11:28 +01001125 "ipc": config_IPC,
1126 "doxygen": config_doxygen,
Dean Birch4c6ad622020-03-13 11:28:03 +00001127 "debug": config_debug,
Karl Zhangaff558a2020-05-15 14:28:23 +01001128 "release": config_release,
Matthew Hartfb6fd362020-03-04 21:03:59 +00001129 "debug": config_debug,
Karl Zhang14573bc2020-06-08 09:23:21 +08001130
1131 #DevOps team test group
Matthew Hartfb6fd362020-03-04 21:03:59 +00001132 "lava_debug": config_lava_debug,
Xinyu Zhanga1000582020-12-04 15:25:24 +08001133 "ci": config_ci}
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001134
1135if __name__ == '__main__':
1136 import os
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001137
Minos Galanakisea421232019-06-20 17:11:28 +01001138 # Default behavior is to export refference config when called
1139 _dir = os.getcwd()
1140 from utils import save_json
1141 for _cname, _cfg in _builtin_configs.items():
1142 _fname = os.path.join(_dir, _cname + ".json")
1143 print("Exporting config %s" % _fname)
1144 save_json(_fname, _cfg)