blob: 2a0e252a9d0bafa5881536deac6fab560bdf7bf2 [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", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800146 ("*", "*", "*", "*", True, "INITIAL_ATTESTATION", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang39acb412021-07-09 20:35:19 +0800147 ("*", "*", "*", "*", True, "STORAGE", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800148 # PSA_ACK requires NS
149 ("*", "*", "*", "*", "*", "IPC", "*", "*", "*", False, "*", "*"),
150 ("*", "*", "*", "*", "*", "CRYPTO", "*", "*", "*", False, "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800151 ("*", "*", "*", "*", "*", "INITIAL_ATTESTATION", "*", "*", "*", False, "*", "*"),
Xinyu Zhang39acb412021-07-09 20:35:19 +0800152 ("*", "*", "*", "*", "*", "STORAGE", "*", "*", "*", False, "*", "*"),
Xinyu Zhang3227da42021-03-19 17:37:17 +0800153 # PSA_ACK does not support LVL3
154 ("*", "*", "*", "3", "*", "IPC", "*", "*", "*", "*", "*", "*"),
155 ("*", "*", "*", "3", "*", "CRYPTO", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang3227da42021-03-19 17:37:17 +0800156 ("*", "*", "*", "3", "*", "INITIAL_ATTESTATION", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang39acb412021-07-09 20:35:19 +0800157 ("*", "*", "*", "3", "*", "STORAGE", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800158 # Musca requires BL2
Summer Qin3c2b5722021-05-26 10:43:45 +0800159 ("arm/musca_b1/sse_200", "*", "*", "*", "*", "*", "*", "*", False, "*", "*", "*"),
160 ("arm/musca_s1", "*", "*", "*", "*", "*", "*", "*", False, "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800161 # psoc64 cannot use BL2
162 ("cypress/psoc64", "*", "*", "*", "*", "*", "*", "*", True, "*", "*", "*"),
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800163 # psoc64 does not support Debug build type
164 ("cypress/psoc64", "*", "*", "*", "*", "*", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800165 # Musca b1 does not support Profile S
Summer Qin3c2b5722021-05-26 10:43:45 +0800166 ("arm/musca_b1/sse_200", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_small", "*"),
Mark Horvath8d281cd2020-12-07 15:20:26 +0100167 # Musca B1 Secure Enclave requires PSA api, BL2, and supports only Isolation Level 1
Summer Qin3c2b5722021-05-26 10:43:45 +0800168 ("arm/musca_b1/secure_enclave", "*", False, "*", "*", "*", "*", "*", "*", "*", "*", "*"),
169 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "*", "*", "*", False, "*", "*", "*"),
170 ("arm/musca_b1/secure_enclave", "*", "*", "2", "*", "*", "*", "*", "*", "*", "*", "*"),
Mark Horvath8d281cd2020-12-07 15:20:26 +0100171 # Musca B1 Secure Enclave does not support tests, profiles, NS side building
Summer Qin3c2b5722021-05-26 10:43:45 +0800172 ("arm/musca_b1/secure_enclave", "*", "*", "*", True, "*", "*", "*", "*", "*", "*", "*"),
173 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "IPC", "*", "*", "*", "*", "*", "*"),
174 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "CRYPTO", "*", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800175 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "INITIAL_ATTESTATION", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang39acb412021-07-09 20:35:19 +0800176 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "STORAGE", "*", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800177 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_small", "*"),
178 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_medium", "*"),
179 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "*", "*", "*", "*", True, "*", "*"),
Xinyu Zhang709c1542020-11-02 18:41:07 +0800180 # PARTITION_PS could be OFF only for Profile S and M
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800181 ("*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "", "OFF"),
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800182 ("*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_large", "OFF"),
Xinyu Zhang709c1542020-11-02 18:41:07 +0800183 # PARTITION_PS should be OFF for Profile S
184 ("*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_small", "ON"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800185 # Proile M only support for PSA_API
186 ("*", "*", False, "*", "*", "*", "*", "*", "*", "*", "profile_medium", "*"),
187 # Profile M only support for Isolation Level 2
188 ("*", "*", "*", "1", "*", "*", "*", "*", "*", "*", "profile_medium", "*"),
Xinyu Zhange8de4512020-11-13 10:37:56 +0800189 ("*", "*", "*", "3", "*", "*", "*", "*", "*", "*", "profile_medium", "*"),
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800190 # Profile L only support for Isolation Level 3
191 ("*", "*", "*", "1", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
192 ("*", "*", "*", "2", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800193 # Profile S does not support PSA_API
194 ("*", "*", True, "*", "*", "*", "*", "*", "*", "*", "profile_small", "*"),
195 # Profile S only supports Isolation Level 2
196 ("*", "*", "*", "2", "*", "*", "*", "*", "*", "*", "profile_small", "*"),
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800197 # Only AN521 and MUSCA_B1 support Isolation Level 3
Summer Qin3c2b5722021-05-26 10:43:45 +0800198 ("arm/mps2/an519", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
199 ("arm/mps3/an524", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
200 ("arm/musca_s1", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800201 ("cypress/psoc64", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800202 ("arm/musca_b1/secure_enclave", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
Arthur She19c0e1a2021-06-02 11:06:19 -0700203 # stm/stm32l562e_dk uses BL2
204 ("stm/stm32l562e_dk", "*", "*", "*", "*", "*", "*", "*", False, "*", "*", "*"),
205 # stm/stm32l562e_dk does not support Debug build type
206 ("stm/stm32l562e_dk", "*", "*", "*", "*", "*", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800207 ]
208
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100209# Configure build manager to build several combinations
Karl Zhangaff558a2020-05-15 14:28:23 +0100210config_AN524 = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800211 "tfm_platform": ["arm/mps3/an524"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800212 "toolchain_file": ["toolchain_GNUARM.cmake",
213 "toolchain_ARMCLANG.cmake"],
214 "psa_api": [True, False],
215 "isolation_level": ["1", "2"],
216 "test_regression": [True, False],
217 "test_psa_api": ["OFF"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100218 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800219 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800220 "with_bl2": [True, False],
221 "with_ns": [True, False],
222 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800223 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100224 },
225 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800226 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100227 }
228
Karl Zhangaff558a2020-05-15 14:28:23 +0100229config_AN521 = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800230 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800231 "toolchain_file": ["toolchain_GNUARM.cmake",
232 "toolchain_ARMCLANG.cmake"],
233 "psa_api": [True, False],
234 "isolation_level": ["1", "2"],
235 "test_regression": [True, False],
236 "test_psa_api": ["OFF"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100237 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800238 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800239 "with_bl2": [True, False],
240 "with_ns": [True, False],
241 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800242 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100243 },
244 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800245 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100246 }
247
Karl Zhangaff558a2020-05-15 14:28:23 +0100248config_PSA_API = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800249 "tfm_platform": ["arm/mps2/an521", "arm/musca_b1/sse_200",
250 "arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800251 "toolchain_file": ["toolchain_GNUARM.cmake",
252 "toolchain_ARMCLANG.cmake"],
253 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800254 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800255 "test_regression": [False],
256 "test_psa_api": ["CRYPTO",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800257 "INITIAL_ATTESTATION",
Xinyu Zhang39acb412021-07-09 20:35:19 +0800258 "STORAGE"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100259 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800260 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800261 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800262 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800263 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800264 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100265 },
266 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800267 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100268 }
269
Karl Zhangaff558a2020-05-15 14:28:23 +0100270config_PSA_FF = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800271 "tfm_platform": ["arm/mps2/an521", "arm/musca_b1/sse_200",
272 "arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800273 "toolchain_file": ["toolchain_GNUARM.cmake",
274 "toolchain_ARMCLANG.cmake"],
275 "psa_api": [True],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800276 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800277 "test_regression": [False],
278 "test_psa_api": ["IPC"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100279 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800280 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800281 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800282 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800283 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800284 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100285 },
286 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800287 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100288 }
289
Karl Zhangaff558a2020-05-15 14:28:23 +0100290config_PSA_API_OTP = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800291 "tfm_platform": ["arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800292 "toolchain_file": ["toolchain_GNUARM.cmake",
293 "toolchain_ARMCLANG.cmake"],
294 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800295 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800296 "test_regression": [False],
297 "test_psa_api": ["CRYPTO",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800298 "INITIAL_ATTESTATION",
Xinyu Zhang39acb412021-07-09 20:35:19 +0800299 "STORAGE"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100300 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800301 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800302 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800303 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800304 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800305 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100306 },
307 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800308 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100309 }
Minos Galanakisea421232019-06-20 17:11:28 +0100310
Xinyu Zhangb708f572020-09-15 11:43:46 +0800311config_PSA_FF_OTP = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800312 "tfm_platform": ["arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800313 "toolchain_file": ["toolchain_GNUARM.cmake",
314 "toolchain_ARMCLANG.cmake"],
315 "psa_api": [True],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800316 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800317 "test_regression": [False],
318 "test_psa_api": ["IPC"],
319 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800320 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800321 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800322 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800323 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800324 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800325 },
326 "common_params": _common_tfm_builder_cfg,
327 "invalid": _common_tfm_invalid_configs + []
328 }
329
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800330config_PSOC64 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800331 "tfm_platform": ["cypress/psoc64"],
332 "toolchain_file": ["toolchain_GNUARM.cmake",
333 "toolchain_ARMCLANG.cmake"],
334 "psa_api": [True],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800335 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800336 "test_regression": [True],
337 "test_psa_api": ["OFF"],
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800338 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800339 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800340 "with_bl2": [False],
341 "with_ns": [True, False],
342 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800343 "partition_ps": ["ON"],
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800344 },
345 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800346 "invalid": _common_tfm_invalid_configs + []
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800347 }
348
Arthur She19c0e1a2021-06-02 11:06:19 -0700349config_STM32L562E_DK = {"seed_params": {
350 "tfm_platform": ["stm/stm32l562e_dk"],
351 "toolchain_file": ["toolchain_GNUARM.cmake",
352 "toolchain_ARMCLANG.cmake"],
353 "psa_api": [True, False],
354 "isolation_level": ["1", "2", "3"],
355 "test_regression": [True],
356 "test_psa_api": ["OFF"],
357 "cmake_build_type": ["Release"],
358 "with_otp": ["off"],
359 "with_bl2": [True],
360 "with_ns": [True],
361 "profile": [""],
362 "partition_ps": ["ON"],
363 },
364 "common_params": _common_tfm_builder_cfg,
365 "invalid": _common_tfm_invalid_configs + []
366 }
367
Minos Galanakisea421232019-06-20 17:11:28 +0100368config_AN519 = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800369 "tfm_platform": ["arm/mps2/an519"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800370 "toolchain_file": ["toolchain_GNUARM.cmake",
371 "toolchain_ARMCLANG.cmake"],
372 "psa_api": [True, False],
373 "isolation_level": ["1", "2"],
374 "test_regression": [True, False],
375 "test_psa_api": ["OFF"],
Minos Galanakisea421232019-06-20 17:11:28 +0100376 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800377 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800378 "with_bl2": [True, False],
379 "with_ns": [True, False],
380 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800381 "partition_ps": ["ON"],
Minos Galanakisea421232019-06-20 17:11:28 +0100382 },
383 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800384 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +0100385 }
386
Xinyu Zhangb708f572020-09-15 11:43:46 +0800387config_IPC = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800388 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
389 "arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800390 "toolchain_file": ["toolchain_GNUARM.cmake",
391 "toolchain_ARMCLANG.cmake"],
392 "psa_api": [True],
393 "isolation_level": ["1", "2"],
394 "test_regression": [True, False],
395 "test_psa_api": ["OFF"],
396 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800397 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800398 "with_bl2": [True, False],
399 "with_ns": [True, False],
400 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800401 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800402 },
Minos Galanakisea421232019-06-20 17:11:28 +0100403 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800404 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +0100405 }
406
Minos Galanakisea421232019-06-20 17:11:28 +0100407config_full = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800408 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
409 "arm/musca_b1/sse_200",
410 "arm/mps3/an524", "cypress/psoc64",
Arthur She19c0e1a2021-06-02 11:06:19 -0700411 "arm/musca_b1/secure_enclave",
412 "stm/stm32l562e_dk"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800413 "toolchain_file": ["toolchain_GNUARM.cmake",
414 "toolchain_ARMCLANG.cmake"],
415 "psa_api": [True, False],
416 "isolation_level": ["1", "2"],
417 "test_regression": [True, False],
418 "test_psa_api": ["OFF"],
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800419 "cmake_build_type": ["Debug", "Release", "RelWithDebInfo"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800420 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800421 "with_bl2": [True, False],
422 "with_ns": [True, False],
423 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800424 "partition_ps": ["ON"],
Dean Birchd6ce2c82020-05-13 13:16:15 +0100425 },
426 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800427 "invalid": _common_tfm_invalid_configs + [
428 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800429 "*", "*", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800430 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800431 "*", "*", "*", "*", True, True, "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800432 ("arm/mps2/an521", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800433 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800434 ("arm/mps2/an519", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800435 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800436 ("arm/musca_b1/sse_200", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800437 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800438 ("arm/mps3/an524", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800439 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800440 ]
Karl Zhang81a76772020-05-11 18:28:52 +0800441 }
442
Karl Zhangaff558a2020-05-15 14:28:23 +0100443config_tfm_test = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800444 "tfm_platform": ["arm/mps2/an521",
445 "arm/musca_b1/sse_200", "arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800446 "toolchain_file": ["toolchain_ARMCLANG.cmake",
447 "toolchain_GNUARM.cmake"],
448 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800449 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800450 "test_regression": [True, False],
451 "test_psa_api": ["OFF"],
452 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800453 "with_otp": ["off"],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800454 "with_bl2": [True],
455 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800456 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800457 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800458 },
459 "common_params": _common_tfm_builder_cfg,
460 "invalid": _common_tfm_invalid_configs + []
461 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800462
Karl Zhangaff558a2020-05-15 14:28:23 +0100463config_tfm_test2 = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800464 "tfm_platform": ["arm/mps2/an519", "arm/mps3/an524"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800465 "toolchain_file": ["toolchain_ARMCLANG.cmake",
466 "toolchain_GNUARM.cmake"],
467 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800468 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800469 "test_regression": [True, False],
470 "test_psa_api": ["OFF"],
471 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800472 "with_otp": ["off"],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800473 "with_bl2": [True],
474 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800475 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800476 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800477 },
478 "common_params": _common_tfm_builder_cfg,
479 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800480 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800481 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800482 ]
483 }
Karl Zhangaff558a2020-05-15 14:28:23 +0100484
Karl Zhang14573bc2020-06-08 09:23:21 +0800485config_tfm_profile = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800486 "tfm_platform": ["arm/mps2/an519", "arm/mps2/an521",
487 "arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800488 "toolchain_file": ["toolchain_ARMCLANG.cmake",
489 "toolchain_GNUARM.cmake"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800490 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800491 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800492 "test_regression": [True, False],
493 "test_psa_api": ["OFF"],
494 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800495 "with_otp": ["off"],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800496 "with_bl2": [True],
497 "with_ns": [True],
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800498 "profile": ["profile_small", "profile_medium", "profile_large"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800499 "partition_ps": ["ON", "OFF"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800500 },
501 "common_params": _common_tfm_builder_cfg,
502 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800503 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800504 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800505 # Profile Large is only supported by AN521
Summer Qin3c2b5722021-05-26 10:43:45 +0800506 ("arm/mps2/an519", "*", "*",
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800507 "*", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800508 ("arm/musca_b1/sse_200", "*", "*",
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800509 "*", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800510 ]
511 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800512
Karl Zhangaff558a2020-05-15 14:28:23 +0100513config_tfm_test_OTP = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800514 "tfm_platform": ["arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800515 "toolchain_file": ["toolchain_ARMCLANG.cmake",
516 "toolchain_GNUARM.cmake"],
517 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800518 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800519 "test_regression": [True, False],
520 "test_psa_api": ["OFF"],
521 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800522 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800523 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800524 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800525 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800526 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800527 },
528 "common_params": _common_tfm_builder_cfg,
529 "invalid": _common_tfm_invalid_configs + []
530 }
Karl Zhangaff558a2020-05-15 14:28:23 +0100531
Minos Galanakisea421232019-06-20 17:11:28 +0100532config_MUSCA_B1 = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800533 "tfm_platform": ["arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800534 "toolchain_file": ["toolchain_ARMCLANG.cmake",
535 "toolchain_GNUARM.cmake"],
536 "psa_api": [True, False],
537 "isolation_level": ["1", "2"],
538 "test_regression": [True, False],
539 "test_psa_api": ["OFF"],
540 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800541 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800542 "with_bl2": [True],
543 "with_ns": [True, False],
544 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800545 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800546 },
547 "common_params": _common_tfm_builder_cfg,
548 "invalid": _common_tfm_invalid_configs + []
549 }
Minos Galanakisea421232019-06-20 17:11:28 +0100550
Mark Horvath8d281cd2020-12-07 15:20:26 +0100551config_MUSCA_B1_SE = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800552 "tfm_platform": ["arm/musca_b1/secure_enclave"],
Mark Horvath8d281cd2020-12-07 15:20:26 +0100553 "toolchain_file": ["toolchain_ARMCLANG.cmake",
554 "toolchain_GNUARM.cmake"],
555 "psa_api": [True],
556 "isolation_level": ["1"],
557 "test_regression": [False],
558 "test_psa_api": ["OFF"],
559 "cmake_build_type": ["Debug", "Release"],
560 "with_otp": ["off"],
561 "with_bl2": [True],
562 "with_ns": [False],
563 "profile": [""],
564 "partition_ps": ["ON"],
565 },
566 "common_params": _common_tfm_builder_cfg,
567 "invalid": _common_tfm_invalid_configs + []
568 }
569
Karl Zhangeffed972020-06-30 15:48:01 +0800570config_MUSCA_S1 = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800571 "tfm_platform": ["arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800572 "toolchain_file": ["toolchain_ARMCLANG.cmake",
573 "toolchain_GNUARM.cmake"],
574 "psa_api": [True, False],
575 "isolation_level": ["1", "2"],
576 "test_regression": [True, False],
577 "test_psa_api": ["OFF"],
578 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800579 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800580 "with_bl2": [True],
581 "with_ns": [True, False],
582 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800583 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800584 },
585 "common_params": _common_tfm_builder_cfg,
586 "invalid": _common_tfm_invalid_configs + []
587 }
Karl Zhangeffed972020-06-30 15:48:01 +0800588
Karl Zhangaff558a2020-05-15 14:28:23 +0100589config_release = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800590 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
591 "arm/musca_b1/sse_200", "arm/musca_s1",
592 "arm/mps3/an524"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800593 "toolchain_file": ["toolchain_ARMCLANG.cmake",
594 "toolchain_GNUARM.cmake"],
595 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800596 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800597 "test_regression": [True, False],
598 "test_psa_api": ["OFF"],
599 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800600 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800601 "with_bl2": [True, False],
602 "with_ns": [True, False],
603 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800604 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800605 },
606 "common_params": _common_tfm_builder_cfg,
607 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800608 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800609 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800610 ]
611 }
Karl Zhangaff558a2020-05-15 14:28:23 +0100612
613# Configure build manager to build several combinations
614config_AN521_PSA_API = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800615 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
616 "arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800617 "toolchain_file": ["toolchain_GNUARM.cmake",
618 "toolchain_ARMCLANG.cmake"],
619 "psa_api": [True, False],
620 "isolation_level": ["1", "2"],
621 "test_regression": [False],
622 "test_psa_api": ["IPC",
623 "CRYPTO",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800624 "INITIAL_ATTESTATION",
Xinyu Zhang39acb412021-07-09 20:35:19 +0800625 "STORAGE"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800626 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800627 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800628 "with_bl2": [True],
629 "with_ns": [True, False],
630 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800631 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100632 },
633 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800634 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800635 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800636 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800637 ]
Karl Zhangaff558a2020-05-15 14:28:23 +0100638 }
639
Karl Zhangaff558a2020-05-15 14:28:23 +0100640config_AN521_PSA_IPC = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800641 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
642 "arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800643 "toolchain_file": ["toolchain_GNUARM.cmake",
644 "toolchain_ARMCLANG.cmake"],
645 "psa_api": [True],
646 "isolation_level": ["1", "2"],
647 "test_regression": [False],
648 "test_psa_api": ["IPC"],
649 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800650 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800651 "with_bl2": [True],
652 "with_ns": [True, False],
653 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800654 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100655 },
656 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800657 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800658 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800659 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800660 ]
Karl Zhangaff558a2020-05-15 14:28:23 +0100661 }
662
Karl Zhang14573bc2020-06-08 09:23:21 +0800663config_nightly = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800664 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
665 "arm/musca_b1/sse_200", "arm/musca_s1",
666 "arm/mps3/an524", "cypress/psoc64",
Arthur She19c0e1a2021-06-02 11:06:19 -0700667 "arm/musca_b1/secure_enclave",
668 "stm/stm32l562e_dk"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800669 "toolchain_file": ["toolchain_GNUARM.cmake",
670 "toolchain_ARMCLANG.cmake"],
671 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800672 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800673 "test_regression": [True, False],
674 "test_psa_api": ["OFF"],
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800675 "cmake_build_type": ["Debug", "Release", "Minsizerel", "RelWithDebInfo"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800676 "with_otp": ["off"],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800677 "with_bl2": [True],
678 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800679 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800680 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800681 },
682 "common_params": _common_tfm_builder_cfg,
683 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800684 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800685 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800686 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800687 "*", "*", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800688 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800689 "*", "*", "*", "*", True, True, "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800690 ("arm/mps2/an521", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800691 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800692 ("arm/mps2/an519", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800693 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800694 ("arm/musca_b1/sse_200", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800695 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800696 ("arm/musca_s1", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800697 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800698 ("arm/mps3/an524", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800699 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800700 ]
701 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800702
Karl Zhang14573bc2020-06-08 09:23:21 +0800703config_nightly_profile = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800704 "tfm_platform": ["arm/mps2/an519", "arm/mps2/an521",
705 "arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800706 "toolchain_file": ["toolchain_ARMCLANG.cmake",
707 "toolchain_GNUARM.cmake"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800708 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800709 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800710 "test_regression": [True, False],
711 "test_psa_api": ["OFF"],
712 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800713 "with_otp": ["off"],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800714 "with_bl2": [True],
715 "with_ns": [True],
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800716 "profile": ["profile_small", "profile_medium", "profile_large"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800717 "partition_ps": ["ON", "OFF"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800718 },
719 "common_params": _common_tfm_builder_cfg,
720 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800721 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800722 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800723 # Profile Large is only supported by AN521
Summer Qin3c2b5722021-05-26 10:43:45 +0800724 ("arm/mps2/an519", "*", "*",
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800725 "*", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800726 ("arm/musca_b1/sse_200", "*", "*",
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800727 "*", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800728 ]
729 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800730
Karl Zhang14573bc2020-06-08 09:23:21 +0800731config_nightly_PSA_API = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800732 "tfm_platform": ["arm/mps2/an521", "arm/musca_b1/sse_200",
733 "arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800734 "toolchain_file": ["toolchain_GNUARM.cmake",
735 "toolchain_ARMCLANG.cmake"],
736 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800737 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800738 "test_regression": [False],
739 "test_psa_api": ["CRYPTO",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800740 "INITIAL_ATTESTATION",
Xinyu Zhang39acb412021-07-09 20:35:19 +0800741 "STORAGE"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800742 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800743 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800744 "with_bl2": [True],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800745 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800746 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800747 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800748 },
749 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800750 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800751 }
752
Karl Zhang14573bc2020-06-08 09:23:21 +0800753config_nightly_PSA_FF = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800754 "tfm_platform": ["arm/mps2/an521", "arm/musca_b1/sse_200",
755 "arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800756 "toolchain_file": ["toolchain_GNUARM.cmake",
757 "toolchain_ARMCLANG.cmake"],
758 "psa_api": [True],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800759 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800760 "test_regression": [False],
761 "test_psa_api": ["IPC"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800762 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800763 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800764 "with_bl2": [True],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800765 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800766 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800767 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800768 },
769 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800770 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800771 }
772
Karl Zhang14573bc2020-06-08 09:23:21 +0800773config_nightly_OTP = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800774 "tfm_platform": ["arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800775 "toolchain_file": ["toolchain_GNUARM.cmake",
776 "toolchain_ARMCLANG.cmake"],
777 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800778 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800779 "test_regression": [True],
780 "test_psa_api": ["OFF"],
781 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800782 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800783 "with_bl2": [True],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800784 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800785 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800786 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800787 },
788 "common_params": _common_tfm_builder_cfg,
789 "invalid": _common_tfm_invalid_configs + []
790 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800791
Xinyu Zhangfd70cfe2021-06-29 11:14:13 +0800792config_nightly_STM32L562E_DK = {"seed_params": {
793 "tfm_platform": ["stm/stm32l562e_dk"],
794 "toolchain_file": ["toolchain_GNUARM.cmake",
795 "toolchain_ARMCLANG.cmake"],
796 "psa_api": [True, False],
797 "isolation_level": ["1", "2", "3"],
798 "test_regression": [True],
799 "test_psa_api": ["OFF"],
800 "cmake_build_type": ["Release"],
801 "with_otp": ["off"],
802 "with_bl2": [True],
803 "with_ns": [True],
804 "profile": [""],
805 "partition_ps": ["ON"],
806 },
807 "common_params": _common_tfm_builder_cfg,
808 "invalid": _common_tfm_invalid_configs + []
809 }
810
Karl Zhang14573bc2020-06-08 09:23:21 +0800811config_pp_test = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800812 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
Xinyu Zhangd1ef9982021-06-24 11:31:11 +0800813 "arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800814 "toolchain_file": ["toolchain_GNUARM.cmake",
815 "toolchain_ARMCLANG.cmake"],
816 "psa_api": [True, False],
Karl Zhangde36b772021-01-08 10:17:03 +0800817 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800818 "test_regression": [True],
819 "test_psa_api": ["OFF"],
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800820 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800821 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800822 "with_bl2": [True],
823 "with_ns": [True, False],
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800824 "profile": ["", "profile_small", "profile_medium"],
825 "partition_ps": ["ON", "OFF"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800826 },
827 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800828 "valid": [
Summer Qin3c2b5722021-05-26 10:43:45 +0800829 ("arm/mps2/an521", "toolchain_GNUARM.cmake",
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800830 False, "1", False, "OFF", "Debug",
831 "off", True, True, "", "ON"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800832 ("arm/mps2/an521", "toolchain_ARMCLANG.cmake",
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800833 True, "2", False, "OFF", "Debug",
834 "off", True, True, "", "ON"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800835 ("arm/mps2/an521", "toolchain_ARMCLANG.cmake",
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800836 True, "3", False, "OFF", "Release",
837 "off", True, True, "", "ON"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800838 ("arm/mps2/an521", "toolchain_GNUARM.cmake",
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800839 True, "2", False, "OFF", "Debug",
840 "off", True, True, "profile_medium", "ON"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800841 ("arm/mps2/an521", "toolchain_GNUARM.cmake",
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800842 True, "3", False, "OFF", "Debug",
843 "off", True, True, "profile_large", "ON"),
Xinyu Zhangd1ef9982021-06-24 11:31:11 +0800844 # AN521_GNUARM_PSA_2_REG_Release_BL2_NS_MEDIUM_PSOFF
845 ("arm/mps2/an521", "toolchain_GNUARM.cmake", True,
846 "2", True, "OFF", "Release", "off", True, True, "profile_medium", "OFF"),
847 # MUSCA_B1_ARMCLANG_PSA_3_REG_Debug_BL2_NS
848 ("arm/musca_b1/sse_200", "toolchain_ARMCLANG.cmake",True,
849 "3", True, "OFF", "Debug", "off", True, True, "", "ON"),
850 # MUSCA_B1_GNUARM_1_REG_Minsizerel_BL2_NS
851 ("arm/musca_b1/sse_200", "toolchain_GNUARM.cmake", False,
852 "1", True, "OFF", "Minsizerel", "off", True, True, "", "ON"),
853 # stm32l562e_dk_ARMCLANG_PSA_1_REG_Release_BL2_NS
854 ("stm/stm32l562e_dk", "toolchain_ARMCLANG.cmake", True,
855 "1", True, "OFF", "Release", "off", True, True, "", "ON"),
856 # stm32l562e_dk_GNUARM_PSA_2_REG_Release_BL2_NS
857 ("stm/stm32l562e_dk", "toolchain_GNUARM.cmake", True,
858 "2", True, "OFF", "Release", "off", True, True, "", "ON"),
859 # stm32l562e_dk_GNUARM_PSA_3_REG_Release_BL2_NS
860 ("stm/stm32l562e_dk", "toolchain_GNUARM.cmake", True,
861 "3", True, "OFF", "Release", "off", True, True, "", "ON"),
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800862 ],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800863 "invalid": _common_tfm_invalid_configs + [
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800864 # invalid configs that are not supported by TF-M
Summer Qin3c2b5722021-05-26 10:43:45 +0800865 ("arm/musca_s1", "*", "*", "*", "*", "*",
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800866 "*", "*", "*", "*", "profile_medium", "*"),
867 # valid configs supported by TF-M but not needed in per-patch
868 ("*", "*", "*", "1", "*", "*", "Release",
869 "*", "*", "*", "*", "*"),
870 ("*", "*", "*", "1", "*", "*", "Minsizerel",
871 "*", "*", "*", "*", "*"),
872 ("*", "*", "*", "2", "*", "*", "Debug",
873 "*", "*", "*", "*", "*"),
874 ("*", "*", "*", "2", "*", "*", "Minsizerel",
875 "*", "*", "*", "*", "*"),
876 ("*", "*", "*", "3", "*", "*", "Debug",
877 "*", "*", "*", "*", "*"),
878 ("*", "*", "*", "3", "*", "*", "Release",
879 "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800880 ("arm/mps2/an519", "*", "*", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800881 "*", "*", "*", "*", "profile_small", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800882 ("arm/musca_s1", "*", "*", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800883 "*", "*", "*", "*", "profile_small", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800884 ("arm/mps2/an519", "*", "*", "*", "*", "*",
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800885 "*", "*", "*", "*", "profile_medium", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800886 ("arm/mps2/an521", "*", "*", "*", "*", "*",
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800887 "*", "*", "*", "*", "profile_medium", "*"),
888 ("*", "toolchain_GNUARM.cmake", "*", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800889 "*", "*", "*", "*", "profile_small", "*"),
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800890 ("*", "toolchain_ARMCLANG.cmake", "*", "*", "*", "*",
891 "*", "*", "*", "*", "profile_medium", "*"),
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800892 ("*", "toolchain_ARMCLANG.cmake", False, "*", "*", "*",
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800893 "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800894 ]
895 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800896
Karl Zhang14573bc2020-06-08 09:23:21 +0800897config_pp_OTP = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800898 "tfm_platform": ["arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800899 "toolchain_file": ["toolchain_GNUARM.cmake"],
900 "psa_api": [True, False],
901 "isolation_level": ["1", "2"],
902 "test_regression": [True],
903 "test_psa_api": ["OFF"],
904 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800905 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800906 "with_bl2": [True],
907 "with_ns": [True, False],
908 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800909 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800910 },
911 "common_params": _common_tfm_builder_cfg,
912 "invalid": _common_tfm_invalid_configs + []
913 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800914
915# Configure build manager to build several combinations
916config_pp_PSA_API = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800917 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800918 "toolchain_file": ["toolchain_GNUARM.cmake"],
919 "psa_api": [True],
920 "isolation_level": ["2"],
921 "test_regression": [False],
922 "test_psa_api": ["IPC",
923 "CRYPTO",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800924 "INITIAL_ATTESTATION",
Xinyu Zhang39acb412021-07-09 20:35:19 +0800925 "STORAGE"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800926 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800927 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800928 "with_bl2": [True],
929 "with_ns": [True, False],
930 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800931 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800932 },
933 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800934 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800935 }
936
Karl Zhang14573bc2020-06-08 09:23:21 +0800937config_pp_PSoC64 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800938 "tfm_platform": ["cypress/psoc64"],
939 "toolchain_file": ["toolchain_GNUARM.cmake"],
940 "psa_api": [True],
941 "isolation_level": ["1", "2"],
942 "test_regression": [True],
943 "test_psa_api": ["OFF"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800944 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800945 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800946 "with_bl2": [False],
947 "with_ns": [True, False],
948 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800949 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800950 },
951 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800952 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800953 }
954
Xinyu Zhangf25856a2021-06-17 14:06:46 +0800955config_cov_an519 = {"seed_params": {
956 "tfm_platform": ["arm/mps2/an519"],
957 "toolchain_file": ["toolchain_GNUARM.cmake"],
958 "psa_api": [True, False],
959 "isolation_level": ["1", "2", "3"],
960 "test_regression": [True, False],
961 "test_psa_api": ["OFF"],
962 "cmake_build_type": ["Debug", "Release"],
963 "with_otp": ["off"],
964 "with_bl2": [True],
965 "with_ns": [True],
966 "profile": ["", "profile_small", "profile_medium"],
967 "partition_ps": ["ON", "OFF"],
968 },
969 "common_params": _common_tfm_builder_cfg,
970 "invalid": _common_tfm_invalid_configs + []
971 }
972
973config_cov_an521 = {"seed_params": {
974 "tfm_platform": ["arm/mps2/an521"],
975 "toolchain_file": ["toolchain_GNUARM.cmake"],
976 "psa_api": [True, False],
977 "isolation_level": ["1", "2", "3"],
978 "test_regression": [True, False],
979 "test_psa_api": ["OFF"],
980 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
981 "with_otp": ["off"],
982 "with_bl2": [True],
983 "with_ns": [True],
984 "profile": ["", "profile_small", "profile_medium", "profile_large"],
985 "partition_ps": ["ON", "OFF"],
986 },
987 "common_params": _common_tfm_builder_cfg,
988 "invalid": _common_tfm_invalid_configs + []
989 }
990
Minos Galanakisea421232019-06-20 17:11:28 +0100991# Configruation used for document building
992config_doxygen = {"common_params": {
993 "config_type": "tf-m_documents",
994 "codebase_root_dir": "tf-m",
Summer Qin3c2b5722021-05-26 10:43:45 +0800995 "build_cmds": {"all": ["-DTFM_PLATFORM=arm/mps2/an521 "
Fathi Boudra324fee72020-11-20 10:31:12 +0100996 "-DTFM_TOOLCHAIN_FILE=%(_tfm_code_dir_)s/toolchain_GNUARM.cmake"
Minos Galanakisea421232019-06-20 17:11:28 +0100997 "-DCMAKE_BUILD_TYPE=Debug "
Minos Galanakisea421232019-06-20 17:11:28 +0100998 "%(_tbm_code_dir_)s/",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800999 "cmake --build ./ -- docs"]},
1000 "artifact_capture_rex": r'%(_tbm_build_dir_)s/docs/'
1001 r'reference_manual/(?:latex|html)'
Minos Galanakisea421232019-06-20 17:11:28 +01001002 r'/(\w+\.(?:html|md|pdf))$',
1003 },
Xinyu Zhangb708f572020-09-15 11:43:46 +08001004 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +01001005 }
1006
Karl Zhangaff558a2020-05-15 14:28:23 +01001007# Configuration used in testing
Minos Galanakisea421232019-06-20 17:11:28 +01001008config_debug = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +08001009 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001010 "toolchain_file": ["toolchain_ARMCLANG.cmake"],
1011 "psa_api": [False],
1012 "isolation_level": ["1"],
1013 "test_regression": [False],
1014 "test_psa_api": ["OFF"],
Minos Galanakisea421232019-06-20 17:11:28 +01001015 "cmake_build_type": ["Debug"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +08001016 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001017 "with_bl2": [True],
1018 "with_ns": [True],
1019 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001020 "partition_ps": ["ON"],
Minos Galanakisea421232019-06-20 17:11:28 +01001021 },
1022 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +08001023 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +01001024 }
1025
Dean Birch4c6ad622020-03-13 11:28:03 +00001026# Configuration used in CI
Xinyu Zhangb708f572020-09-15 11:43:46 +08001027config_ci = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +08001028 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001029 "toolchain_file": ["toolchain_ARMCLANG.cmake",
1030 "toolchain_GNUARM.cmake"],
1031 "psa_api": [True, False],
1032 "isolation_level": ["1", "2"],
1033 "test_regression": [True, False],
1034 "test_psa_api": ["OFF"],
1035 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +08001036 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001037 "with_bl2": [True, False],
1038 "with_ns": [True],
1039 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001040 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001041 },
1042 "common_params": _common_tfm_builder_cfg,
1043 "invalid": _common_tfm_invalid_configs + [
1044 ("*", "toolchain_ARMCLANG.cmake", True, "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001045 "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +08001046 ("*", "toolchain_ARMCLANG.cmake", False, "1", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001047 "*", "*", False, "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +08001048 ]
1049 }
Matthew Hartfb6fd362020-03-04 21:03:59 +00001050
Xinyu Zhangb708f572020-09-15 11:43:46 +08001051config_lava_debug = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +08001052 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001053 "toolchain_file": ["toolchain_GNUARM.cmake"],
1054 "psa_api": [True, False],
1055 "isolation_level": ["1", "2"],
1056 "test_regression": [True],
1057 "test_psa_api": ["OFF"],
1058 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +08001059 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001060 "with_bl2": [True, False],
1061 "with_ns": [True, False],
1062 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001063 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001064 },
1065 "common_params": _common_tfm_builder_cfg,
1066 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +08001067 ("arm/mps2/an521", "toolchain_GNUARM.cmake", True, "2", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001068 "*", "*", True, "*", "*", "*")
Xinyu Zhangb708f572020-09-15 11:43:46 +08001069 ]
1070 }
Dean Birch4c6ad622020-03-13 11:28:03 +00001071
Karl Zhangaff558a2020-05-15 14:28:23 +01001072_builtin_configs = {
Karl Zhang14573bc2020-06-08 09:23:21 +08001073 #release test group
Karl Zhangaff558a2020-05-15 14:28:23 +01001074 "tfm_test": config_tfm_test,
1075 "tfm_test2": config_tfm_test2,
Karl Zhang14573bc2020-06-08 09:23:21 +08001076 "tfm_profile": config_tfm_profile,
Karl Zhangaff558a2020-05-15 14:28:23 +01001077 "tfm_test_otp": config_tfm_test_OTP,
1078 "psa_api": config_PSA_API,
1079 "psa_api_otp": config_PSA_API_OTP,
1080 "psa_ff": config_PSA_FF,
1081 "psa_ff_otp": config_PSA_FF_OTP,
Karl Zhang14573bc2020-06-08 09:23:21 +08001082 "tfm_psoc64": config_PSOC64,
Arthur She19c0e1a2021-06-02 11:06:19 -07001083 "tfm_stm32l562e_dk": config_STM32L562E_DK,
Karl Zhang14573bc2020-06-08 09:23:21 +08001084
1085 #nightly test group
1086 "nightly_test": config_nightly,
1087 "nightly_profile": config_nightly_profile,
1088 "nightly_psa_api": config_nightly_PSA_API,
1089 "nightly_ff": config_nightly_PSA_FF,
1090 "nightly_otp": config_nightly_OTP,
Xinyu Zhangfd70cfe2021-06-29 11:14:13 +08001091 "nightly_stm32l562e_dk": config_nightly_STM32L562E_DK,
Karl Zhang14573bc2020-06-08 09:23:21 +08001092
1093 #per patch test group
1094 "pp_test": config_pp_test,
1095 "pp_OTP": config_pp_OTP,
1096 "pp_PSA_API": config_pp_PSA_API,
1097 "pp_psoc64": config_pp_PSoC64,
1098
Xinyu Zhangf25856a2021-06-17 14:06:46 +08001099 #code coverage test group
1100 "coverage_an519": config_cov_an519,
1101 "coverage_an521": config_cov_an521,
1102
Karl Zhang14573bc2020-06-08 09:23:21 +08001103 #full test group in the old CI
Karl Zhangaff558a2020-05-15 14:28:23 +01001104 "full": config_full,
Karl Zhang14573bc2020-06-08 09:23:21 +08001105
1106 #specific test group
Karl Zhangaff558a2020-05-15 14:28:23 +01001107 "an524": config_AN524,
Minos Galanakisea421232019-06-20 17:11:28 +01001108 "an521": config_AN521,
Karl Zhang14573bc2020-06-08 09:23:21 +08001109 "an521_psa_api": config_AN521_PSA_API,
1110 "an521_psa_ipc": config_AN521_PSA_IPC,
Minos Galanakisea421232019-06-20 17:11:28 +01001111 "an519": config_AN519,
Minos Galanakisea421232019-06-20 17:11:28 +01001112 "musca_b1": config_MUSCA_B1,
Mark Horvath8d281cd2020-12-07 15:20:26 +01001113 "musca_b1_se": config_MUSCA_B1_SE,
Karl Zhangeffed972020-06-30 15:48:01 +08001114 "musca_s1": config_MUSCA_S1,
Karl Zhang96dfe2d2020-05-11 11:31:40 +08001115 "psoc64": config_PSOC64,
Minos Galanakisea421232019-06-20 17:11:28 +01001116 "ipc": config_IPC,
1117 "doxygen": config_doxygen,
Dean Birch4c6ad622020-03-13 11:28:03 +00001118 "debug": config_debug,
Karl Zhangaff558a2020-05-15 14:28:23 +01001119 "release": config_release,
Matthew Hartfb6fd362020-03-04 21:03:59 +00001120 "debug": config_debug,
Karl Zhang14573bc2020-06-08 09:23:21 +08001121
1122 #DevOps team test group
Matthew Hartfb6fd362020-03-04 21:03:59 +00001123 "lava_debug": config_lava_debug,
Xinyu Zhanga1000582020-12-04 15:25:24 +08001124 "ci": config_ci}
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001125
1126if __name__ == '__main__':
1127 import os
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001128
Minos Galanakisea421232019-06-20 17:11:28 +01001129 # Default behavior is to export refference config when called
1130 _dir = os.getcwd()
1131 from utils import save_json
1132 for _cname, _cfg in _builtin_configs.items():
1133 _fname = os.path.join(_dir, _cname + ".json")
1134 print("Exporting config %s" % _fname)
1135 save_json(_fname, _cfg)