blob: 22f04f50cf688d48e04a4695e19f8a3a620d12d7 [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 = [
Xinyu Zhang459a1982021-07-21 22:34:49 +0800133 # LR_CODE size exceeds limit on MUSCA_B1 & MUSCA_S1 with regression tests in Debug mode built with ARMCLANG
134 ("arm/musca_b1/sse_200", "toolchain_ARMCLANG.cmake", "*", "*", True, "OFF", "Debug", "*", "*", "*", "", "*"),
135 ("arm/musca_s1", "toolchain_ARMCLANG.cmake", "*", "*", True, "OFF", "Debug", "*", "*", "*", "", "*"),
Karl Zhangc858a722021-03-22 21:38:19 +0800136 # Load range overlap on Musca for IPC Debug type: T895
Summer Qin3c2b5722021-05-26 10:43:45 +0800137 ("arm/musca_b1/sse_200", "toolchain_ARMCLANG.cmake", "*", "*", "*", "IPC", "Debug", "*", "*", "*", "*", "*"),
138 ("arm/musca_s1", "toolchain_ARMCLANG.cmake", "*", "*", "*", "IPC", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800139 # LVL2 and LVL3 requires PSA api
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800140 ("*", "*", False, "2", "*", "*", "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800141 ("*", "*", False, "3", "*", "*", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800142 # Regression requires NS
143 ("*", "*", "*", "*", True, "*", "*", "*", "*", False, "*", "*"),
Xinyu Zhang11d66112020-11-04 15:38:29 +0800144 # psoc64 requires PSA api
145 ("cypress/psoc64", "*", False, "*", "*", "*", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800146 # No PSA_ACK with regression
147 ("*", "*", "*", "*", True, "IPC", "*", "*", "*", "*", "*", "*"),
148 ("*", "*", "*", "*", True, "CRYPTO", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800149 ("*", "*", "*", "*", True, "INITIAL_ATTESTATION", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang39acb412021-07-09 20:35:19 +0800150 ("*", "*", "*", "*", True, "STORAGE", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800151 # PSA_ACK requires NS
152 ("*", "*", "*", "*", "*", "IPC", "*", "*", "*", False, "*", "*"),
153 ("*", "*", "*", "*", "*", "CRYPTO", "*", "*", "*", False, "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800154 ("*", "*", "*", "*", "*", "INITIAL_ATTESTATION", "*", "*", "*", False, "*", "*"),
Xinyu Zhang39acb412021-07-09 20:35:19 +0800155 ("*", "*", "*", "*", "*", "STORAGE", "*", "*", "*", False, "*", "*"),
Xinyu Zhang3227da42021-03-19 17:37:17 +0800156 # PSA_ACK does not support LVL3
157 ("*", "*", "*", "3", "*", "IPC", "*", "*", "*", "*", "*", "*"),
158 ("*", "*", "*", "3", "*", "CRYPTO", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang3227da42021-03-19 17:37:17 +0800159 ("*", "*", "*", "3", "*", "INITIAL_ATTESTATION", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang39acb412021-07-09 20:35:19 +0800160 ("*", "*", "*", "3", "*", "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", "*", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800178 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "INITIAL_ATTESTATION", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang39acb412021-07-09 20:35:19 +0800179 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "STORAGE", "*", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800180 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_small", "*"),
181 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_medium", "*"),
182 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "*", "*", "*", "*", True, "*", "*"),
Xinyu Zhang709c1542020-11-02 18:41:07 +0800183 # PARTITION_PS could be OFF only for Profile S and M
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800184 ("*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "", "OFF"),
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800185 ("*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_large", "OFF"),
Xinyu Zhang709c1542020-11-02 18:41:07 +0800186 # PARTITION_PS should be OFF for Profile S
187 ("*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_small", "ON"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800188 # Proile M only support for PSA_API
189 ("*", "*", False, "*", "*", "*", "*", "*", "*", "*", "profile_medium", "*"),
190 # Profile M only support for Isolation Level 2
191 ("*", "*", "*", "1", "*", "*", "*", "*", "*", "*", "profile_medium", "*"),
Xinyu Zhange8de4512020-11-13 10:37:56 +0800192 ("*", "*", "*", "3", "*", "*", "*", "*", "*", "*", "profile_medium", "*"),
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800193 # Profile L only support for Isolation Level 3
194 ("*", "*", "*", "1", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
195 ("*", "*", "*", "2", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800196 # Profile S does not support PSA_API
197 ("*", "*", True, "*", "*", "*", "*", "*", "*", "*", "profile_small", "*"),
198 # Profile S only supports Isolation Level 2
199 ("*", "*", "*", "2", "*", "*", "*", "*", "*", "*", "profile_small", "*"),
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800200 # Only AN521 and MUSCA_B1 support Isolation Level 3
Summer Qin3c2b5722021-05-26 10:43:45 +0800201 ("arm/mps2/an519", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
202 ("arm/mps3/an524", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
203 ("arm/musca_s1", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800204 ("cypress/psoc64", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800205 ("arm/musca_b1/secure_enclave", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
Arthur She19c0e1a2021-06-02 11:06:19 -0700206 # stm/stm32l562e_dk uses BL2
207 ("stm/stm32l562e_dk", "*", "*", "*", "*", "*", "*", "*", False, "*", "*", "*"),
208 # stm/stm32l562e_dk does not support Debug build type
209 ("stm/stm32l562e_dk", "*", "*", "*", "*", "*", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800210 ]
211
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100212# Configure build manager to build several combinations
Karl Zhangaff558a2020-05-15 14:28:23 +0100213config_AN524 = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800214 "tfm_platform": ["arm/mps3/an524"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800215 "toolchain_file": ["toolchain_GNUARM.cmake",
216 "toolchain_ARMCLANG.cmake"],
217 "psa_api": [True, False],
218 "isolation_level": ["1", "2"],
219 "test_regression": [True, False],
220 "test_psa_api": ["OFF"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100221 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800222 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800223 "with_bl2": [True, False],
224 "with_ns": [True, False],
225 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800226 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100227 },
228 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800229 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100230 }
231
Karl Zhangaff558a2020-05-15 14:28:23 +0100232config_AN521 = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800233 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800234 "toolchain_file": ["toolchain_GNUARM.cmake",
235 "toolchain_ARMCLANG.cmake"],
236 "psa_api": [True, False],
237 "isolation_level": ["1", "2"],
238 "test_regression": [True, False],
239 "test_psa_api": ["OFF"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100240 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800241 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800242 "with_bl2": [True, False],
243 "with_ns": [True, False],
244 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800245 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100246 },
247 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800248 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100249 }
250
Karl Zhangaff558a2020-05-15 14:28:23 +0100251config_PSA_API = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800252 "tfm_platform": ["arm/mps2/an521", "arm/musca_b1/sse_200",
253 "arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800254 "toolchain_file": ["toolchain_GNUARM.cmake",
255 "toolchain_ARMCLANG.cmake"],
256 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800257 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800258 "test_regression": [False],
259 "test_psa_api": ["CRYPTO",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800260 "INITIAL_ATTESTATION",
Xinyu Zhang39acb412021-07-09 20:35:19 +0800261 "STORAGE"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100262 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800263 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800264 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800265 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800266 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800267 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100268 },
269 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800270 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100271 }
272
Karl Zhangaff558a2020-05-15 14:28:23 +0100273config_PSA_FF = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800274 "tfm_platform": ["arm/mps2/an521", "arm/musca_b1/sse_200",
275 "arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800276 "toolchain_file": ["toolchain_GNUARM.cmake",
277 "toolchain_ARMCLANG.cmake"],
278 "psa_api": [True],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800279 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800280 "test_regression": [False],
281 "test_psa_api": ["IPC"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100282 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800283 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800284 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800285 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800286 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800287 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100288 },
289 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800290 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100291 }
292
Karl Zhangaff558a2020-05-15 14:28:23 +0100293config_PSA_API_OTP = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800294 "tfm_platform": ["arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800295 "toolchain_file": ["toolchain_GNUARM.cmake",
296 "toolchain_ARMCLANG.cmake"],
297 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800298 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800299 "test_regression": [False],
300 "test_psa_api": ["CRYPTO",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800301 "INITIAL_ATTESTATION",
Xinyu Zhang39acb412021-07-09 20:35:19 +0800302 "STORAGE"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100303 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800304 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800305 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800306 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800307 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800308 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100309 },
310 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800311 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100312 }
Minos Galanakisea421232019-06-20 17:11:28 +0100313
Xinyu Zhangb708f572020-09-15 11:43:46 +0800314config_PSA_FF_OTP = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800315 "tfm_platform": ["arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800316 "toolchain_file": ["toolchain_GNUARM.cmake",
317 "toolchain_ARMCLANG.cmake"],
318 "psa_api": [True],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800319 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800320 "test_regression": [False],
321 "test_psa_api": ["IPC"],
322 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800323 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800324 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800325 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800326 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800327 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800328 },
329 "common_params": _common_tfm_builder_cfg,
330 "invalid": _common_tfm_invalid_configs + []
331 }
332
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800333config_PSOC64 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800334 "tfm_platform": ["cypress/psoc64"],
335 "toolchain_file": ["toolchain_GNUARM.cmake",
336 "toolchain_ARMCLANG.cmake"],
337 "psa_api": [True],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800338 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800339 "test_regression": [True],
340 "test_psa_api": ["OFF"],
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800341 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800342 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800343 "with_bl2": [False],
344 "with_ns": [True, False],
345 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800346 "partition_ps": ["ON"],
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800347 },
348 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800349 "invalid": _common_tfm_invalid_configs + []
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800350 }
351
Arthur She19c0e1a2021-06-02 11:06:19 -0700352config_STM32L562E_DK = {"seed_params": {
353 "tfm_platform": ["stm/stm32l562e_dk"],
354 "toolchain_file": ["toolchain_GNUARM.cmake",
355 "toolchain_ARMCLANG.cmake"],
356 "psa_api": [True, False],
357 "isolation_level": ["1", "2", "3"],
358 "test_regression": [True],
359 "test_psa_api": ["OFF"],
360 "cmake_build_type": ["Release"],
361 "with_otp": ["off"],
362 "with_bl2": [True],
363 "with_ns": [True],
364 "profile": [""],
365 "partition_ps": ["ON"],
366 },
367 "common_params": _common_tfm_builder_cfg,
368 "invalid": _common_tfm_invalid_configs + []
369 }
370
Minos Galanakisea421232019-06-20 17:11:28 +0100371config_AN519 = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800372 "tfm_platform": ["arm/mps2/an519"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800373 "toolchain_file": ["toolchain_GNUARM.cmake",
374 "toolchain_ARMCLANG.cmake"],
375 "psa_api": [True, False],
376 "isolation_level": ["1", "2"],
377 "test_regression": [True, False],
378 "test_psa_api": ["OFF"],
Minos Galanakisea421232019-06-20 17:11:28 +0100379 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800380 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800381 "with_bl2": [True, False],
382 "with_ns": [True, False],
383 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800384 "partition_ps": ["ON"],
Minos Galanakisea421232019-06-20 17:11:28 +0100385 },
386 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800387 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +0100388 }
389
Xinyu Zhangb708f572020-09-15 11:43:46 +0800390config_IPC = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800391 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
392 "arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800393 "toolchain_file": ["toolchain_GNUARM.cmake",
394 "toolchain_ARMCLANG.cmake"],
395 "psa_api": [True],
396 "isolation_level": ["1", "2"],
397 "test_regression": [True, False],
398 "test_psa_api": ["OFF"],
399 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800400 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800401 "with_bl2": [True, False],
402 "with_ns": [True, False],
403 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800404 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800405 },
Minos Galanakisea421232019-06-20 17:11:28 +0100406 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800407 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +0100408 }
409
Minos Galanakisea421232019-06-20 17:11:28 +0100410config_full = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800411 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
412 "arm/musca_b1/sse_200",
413 "arm/mps3/an524", "cypress/psoc64",
Arthur She19c0e1a2021-06-02 11:06:19 -0700414 "arm/musca_b1/secure_enclave",
415 "stm/stm32l562e_dk"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800416 "toolchain_file": ["toolchain_GNUARM.cmake",
417 "toolchain_ARMCLANG.cmake"],
418 "psa_api": [True, False],
419 "isolation_level": ["1", "2"],
420 "test_regression": [True, False],
421 "test_psa_api": ["OFF"],
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800422 "cmake_build_type": ["Debug", "Release", "RelWithDebInfo"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800423 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800424 "with_bl2": [True, False],
425 "with_ns": [True, False],
426 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800427 "partition_ps": ["ON"],
Dean Birchd6ce2c82020-05-13 13:16:15 +0100428 },
429 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800430 "invalid": _common_tfm_invalid_configs + [
431 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800432 "*", "*", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800433 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800434 "*", "*", "*", "*", True, True, "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800435 ("arm/mps2/an521", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800436 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800437 ("arm/mps2/an519", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800438 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800439 ("arm/musca_b1/sse_200", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800440 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800441 ("arm/mps3/an524", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800442 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800443 ]
Karl Zhang81a76772020-05-11 18:28:52 +0800444 }
445
Karl Zhangaff558a2020-05-15 14:28:23 +0100446config_tfm_test = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800447 "tfm_platform": ["arm/mps2/an521",
448 "arm/musca_b1/sse_200", "arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800449 "toolchain_file": ["toolchain_ARMCLANG.cmake",
450 "toolchain_GNUARM.cmake"],
451 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800452 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800453 "test_regression": [True, False],
454 "test_psa_api": ["OFF"],
455 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800456 "with_otp": ["off"],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800457 "with_bl2": [True],
458 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800459 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800460 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800461 },
462 "common_params": _common_tfm_builder_cfg,
463 "invalid": _common_tfm_invalid_configs + []
464 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800465
Karl Zhangaff558a2020-05-15 14:28:23 +0100466config_tfm_test2 = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800467 "tfm_platform": ["arm/mps2/an519", "arm/mps3/an524"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800468 "toolchain_file": ["toolchain_ARMCLANG.cmake",
469 "toolchain_GNUARM.cmake"],
470 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800471 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800472 "test_regression": [True, False],
473 "test_psa_api": ["OFF"],
474 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800475 "with_otp": ["off"],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800476 "with_bl2": [True],
477 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800478 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800479 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800480 },
481 "common_params": _common_tfm_builder_cfg,
482 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800483 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800484 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800485 ]
486 }
Karl Zhangaff558a2020-05-15 14:28:23 +0100487
Karl Zhang14573bc2020-06-08 09:23:21 +0800488config_tfm_profile = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800489 "tfm_platform": ["arm/mps2/an519", "arm/mps2/an521",
490 "arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800491 "toolchain_file": ["toolchain_ARMCLANG.cmake",
492 "toolchain_GNUARM.cmake"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800493 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800494 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800495 "test_regression": [True, False],
496 "test_psa_api": ["OFF"],
497 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800498 "with_otp": ["off"],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800499 "with_bl2": [True],
500 "with_ns": [True],
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800501 "profile": ["profile_small", "profile_medium", "profile_large"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800502 "partition_ps": ["ON", "OFF"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800503 },
504 "common_params": _common_tfm_builder_cfg,
505 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800506 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800507 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800508 # Profile Large is only supported by AN521
Summer Qin3c2b5722021-05-26 10:43:45 +0800509 ("arm/mps2/an519", "*", "*",
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800510 "*", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800511 ("arm/musca_b1/sse_200", "*", "*",
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800512 "*", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800513 ]
514 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800515
Karl Zhangaff558a2020-05-15 14:28:23 +0100516config_tfm_test_OTP = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800517 "tfm_platform": ["arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800518 "toolchain_file": ["toolchain_ARMCLANG.cmake",
519 "toolchain_GNUARM.cmake"],
520 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800521 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800522 "test_regression": [True, False],
523 "test_psa_api": ["OFF"],
524 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800525 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800526 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800527 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800528 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800529 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800530 },
531 "common_params": _common_tfm_builder_cfg,
532 "invalid": _common_tfm_invalid_configs + []
533 }
Karl Zhangaff558a2020-05-15 14:28:23 +0100534
Minos Galanakisea421232019-06-20 17:11:28 +0100535config_MUSCA_B1 = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800536 "tfm_platform": ["arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800537 "toolchain_file": ["toolchain_ARMCLANG.cmake",
538 "toolchain_GNUARM.cmake"],
539 "psa_api": [True, False],
540 "isolation_level": ["1", "2"],
541 "test_regression": [True, False],
542 "test_psa_api": ["OFF"],
543 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800544 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800545 "with_bl2": [True],
546 "with_ns": [True, False],
547 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800548 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800549 },
550 "common_params": _common_tfm_builder_cfg,
551 "invalid": _common_tfm_invalid_configs + []
552 }
Minos Galanakisea421232019-06-20 17:11:28 +0100553
Mark Horvath8d281cd2020-12-07 15:20:26 +0100554config_MUSCA_B1_SE = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800555 "tfm_platform": ["arm/musca_b1/secure_enclave"],
Mark Horvath8d281cd2020-12-07 15:20:26 +0100556 "toolchain_file": ["toolchain_ARMCLANG.cmake",
557 "toolchain_GNUARM.cmake"],
558 "psa_api": [True],
559 "isolation_level": ["1"],
560 "test_regression": [False],
561 "test_psa_api": ["OFF"],
562 "cmake_build_type": ["Debug", "Release"],
563 "with_otp": ["off"],
564 "with_bl2": [True],
565 "with_ns": [False],
566 "profile": [""],
567 "partition_ps": ["ON"],
568 },
569 "common_params": _common_tfm_builder_cfg,
570 "invalid": _common_tfm_invalid_configs + []
571 }
572
Karl Zhangeffed972020-06-30 15:48:01 +0800573config_MUSCA_S1 = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800574 "tfm_platform": ["arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800575 "toolchain_file": ["toolchain_ARMCLANG.cmake",
576 "toolchain_GNUARM.cmake"],
577 "psa_api": [True, False],
578 "isolation_level": ["1", "2"],
579 "test_regression": [True, False],
580 "test_psa_api": ["OFF"],
581 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800582 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800583 "with_bl2": [True],
584 "with_ns": [True, False],
585 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800586 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800587 },
588 "common_params": _common_tfm_builder_cfg,
589 "invalid": _common_tfm_invalid_configs + []
590 }
Karl Zhangeffed972020-06-30 15:48:01 +0800591
Karl Zhangaff558a2020-05-15 14:28:23 +0100592config_release = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800593 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
594 "arm/musca_b1/sse_200", "arm/musca_s1",
595 "arm/mps3/an524"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800596 "toolchain_file": ["toolchain_ARMCLANG.cmake",
597 "toolchain_GNUARM.cmake"],
598 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800599 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800600 "test_regression": [True, False],
601 "test_psa_api": ["OFF"],
602 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800603 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800604 "with_bl2": [True, False],
605 "with_ns": [True, False],
606 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800607 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800608 },
609 "common_params": _common_tfm_builder_cfg,
610 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800611 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800612 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800613 ]
614 }
Karl Zhangaff558a2020-05-15 14:28:23 +0100615
616# Configure build manager to build several combinations
617config_AN521_PSA_API = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800618 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
619 "arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800620 "toolchain_file": ["toolchain_GNUARM.cmake",
621 "toolchain_ARMCLANG.cmake"],
622 "psa_api": [True, False],
623 "isolation_level": ["1", "2"],
624 "test_regression": [False],
625 "test_psa_api": ["IPC",
626 "CRYPTO",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800627 "INITIAL_ATTESTATION",
Xinyu Zhang39acb412021-07-09 20:35:19 +0800628 "STORAGE"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800629 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800630 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800631 "with_bl2": [True],
632 "with_ns": [True, False],
633 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800634 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100635 },
636 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800637 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800638 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800639 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800640 ]
Karl Zhangaff558a2020-05-15 14:28:23 +0100641 }
642
Karl Zhangaff558a2020-05-15 14:28:23 +0100643config_AN521_PSA_IPC = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800644 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
645 "arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800646 "toolchain_file": ["toolchain_GNUARM.cmake",
647 "toolchain_ARMCLANG.cmake"],
648 "psa_api": [True],
649 "isolation_level": ["1", "2"],
650 "test_regression": [False],
651 "test_psa_api": ["IPC"],
652 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800653 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800654 "with_bl2": [True],
655 "with_ns": [True, False],
656 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800657 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100658 },
659 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800660 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800661 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800662 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800663 ]
Karl Zhangaff558a2020-05-15 14:28:23 +0100664 }
665
Karl Zhang14573bc2020-06-08 09:23:21 +0800666config_nightly = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800667 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
668 "arm/musca_b1/sse_200", "arm/musca_s1",
669 "arm/mps3/an524", "cypress/psoc64",
Arthur She19c0e1a2021-06-02 11:06:19 -0700670 "arm/musca_b1/secure_enclave",
671 "stm/stm32l562e_dk"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800672 "toolchain_file": ["toolchain_GNUARM.cmake",
673 "toolchain_ARMCLANG.cmake"],
674 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800675 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800676 "test_regression": [True, False],
677 "test_psa_api": ["OFF"],
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800678 "cmake_build_type": ["Debug", "Release", "Minsizerel", "RelWithDebInfo"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800679 "with_otp": ["off"],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800680 "with_bl2": [True],
681 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800682 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800683 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800684 },
685 "common_params": _common_tfm_builder_cfg,
686 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800687 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800688 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800689 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800690 "*", "*", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800691 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800692 "*", "*", "*", "*", True, True, "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800693 ("arm/mps2/an521", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800694 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800695 ("arm/mps2/an519", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800696 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800697 ("arm/musca_b1/sse_200", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800698 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800699 ("arm/musca_s1", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800700 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800701 ("arm/mps3/an524", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800702 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800703 ]
704 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800705
Karl Zhang14573bc2020-06-08 09:23:21 +0800706config_nightly_profile = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800707 "tfm_platform": ["arm/mps2/an519", "arm/mps2/an521",
708 "arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800709 "toolchain_file": ["toolchain_ARMCLANG.cmake",
710 "toolchain_GNUARM.cmake"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800711 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800712 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800713 "test_regression": [True, False],
714 "test_psa_api": ["OFF"],
715 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800716 "with_otp": ["off"],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800717 "with_bl2": [True],
718 "with_ns": [True],
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800719 "profile": ["profile_small", "profile_medium", "profile_large"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800720 "partition_ps": ["ON", "OFF"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800721 },
722 "common_params": _common_tfm_builder_cfg,
723 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800724 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800725 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800726 # Profile Large is only supported by AN521
Summer Qin3c2b5722021-05-26 10:43:45 +0800727 ("arm/mps2/an519", "*", "*",
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800728 "*", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800729 ("arm/musca_b1/sse_200", "*", "*",
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800730 "*", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800731 ]
732 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800733
Karl Zhang14573bc2020-06-08 09:23:21 +0800734config_nightly_PSA_API = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800735 "tfm_platform": ["arm/mps2/an521", "arm/musca_b1/sse_200",
736 "arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800737 "toolchain_file": ["toolchain_GNUARM.cmake",
738 "toolchain_ARMCLANG.cmake"],
739 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800740 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800741 "test_regression": [False],
742 "test_psa_api": ["CRYPTO",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800743 "INITIAL_ATTESTATION",
Xinyu Zhang39acb412021-07-09 20:35:19 +0800744 "STORAGE"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800745 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800746 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800747 "with_bl2": [True],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800748 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800749 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800750 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800751 },
752 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800753 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800754 }
755
Karl Zhang14573bc2020-06-08 09:23:21 +0800756config_nightly_PSA_FF = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800757 "tfm_platform": ["arm/mps2/an521", "arm/musca_b1/sse_200",
758 "arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800759 "toolchain_file": ["toolchain_GNUARM.cmake",
760 "toolchain_ARMCLANG.cmake"],
761 "psa_api": [True],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800762 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800763 "test_regression": [False],
764 "test_psa_api": ["IPC"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800765 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800766 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800767 "with_bl2": [True],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800768 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800769 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800770 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800771 },
772 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800773 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800774 }
775
Karl Zhang14573bc2020-06-08 09:23:21 +0800776config_nightly_OTP = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800777 "tfm_platform": ["arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800778 "toolchain_file": ["toolchain_GNUARM.cmake",
779 "toolchain_ARMCLANG.cmake"],
780 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800781 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800782 "test_regression": [True],
783 "test_psa_api": ["OFF"],
784 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800785 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800786 "with_bl2": [True],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800787 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800788 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800789 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800790 },
791 "common_params": _common_tfm_builder_cfg,
792 "invalid": _common_tfm_invalid_configs + []
793 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800794
Xinyu Zhangfd70cfe2021-06-29 11:14:13 +0800795config_nightly_STM32L562E_DK = {"seed_params": {
796 "tfm_platform": ["stm/stm32l562e_dk"],
797 "toolchain_file": ["toolchain_GNUARM.cmake",
798 "toolchain_ARMCLANG.cmake"],
799 "psa_api": [True, False],
800 "isolation_level": ["1", "2", "3"],
801 "test_regression": [True],
802 "test_psa_api": ["OFF"],
803 "cmake_build_type": ["Release"],
804 "with_otp": ["off"],
805 "with_bl2": [True],
806 "with_ns": [True],
807 "profile": [""],
808 "partition_ps": ["ON"],
809 },
810 "common_params": _common_tfm_builder_cfg,
811 "invalid": _common_tfm_invalid_configs + []
812 }
813
Karl Zhang14573bc2020-06-08 09:23:21 +0800814config_pp_test = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800815 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
Xinyu Zhangd1ef9982021-06-24 11:31:11 +0800816 "arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800817 "toolchain_file": ["toolchain_GNUARM.cmake",
818 "toolchain_ARMCLANG.cmake"],
819 "psa_api": [True, False],
Karl Zhangde36b772021-01-08 10:17:03 +0800820 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800821 "test_regression": [True],
822 "test_psa_api": ["OFF"],
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800823 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800824 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800825 "with_bl2": [True],
826 "with_ns": [True, False],
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800827 "profile": ["", "profile_small", "profile_medium"],
828 "partition_ps": ["ON", "OFF"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800829 },
830 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800831 "valid": [
Summer Qin3c2b5722021-05-26 10:43:45 +0800832 ("arm/mps2/an521", "toolchain_GNUARM.cmake",
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800833 False, "1", 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, "2", False, "OFF", "Debug",
837 "off", True, True, "", "ON"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800838 ("arm/mps2/an521", "toolchain_ARMCLANG.cmake",
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800839 True, "3", False, "OFF", "Release",
840 "off", True, True, "", "ON"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800841 ("arm/mps2/an521", "toolchain_GNUARM.cmake",
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800842 True, "2", False, "OFF", "Debug",
843 "off", True, True, "profile_medium", "ON"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800844 ("arm/mps2/an521", "toolchain_GNUARM.cmake",
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800845 True, "3", False, "OFF", "Debug",
846 "off", True, True, "profile_large", "ON"),
Xinyu Zhangd1ef9982021-06-24 11:31:11 +0800847 # AN521_GNUARM_PSA_2_REG_Release_BL2_NS_MEDIUM_PSOFF
848 ("arm/mps2/an521", "toolchain_GNUARM.cmake", True,
849 "2", True, "OFF", "Release", "off", True, True, "profile_medium", "OFF"),
850 # MUSCA_B1_ARMCLANG_PSA_3_REG_Debug_BL2_NS
851 ("arm/musca_b1/sse_200", "toolchain_ARMCLANG.cmake",True,
852 "3", True, "OFF", "Debug", "off", True, True, "", "ON"),
853 # MUSCA_B1_GNUARM_1_REG_Minsizerel_BL2_NS
854 ("arm/musca_b1/sse_200", "toolchain_GNUARM.cmake", False,
855 "1", True, "OFF", "Minsizerel", "off", True, True, "", "ON"),
856 # stm32l562e_dk_ARMCLANG_PSA_1_REG_Release_BL2_NS
857 ("stm/stm32l562e_dk", "toolchain_ARMCLANG.cmake", True,
858 "1", True, "OFF", "Release", "off", True, True, "", "ON"),
859 # stm32l562e_dk_GNUARM_PSA_2_REG_Release_BL2_NS
860 ("stm/stm32l562e_dk", "toolchain_GNUARM.cmake", True,
861 "2", True, "OFF", "Release", "off", True, True, "", "ON"),
862 # stm32l562e_dk_GNUARM_PSA_3_REG_Release_BL2_NS
863 ("stm/stm32l562e_dk", "toolchain_GNUARM.cmake", True,
864 "3", True, "OFF", "Release", "off", True, True, "", "ON"),
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800865 ],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800866 "invalid": _common_tfm_invalid_configs + [
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800867 # invalid configs that are not supported by TF-M
Summer Qin3c2b5722021-05-26 10:43:45 +0800868 ("arm/musca_s1", "*", "*", "*", "*", "*",
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800869 "*", "*", "*", "*", "profile_medium", "*"),
870 # valid configs supported by TF-M but not needed in per-patch
871 ("*", "*", "*", "1", "*", "*", "Release",
872 "*", "*", "*", "*", "*"),
873 ("*", "*", "*", "1", "*", "*", "Minsizerel",
874 "*", "*", "*", "*", "*"),
875 ("*", "*", "*", "2", "*", "*", "Debug",
876 "*", "*", "*", "*", "*"),
877 ("*", "*", "*", "2", "*", "*", "Minsizerel",
878 "*", "*", "*", "*", "*"),
879 ("*", "*", "*", "3", "*", "*", "Debug",
880 "*", "*", "*", "*", "*"),
881 ("*", "*", "*", "3", "*", "*", "Release",
882 "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800883 ("arm/mps2/an519", "*", "*", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800884 "*", "*", "*", "*", "profile_small", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800885 ("arm/musca_s1", "*", "*", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800886 "*", "*", "*", "*", "profile_small", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800887 ("arm/mps2/an519", "*", "*", "*", "*", "*",
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800888 "*", "*", "*", "*", "profile_medium", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800889 ("arm/mps2/an521", "*", "*", "*", "*", "*",
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800890 "*", "*", "*", "*", "profile_medium", "*"),
891 ("*", "toolchain_GNUARM.cmake", "*", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800892 "*", "*", "*", "*", "profile_small", "*"),
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800893 ("*", "toolchain_ARMCLANG.cmake", "*", "*", "*", "*",
894 "*", "*", "*", "*", "profile_medium", "*"),
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800895 ("*", "toolchain_ARMCLANG.cmake", False, "*", "*", "*",
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800896 "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800897 ]
898 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800899
Karl Zhang14573bc2020-06-08 09:23:21 +0800900config_pp_OTP = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800901 "tfm_platform": ["arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800902 "toolchain_file": ["toolchain_GNUARM.cmake"],
903 "psa_api": [True, False],
904 "isolation_level": ["1", "2"],
905 "test_regression": [True],
906 "test_psa_api": ["OFF"],
907 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800908 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800909 "with_bl2": [True],
910 "with_ns": [True, False],
911 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800912 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800913 },
914 "common_params": _common_tfm_builder_cfg,
915 "invalid": _common_tfm_invalid_configs + []
916 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800917
918# Configure build manager to build several combinations
919config_pp_PSA_API = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800920 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800921 "toolchain_file": ["toolchain_GNUARM.cmake"],
922 "psa_api": [True],
923 "isolation_level": ["2"],
924 "test_regression": [False],
925 "test_psa_api": ["IPC",
926 "CRYPTO",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800927 "INITIAL_ATTESTATION",
Xinyu Zhang39acb412021-07-09 20:35:19 +0800928 "STORAGE"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800929 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800930 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800931 "with_bl2": [True],
932 "with_ns": [True, False],
933 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800934 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800935 },
936 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800937 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800938 }
939
Karl Zhang14573bc2020-06-08 09:23:21 +0800940config_pp_PSoC64 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800941 "tfm_platform": ["cypress/psoc64"],
942 "toolchain_file": ["toolchain_GNUARM.cmake"],
943 "psa_api": [True],
944 "isolation_level": ["1", "2"],
945 "test_regression": [True],
946 "test_psa_api": ["OFF"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800947 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800948 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800949 "with_bl2": [False],
950 "with_ns": [True, False],
951 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800952 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800953 },
954 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800955 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800956 }
957
Xinyu Zhangf25856a2021-06-17 14:06:46 +0800958config_cov_an519 = {"seed_params": {
959 "tfm_platform": ["arm/mps2/an519"],
960 "toolchain_file": ["toolchain_GNUARM.cmake"],
961 "psa_api": [True, False],
962 "isolation_level": ["1", "2", "3"],
963 "test_regression": [True, False],
964 "test_psa_api": ["OFF"],
965 "cmake_build_type": ["Debug", "Release"],
966 "with_otp": ["off"],
967 "with_bl2": [True],
968 "with_ns": [True],
969 "profile": ["", "profile_small", "profile_medium"],
970 "partition_ps": ["ON", "OFF"],
971 },
972 "common_params": _common_tfm_builder_cfg,
973 "invalid": _common_tfm_invalid_configs + []
974 }
975
976config_cov_an521 = {"seed_params": {
977 "tfm_platform": ["arm/mps2/an521"],
978 "toolchain_file": ["toolchain_GNUARM.cmake"],
979 "psa_api": [True, False],
980 "isolation_level": ["1", "2", "3"],
981 "test_regression": [True, False],
982 "test_psa_api": ["OFF"],
983 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
984 "with_otp": ["off"],
985 "with_bl2": [True],
986 "with_ns": [True],
987 "profile": ["", "profile_small", "profile_medium", "profile_large"],
988 "partition_ps": ["ON", "OFF"],
989 },
990 "common_params": _common_tfm_builder_cfg,
991 "invalid": _common_tfm_invalid_configs + []
992 }
993
Minos Galanakisea421232019-06-20 17:11:28 +0100994# Configruation used for document building
995config_doxygen = {"common_params": {
996 "config_type": "tf-m_documents",
997 "codebase_root_dir": "tf-m",
Summer Qin3c2b5722021-05-26 10:43:45 +0800998 "build_cmds": {"all": ["-DTFM_PLATFORM=arm/mps2/an521 "
Fathi Boudra324fee72020-11-20 10:31:12 +0100999 "-DTFM_TOOLCHAIN_FILE=%(_tfm_code_dir_)s/toolchain_GNUARM.cmake"
Minos Galanakisea421232019-06-20 17:11:28 +01001000 "-DCMAKE_BUILD_TYPE=Debug "
Minos Galanakisea421232019-06-20 17:11:28 +01001001 "%(_tbm_code_dir_)s/",
Xinyu Zhangb708f572020-09-15 11:43:46 +08001002 "cmake --build ./ -- docs"]},
1003 "artifact_capture_rex": r'%(_tbm_build_dir_)s/docs/'
1004 r'reference_manual/(?:latex|html)'
Minos Galanakisea421232019-06-20 17:11:28 +01001005 r'/(\w+\.(?:html|md|pdf))$',
1006 },
Xinyu Zhangb708f572020-09-15 11:43:46 +08001007 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +01001008 }
1009
Karl Zhangaff558a2020-05-15 14:28:23 +01001010# Configuration used in testing
Minos Galanakisea421232019-06-20 17:11:28 +01001011config_debug = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +08001012 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001013 "toolchain_file": ["toolchain_ARMCLANG.cmake"],
1014 "psa_api": [False],
1015 "isolation_level": ["1"],
1016 "test_regression": [False],
1017 "test_psa_api": ["OFF"],
Minos Galanakisea421232019-06-20 17:11:28 +01001018 "cmake_build_type": ["Debug"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +08001019 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001020 "with_bl2": [True],
1021 "with_ns": [True],
1022 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001023 "partition_ps": ["ON"],
Minos Galanakisea421232019-06-20 17:11:28 +01001024 },
1025 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +08001026 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +01001027 }
1028
Dean Birch4c6ad622020-03-13 11:28:03 +00001029# Configuration used in CI
Xinyu Zhangb708f572020-09-15 11:43:46 +08001030config_ci = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +08001031 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001032 "toolchain_file": ["toolchain_ARMCLANG.cmake",
1033 "toolchain_GNUARM.cmake"],
1034 "psa_api": [True, False],
1035 "isolation_level": ["1", "2"],
1036 "test_regression": [True, False],
1037 "test_psa_api": ["OFF"],
1038 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +08001039 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001040 "with_bl2": [True, False],
1041 "with_ns": [True],
1042 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001043 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001044 },
1045 "common_params": _common_tfm_builder_cfg,
1046 "invalid": _common_tfm_invalid_configs + [
1047 ("*", "toolchain_ARMCLANG.cmake", True, "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001048 "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +08001049 ("*", "toolchain_ARMCLANG.cmake", False, "1", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001050 "*", "*", False, "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +08001051 ]
1052 }
Matthew Hartfb6fd362020-03-04 21:03:59 +00001053
Xinyu Zhangb708f572020-09-15 11:43:46 +08001054config_lava_debug = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +08001055 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001056 "toolchain_file": ["toolchain_GNUARM.cmake"],
1057 "psa_api": [True, False],
1058 "isolation_level": ["1", "2"],
1059 "test_regression": [True],
1060 "test_psa_api": ["OFF"],
1061 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +08001062 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001063 "with_bl2": [True, False],
1064 "with_ns": [True, False],
1065 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001066 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001067 },
1068 "common_params": _common_tfm_builder_cfg,
1069 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +08001070 ("arm/mps2/an521", "toolchain_GNUARM.cmake", True, "2", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001071 "*", "*", True, "*", "*", "*")
Xinyu Zhangb708f572020-09-15 11:43:46 +08001072 ]
1073 }
Dean Birch4c6ad622020-03-13 11:28:03 +00001074
Karl Zhangaff558a2020-05-15 14:28:23 +01001075_builtin_configs = {
Karl Zhang14573bc2020-06-08 09:23:21 +08001076 #release test group
Karl Zhangaff558a2020-05-15 14:28:23 +01001077 "tfm_test": config_tfm_test,
1078 "tfm_test2": config_tfm_test2,
Karl Zhang14573bc2020-06-08 09:23:21 +08001079 "tfm_profile": config_tfm_profile,
Karl Zhangaff558a2020-05-15 14:28:23 +01001080 "tfm_test_otp": config_tfm_test_OTP,
1081 "psa_api": config_PSA_API,
1082 "psa_api_otp": config_PSA_API_OTP,
1083 "psa_ff": config_PSA_FF,
1084 "psa_ff_otp": config_PSA_FF_OTP,
Karl Zhang14573bc2020-06-08 09:23:21 +08001085 "tfm_psoc64": config_PSOC64,
Arthur She19c0e1a2021-06-02 11:06:19 -07001086 "tfm_stm32l562e_dk": config_STM32L562E_DK,
Karl Zhang14573bc2020-06-08 09:23:21 +08001087
1088 #nightly test group
1089 "nightly_test": config_nightly,
1090 "nightly_profile": config_nightly_profile,
1091 "nightly_psa_api": config_nightly_PSA_API,
1092 "nightly_ff": config_nightly_PSA_FF,
1093 "nightly_otp": config_nightly_OTP,
Xinyu Zhangfd70cfe2021-06-29 11:14:13 +08001094 "nightly_stm32l562e_dk": config_nightly_STM32L562E_DK,
Karl Zhang14573bc2020-06-08 09:23:21 +08001095
1096 #per patch test group
1097 "pp_test": config_pp_test,
1098 "pp_OTP": config_pp_OTP,
1099 "pp_PSA_API": config_pp_PSA_API,
1100 "pp_psoc64": config_pp_PSoC64,
1101
Xinyu Zhangf25856a2021-06-17 14:06:46 +08001102 #code coverage test group
1103 "coverage_an519": config_cov_an519,
1104 "coverage_an521": config_cov_an521,
1105
Karl Zhang14573bc2020-06-08 09:23:21 +08001106 #full test group in the old CI
Karl Zhangaff558a2020-05-15 14:28:23 +01001107 "full": config_full,
Karl Zhang14573bc2020-06-08 09:23:21 +08001108
1109 #specific test group
Karl Zhangaff558a2020-05-15 14:28:23 +01001110 "an524": config_AN524,
Minos Galanakisea421232019-06-20 17:11:28 +01001111 "an521": config_AN521,
Karl Zhang14573bc2020-06-08 09:23:21 +08001112 "an521_psa_api": config_AN521_PSA_API,
1113 "an521_psa_ipc": config_AN521_PSA_IPC,
Minos Galanakisea421232019-06-20 17:11:28 +01001114 "an519": config_AN519,
Minos Galanakisea421232019-06-20 17:11:28 +01001115 "musca_b1": config_MUSCA_B1,
Mark Horvath8d281cd2020-12-07 15:20:26 +01001116 "musca_b1_se": config_MUSCA_B1_SE,
Karl Zhangeffed972020-06-30 15:48:01 +08001117 "musca_s1": config_MUSCA_S1,
Karl Zhang96dfe2d2020-05-11 11:31:40 +08001118 "psoc64": config_PSOC64,
Minos Galanakisea421232019-06-20 17:11:28 +01001119 "ipc": config_IPC,
1120 "doxygen": config_doxygen,
Dean Birch4c6ad622020-03-13 11:28:03 +00001121 "debug": config_debug,
Karl Zhangaff558a2020-05-15 14:28:23 +01001122 "release": config_release,
Matthew Hartfb6fd362020-03-04 21:03:59 +00001123 "debug": config_debug,
Karl Zhang14573bc2020-06-08 09:23:21 +08001124
1125 #DevOps team test group
Matthew Hartfb6fd362020-03-04 21:03:59 +00001126 "lava_debug": config_lava_debug,
Xinyu Zhanga1000582020-12-04 15:25:24 +08001127 "ci": config_ci}
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001128
1129if __name__ == '__main__':
1130 import os
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001131
Minos Galanakisea421232019-06-20 17:11:28 +01001132 # Default behavior is to export refference config when called
1133 _dir = os.getcwd()
1134 from utils import save_json
1135 for _cname, _cfg in _builtin_configs.items():
1136 _fname = os.path.join(_dir, _cname + ".json")
1137 print("Exporting config %s" % _fname)
1138 save_json(_fname, _cfg)