blob: d67564dce56569182b5d06162fb2f66f95953692 [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"
Xinyu Zhang06286a92021-07-22 14:00:51 +080020__version__ = "1.4.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;"
Arthur She07c91b52021-07-15 15:03:10 -0700102 "BIN_FILES=$(grep -o '\/.*\.bin' TFM_UPDATE.sh | sed 's/^/bin/');"
103 "tar jcf ./bin/stm32l562e-dk-tfm.tar.bz2 regression.sh TFM_UPDATE.sh ${BIN_FILES};"
104 "popd")]
Minos Galanakisea421232019-06-20 17:11:28 +0100105 },
106
107 # (Optional) If set will fail if those artefacts are missing post build
108 "required_artefacts": {"all": [
Xinyu Zhangb708f572020-09-15 11:43:46 +0800109 "%(_tbm_build_dir_)s/bin/"
110 "tfm_s.bin",
111 "%(_tbm_build_dir_)s/bin/"
112 "tfm_ns.bin"],
Summer Qin3c2b5722021-05-26 10:43:45 +0800113 "arm/musca_b1/sse_200": [
Xinyu Zhangb708f572020-09-15 11:43:46 +0800114 "%(_tbm_build_dir_)s/bin/"
115 "tfm.hex",
116 "%(_tbm_build_dir_)s/bin/"
Xinyu Zhang694eb492020-11-04 18:29:08 +0800117 "bl2.bin",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800118 "%(_tbm_build_dir_)s/bin/"
119 "tfm_sign.bin"],
Summer Qin3c2b5722021-05-26 10:43:45 +0800120 "arm/musca_s1": [
Xinyu Zhangb708f572020-09-15 11:43:46 +0800121 "%(_tbm_build_dir_)s/bin/"
122 "tfm.hex",
123 "%(_tbm_build_dir_)s/bin/"
Xinyu Zhang694eb492020-11-04 18:29:08 +0800124 "bl2.bin",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800125 "%(_tbm_build_dir_)s/bin/"
126 "tfm_sign.bin"]
Minos Galanakisea421232019-06-20 17:11:28 +0100127 }
128}
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100129
Xinyu Zhangb708f572020-09-15 11:43:46 +0800130# List of all build configs that are impossible under all circumstances
131_common_tfm_invalid_configs = [
Xinyu Zhang459a1982021-07-21 22:34:49 +0800132 # LR_CODE size exceeds limit on MUSCA_B1 & MUSCA_S1 with regression tests in Debug mode built with ARMCLANG
133 ("arm/musca_b1/sse_200", "toolchain_ARMCLANG.cmake", "*", "*", True, "OFF", "Debug", "*", "*", "*", "", "*"),
134 ("arm/musca_s1", "toolchain_ARMCLANG.cmake", "*", "*", True, "OFF", "Debug", "*", "*", "*", "", "*"),
Karl Zhangc858a722021-03-22 21:38:19 +0800135 # Load range overlap on Musca for IPC Debug type: T895
Summer Qin3c2b5722021-05-26 10:43:45 +0800136 ("arm/musca_b1/sse_200", "toolchain_ARMCLANG.cmake", "*", "*", "*", "IPC", "Debug", "*", "*", "*", "*", "*"),
137 ("arm/musca_s1", "toolchain_ARMCLANG.cmake", "*", "*", "*", "IPC", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800138 # LVL2 and LVL3 requires PSA api
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800139 ("*", "*", False, "2", "*", "*", "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800140 ("*", "*", False, "3", "*", "*", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800141 # Regression requires NS
142 ("*", "*", "*", "*", True, "*", "*", "*", "*", False, "*", "*"),
Xinyu Zhang11d66112020-11-04 15:38:29 +0800143 # psoc64 requires PSA api
144 ("cypress/psoc64", "*", False, "*", "*", "*", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800145 # No PSA_ACK with regression
146 ("*", "*", "*", "*", True, "IPC", "*", "*", "*", "*", "*", "*"),
147 ("*", "*", "*", "*", True, "CRYPTO", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800148 ("*", "*", "*", "*", True, "INITIAL_ATTESTATION", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang39acb412021-07-09 20:35:19 +0800149 ("*", "*", "*", "*", True, "STORAGE", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800150 # PSA_ACK requires NS
151 ("*", "*", "*", "*", "*", "IPC", "*", "*", "*", False, "*", "*"),
152 ("*", "*", "*", "*", "*", "CRYPTO", "*", "*", "*", False, "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800153 ("*", "*", "*", "*", "*", "INITIAL_ATTESTATION", "*", "*", "*", False, "*", "*"),
Xinyu Zhang39acb412021-07-09 20:35:19 +0800154 ("*", "*", "*", "*", "*", "STORAGE", "*", "*", "*", False, "*", "*"),
Xinyu Zhang3227da42021-03-19 17:37:17 +0800155 # PSA_ACK does not support LVL3
156 ("*", "*", "*", "3", "*", "IPC", "*", "*", "*", "*", "*", "*"),
157 ("*", "*", "*", "3", "*", "CRYPTO", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang3227da42021-03-19 17:37:17 +0800158 ("*", "*", "*", "3", "*", "INITIAL_ATTESTATION", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang39acb412021-07-09 20:35:19 +0800159 ("*", "*", "*", "3", "*", "STORAGE", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800160 # Musca requires BL2
Summer Qin3c2b5722021-05-26 10:43:45 +0800161 ("arm/musca_b1/sse_200", "*", "*", "*", "*", "*", "*", "*", False, "*", "*", "*"),
162 ("arm/musca_s1", "*", "*", "*", "*", "*", "*", "*", False, "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800163 # psoc64 cannot use BL2
164 ("cypress/psoc64", "*", "*", "*", "*", "*", "*", "*", True, "*", "*", "*"),
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800165 # psoc64 does not support Debug build type
166 ("cypress/psoc64", "*", "*", "*", "*", "*", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800167 # Musca b1 does not support Profile S
Summer Qin3c2b5722021-05-26 10:43:45 +0800168 ("arm/musca_b1/sse_200", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_small", "*"),
Mark Horvath8d281cd2020-12-07 15:20:26 +0100169 # Musca B1 Secure Enclave requires PSA api, BL2, and supports only Isolation Level 1
Summer Qin3c2b5722021-05-26 10:43:45 +0800170 ("arm/musca_b1/secure_enclave", "*", False, "*", "*", "*", "*", "*", "*", "*", "*", "*"),
171 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "*", "*", "*", False, "*", "*", "*"),
172 ("arm/musca_b1/secure_enclave", "*", "*", "2", "*", "*", "*", "*", "*", "*", "*", "*"),
Mark Horvath8d281cd2020-12-07 15:20:26 +0100173 # Musca B1 Secure Enclave does not support tests, profiles, NS side building
Summer Qin3c2b5722021-05-26 10:43:45 +0800174 ("arm/musca_b1/secure_enclave", "*", "*", "*", True, "*", "*", "*", "*", "*", "*", "*"),
175 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "IPC", "*", "*", "*", "*", "*", "*"),
176 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "CRYPTO", "*", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800177 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "INITIAL_ATTESTATION", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang39acb412021-07-09 20:35:19 +0800178 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "STORAGE", "*", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800179 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_small", "*"),
180 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_medium", "*"),
181 ("arm/musca_b1/secure_enclave", "*", "*", "*", "*", "*", "*", "*", "*", True, "*", "*"),
Xinyu Zhang709c1542020-11-02 18:41:07 +0800182 # PARTITION_PS could be OFF only for Profile S and M
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800183 ("*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "", "OFF"),
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800184 ("*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_large", "OFF"),
Xinyu Zhang709c1542020-11-02 18:41:07 +0800185 # PARTITION_PS should be OFF for Profile S
186 ("*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "profile_small", "ON"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800187 # Proile M only support for PSA_API
188 ("*", "*", False, "*", "*", "*", "*", "*", "*", "*", "profile_medium", "*"),
189 # Profile M only support for Isolation Level 2
190 ("*", "*", "*", "1", "*", "*", "*", "*", "*", "*", "profile_medium", "*"),
Xinyu Zhange8de4512020-11-13 10:37:56 +0800191 ("*", "*", "*", "3", "*", "*", "*", "*", "*", "*", "profile_medium", "*"),
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800192 # Profile L only support for Isolation Level 3
193 ("*", "*", "*", "1", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
194 ("*", "*", "*", "2", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800195 # Profile S does not support PSA_API
196 ("*", "*", True, "*", "*", "*", "*", "*", "*", "*", "profile_small", "*"),
197 # Profile S only supports Isolation Level 2
198 ("*", "*", "*", "2", "*", "*", "*", "*", "*", "*", "profile_small", "*"),
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800199 # Only AN521 and MUSCA_B1 support Isolation Level 3
Summer Qin3c2b5722021-05-26 10:43:45 +0800200 ("arm/mps2/an519", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
201 ("arm/mps3/an524", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
202 ("arm/musca_s1", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800203 ("cypress/psoc64", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800204 ("arm/musca_b1/secure_enclave", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
Arthur She19c0e1a2021-06-02 11:06:19 -0700205 # stm/stm32l562e_dk uses BL2
206 ("stm/stm32l562e_dk", "*", "*", "*", "*", "*", "*", "*", False, "*", "*", "*"),
207 # stm/stm32l562e_dk does not support Debug build type
208 ("stm/stm32l562e_dk", "*", "*", "*", "*", "*", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800209 ]
210
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100211# Configure build manager to build several combinations
Karl Zhangaff558a2020-05-15 14:28:23 +0100212config_AN524 = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800213 "tfm_platform": ["arm/mps3/an524"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800214 "toolchain_file": ["toolchain_GNUARM.cmake",
215 "toolchain_ARMCLANG.cmake"],
216 "psa_api": [True, False],
217 "isolation_level": ["1", "2"],
218 "test_regression": [True, False],
219 "test_psa_api": ["OFF"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100220 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800221 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800222 "with_bl2": [True, False],
223 "with_ns": [True, False],
224 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800225 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100226 },
227 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800228 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100229 }
230
Karl Zhangaff558a2020-05-15 14:28:23 +0100231config_AN521 = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800232 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800233 "toolchain_file": ["toolchain_GNUARM.cmake",
234 "toolchain_ARMCLANG.cmake"],
235 "psa_api": [True, False],
236 "isolation_level": ["1", "2"],
237 "test_regression": [True, False],
238 "test_psa_api": ["OFF"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100239 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800240 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800241 "with_bl2": [True, False],
242 "with_ns": [True, False],
243 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800244 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100245 },
246 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800247 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100248 }
249
Karl Zhangaff558a2020-05-15 14:28:23 +0100250config_PSA_API = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800251 "tfm_platform": ["arm/mps2/an521", "arm/musca_b1/sse_200",
252 "arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800253 "toolchain_file": ["toolchain_GNUARM.cmake",
254 "toolchain_ARMCLANG.cmake"],
255 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800256 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800257 "test_regression": [False],
258 "test_psa_api": ["CRYPTO",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800259 "INITIAL_ATTESTATION",
Xinyu Zhang39acb412021-07-09 20:35:19 +0800260 "STORAGE"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100261 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800262 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800263 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800264 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800265 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800266 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100267 },
268 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800269 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100270 }
271
Karl Zhangaff558a2020-05-15 14:28:23 +0100272config_PSA_FF = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800273 "tfm_platform": ["arm/mps2/an521", "arm/musca_b1/sse_200",
274 "arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800275 "toolchain_file": ["toolchain_GNUARM.cmake",
276 "toolchain_ARMCLANG.cmake"],
277 "psa_api": [True],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800278 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800279 "test_regression": [False],
280 "test_psa_api": ["IPC"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100281 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800282 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800283 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800284 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800285 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800286 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100287 },
288 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800289 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100290 }
291
Karl Zhangaff558a2020-05-15 14:28:23 +0100292config_PSA_API_OTP = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800293 "tfm_platform": ["arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800294 "toolchain_file": ["toolchain_GNUARM.cmake",
295 "toolchain_ARMCLANG.cmake"],
296 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800297 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800298 "test_regression": [False],
299 "test_psa_api": ["CRYPTO",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800300 "INITIAL_ATTESTATION",
Xinyu Zhang39acb412021-07-09 20:35:19 +0800301 "STORAGE"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100302 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800303 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800304 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800305 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800306 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800307 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100308 },
309 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800310 "invalid": _common_tfm_invalid_configs + []
Karl Zhangaff558a2020-05-15 14:28:23 +0100311 }
Minos Galanakisea421232019-06-20 17:11:28 +0100312
Xinyu Zhangb708f572020-09-15 11:43:46 +0800313config_PSA_FF_OTP = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800314 "tfm_platform": ["arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800315 "toolchain_file": ["toolchain_GNUARM.cmake",
316 "toolchain_ARMCLANG.cmake"],
317 "psa_api": [True],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800318 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800319 "test_regression": [False],
320 "test_psa_api": ["IPC"],
321 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800322 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800323 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800324 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800325 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800326 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800327 },
328 "common_params": _common_tfm_builder_cfg,
329 "invalid": _common_tfm_invalid_configs + []
330 }
331
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800332config_PSOC64 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800333 "tfm_platform": ["cypress/psoc64"],
334 "toolchain_file": ["toolchain_GNUARM.cmake",
335 "toolchain_ARMCLANG.cmake"],
336 "psa_api": [True],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800337 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800338 "test_regression": [True],
339 "test_psa_api": ["OFF"],
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800340 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800341 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800342 "with_bl2": [False],
343 "with_ns": [True, False],
344 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800345 "partition_ps": ["ON"],
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800346 },
347 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800348 "invalid": _common_tfm_invalid_configs + []
Karl Zhang96dfe2d2020-05-11 11:31:40 +0800349 }
350
Arthur She19c0e1a2021-06-02 11:06:19 -0700351config_STM32L562E_DK = {"seed_params": {
352 "tfm_platform": ["stm/stm32l562e_dk"],
353 "toolchain_file": ["toolchain_GNUARM.cmake",
354 "toolchain_ARMCLANG.cmake"],
355 "psa_api": [True, False],
356 "isolation_level": ["1", "2", "3"],
357 "test_regression": [True],
358 "test_psa_api": ["OFF"],
359 "cmake_build_type": ["Release"],
360 "with_otp": ["off"],
361 "with_bl2": [True],
362 "with_ns": [True],
363 "profile": [""],
364 "partition_ps": ["ON"],
365 },
366 "common_params": _common_tfm_builder_cfg,
367 "invalid": _common_tfm_invalid_configs + []
368 }
369
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800370config_diphda = {"seed_params": {
371 "tfm_platform": ["arm/diphda"],
372 "toolchain_file": ["toolchain_GNUARM.cmake"],
373 "psa_api": [True],
374 "isolation_level": ["1"],
375 "test_regression": [False],
376 "test_psa_api": ["OFF"],
377 "cmake_build_type": ["Debug"],
378 "with_otp": ["off"],
379 "with_bl2": [True],
380 "with_ns": [False],
381 "profile": [""],
382 "partition_ps": ["ON"],
383 },
384 "common_params": _common_tfm_builder_cfg,
385 "invalid": _common_tfm_invalid_configs + []
386 }
387
Minos Galanakisea421232019-06-20 17:11:28 +0100388config_AN519 = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800389 "tfm_platform": ["arm/mps2/an519"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800390 "toolchain_file": ["toolchain_GNUARM.cmake",
391 "toolchain_ARMCLANG.cmake"],
392 "psa_api": [True, False],
393 "isolation_level": ["1", "2"],
394 "test_regression": [True, False],
395 "test_psa_api": ["OFF"],
Minos Galanakisea421232019-06-20 17:11:28 +0100396 "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"],
Minos Galanakisea421232019-06-20 17:11:28 +0100402 },
403 "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
Xinyu Zhangb708f572020-09-15 11:43:46 +0800407config_IPC = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800408 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
409 "arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800410 "toolchain_file": ["toolchain_GNUARM.cmake",
411 "toolchain_ARMCLANG.cmake"],
412 "psa_api": [True],
413 "isolation_level": ["1", "2"],
414 "test_regression": [True, False],
415 "test_psa_api": ["OFF"],
416 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800417 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800418 "with_bl2": [True, False],
419 "with_ns": [True, False],
420 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800421 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800422 },
Minos Galanakisea421232019-06-20 17:11:28 +0100423 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800424 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +0100425 }
426
Minos Galanakisea421232019-06-20 17:11:28 +0100427config_full = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800428 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
429 "arm/musca_b1/sse_200",
430 "arm/mps3/an524", "cypress/psoc64",
Arthur She19c0e1a2021-06-02 11:06:19 -0700431 "arm/musca_b1/secure_enclave",
432 "stm/stm32l562e_dk"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800433 "toolchain_file": ["toolchain_GNUARM.cmake",
434 "toolchain_ARMCLANG.cmake"],
435 "psa_api": [True, False],
436 "isolation_level": ["1", "2"],
437 "test_regression": [True, False],
438 "test_psa_api": ["OFF"],
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800439 "cmake_build_type": ["Debug", "Release", "RelWithDebInfo"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800440 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800441 "with_bl2": [True, False],
442 "with_ns": [True, False],
443 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800444 "partition_ps": ["ON"],
Dean Birchd6ce2c82020-05-13 13:16:15 +0100445 },
446 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800447 "invalid": _common_tfm_invalid_configs + [
448 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800449 "*", "*", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800450 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800451 "*", "*", "*", "*", True, True, "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800452 ("arm/mps2/an521", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800453 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800454 ("arm/mps2/an519", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800455 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800456 ("arm/musca_b1/sse_200", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800457 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800458 ("arm/mps3/an524", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800459 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800460 ]
Karl Zhang81a76772020-05-11 18:28:52 +0800461 }
462
Karl Zhangaff558a2020-05-15 14:28:23 +0100463config_tfm_test = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800464 "tfm_platform": ["arm/mps2/an521",
465 "arm/musca_b1/sse_200", "arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800466 "toolchain_file": ["toolchain_ARMCLANG.cmake",
467 "toolchain_GNUARM.cmake"],
468 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800469 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800470 "test_regression": [True, False],
471 "test_psa_api": ["OFF"],
472 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800473 "with_otp": ["off"],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800474 "with_bl2": [True],
475 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800476 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800477 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800478 },
479 "common_params": _common_tfm_builder_cfg,
480 "invalid": _common_tfm_invalid_configs + []
481 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800482
Karl Zhangaff558a2020-05-15 14:28:23 +0100483config_tfm_test2 = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800484 "tfm_platform": ["arm/mps2/an519", "arm/mps3/an524"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800485 "toolchain_file": ["toolchain_ARMCLANG.cmake",
486 "toolchain_GNUARM.cmake"],
487 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800488 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800489 "test_regression": [True, False],
490 "test_psa_api": ["OFF"],
491 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800492 "with_otp": ["off"],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800493 "with_bl2": [True],
494 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800495 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800496 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800497 },
498 "common_params": _common_tfm_builder_cfg,
499 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800500 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800501 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800502 ]
503 }
Karl Zhangaff558a2020-05-15 14:28:23 +0100504
Karl Zhang14573bc2020-06-08 09:23:21 +0800505config_tfm_profile = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800506 "tfm_platform": ["arm/mps2/an519", "arm/mps2/an521",
507 "arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800508 "toolchain_file": ["toolchain_ARMCLANG.cmake",
509 "toolchain_GNUARM.cmake"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800510 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800511 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800512 "test_regression": [True, False],
513 "test_psa_api": ["OFF"],
514 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800515 "with_otp": ["off"],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800516 "with_bl2": [True],
517 "with_ns": [True],
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800518 "profile": ["profile_small", "profile_medium", "profile_large"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800519 "partition_ps": ["ON", "OFF"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800520 },
521 "common_params": _common_tfm_builder_cfg,
522 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800523 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800524 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800525 # Profile Large is only supported by AN521
Summer Qin3c2b5722021-05-26 10:43:45 +0800526 ("arm/mps2/an519", "*", "*",
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800527 "*", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800528 ("arm/musca_b1/sse_200", "*", "*",
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800529 "*", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800530 ]
531 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800532
Karl Zhangaff558a2020-05-15 14:28:23 +0100533config_tfm_test_OTP = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800534 "tfm_platform": ["arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800535 "toolchain_file": ["toolchain_ARMCLANG.cmake",
536 "toolchain_GNUARM.cmake"],
537 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800538 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800539 "test_regression": [True, False],
540 "test_psa_api": ["OFF"],
541 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800542 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800543 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800544 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800545 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800546 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800547 },
548 "common_params": _common_tfm_builder_cfg,
549 "invalid": _common_tfm_invalid_configs + []
550 }
Karl Zhangaff558a2020-05-15 14:28:23 +0100551
Minos Galanakisea421232019-06-20 17:11:28 +0100552config_MUSCA_B1 = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800553 "tfm_platform": ["arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800554 "toolchain_file": ["toolchain_ARMCLANG.cmake",
555 "toolchain_GNUARM.cmake"],
556 "psa_api": [True, False],
557 "isolation_level": ["1", "2"],
558 "test_regression": [True, False],
559 "test_psa_api": ["OFF"],
560 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800561 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800562 "with_bl2": [True],
563 "with_ns": [True, False],
564 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800565 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800566 },
567 "common_params": _common_tfm_builder_cfg,
568 "invalid": _common_tfm_invalid_configs + []
569 }
Minos Galanakisea421232019-06-20 17:11:28 +0100570
Mark Horvath8d281cd2020-12-07 15:20:26 +0100571config_MUSCA_B1_SE = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800572 "tfm_platform": ["arm/musca_b1/secure_enclave"],
Mark Horvath8d281cd2020-12-07 15:20:26 +0100573 "toolchain_file": ["toolchain_ARMCLANG.cmake",
574 "toolchain_GNUARM.cmake"],
575 "psa_api": [True],
576 "isolation_level": ["1"],
577 "test_regression": [False],
578 "test_psa_api": ["OFF"],
579 "cmake_build_type": ["Debug", "Release"],
580 "with_otp": ["off"],
581 "with_bl2": [True],
582 "with_ns": [False],
583 "profile": [""],
584 "partition_ps": ["ON"],
585 },
586 "common_params": _common_tfm_builder_cfg,
587 "invalid": _common_tfm_invalid_configs + []
588 }
589
Karl Zhangeffed972020-06-30 15:48:01 +0800590config_MUSCA_S1 = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800591 "tfm_platform": ["arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800592 "toolchain_file": ["toolchain_ARMCLANG.cmake",
593 "toolchain_GNUARM.cmake"],
594 "psa_api": [True, False],
595 "isolation_level": ["1", "2"],
596 "test_regression": [True, False],
597 "test_psa_api": ["OFF"],
598 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800599 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800600 "with_bl2": [True],
601 "with_ns": [True, False],
602 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800603 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800604 },
605 "common_params": _common_tfm_builder_cfg,
606 "invalid": _common_tfm_invalid_configs + []
607 }
Karl Zhangeffed972020-06-30 15:48:01 +0800608
Karl Zhangaff558a2020-05-15 14:28:23 +0100609config_release = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800610 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
611 "arm/musca_b1/sse_200", "arm/musca_s1",
612 "arm/mps3/an524"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800613 "toolchain_file": ["toolchain_ARMCLANG.cmake",
614 "toolchain_GNUARM.cmake"],
615 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800616 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800617 "test_regression": [True, False],
618 "test_psa_api": ["OFF"],
619 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800620 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800621 "with_bl2": [True, False],
622 "with_ns": [True, False],
623 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800624 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800625 },
626 "common_params": _common_tfm_builder_cfg,
627 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800628 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800629 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800630 ]
631 }
Karl Zhangaff558a2020-05-15 14:28:23 +0100632
633# Configure build manager to build several combinations
634config_AN521_PSA_API = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800635 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
636 "arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800637 "toolchain_file": ["toolchain_GNUARM.cmake",
638 "toolchain_ARMCLANG.cmake"],
639 "psa_api": [True, False],
640 "isolation_level": ["1", "2"],
641 "test_regression": [False],
642 "test_psa_api": ["IPC",
643 "CRYPTO",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800644 "INITIAL_ATTESTATION",
Xinyu Zhang39acb412021-07-09 20:35:19 +0800645 "STORAGE"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800646 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800647 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800648 "with_bl2": [True],
649 "with_ns": [True, False],
650 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800651 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100652 },
653 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800654 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800655 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800656 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800657 ]
Karl Zhangaff558a2020-05-15 14:28:23 +0100658 }
659
Karl Zhangaff558a2020-05-15 14:28:23 +0100660config_AN521_PSA_IPC = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800661 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
662 "arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800663 "toolchain_file": ["toolchain_GNUARM.cmake",
664 "toolchain_ARMCLANG.cmake"],
665 "psa_api": [True],
666 "isolation_level": ["1", "2"],
667 "test_regression": [False],
668 "test_psa_api": ["IPC"],
669 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800670 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800671 "with_bl2": [True],
672 "with_ns": [True, False],
673 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800674 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100675 },
676 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800677 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800678 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800679 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800680 ]
Karl Zhangaff558a2020-05-15 14:28:23 +0100681 }
682
Karl Zhang14573bc2020-06-08 09:23:21 +0800683config_nightly = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800684 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
685 "arm/musca_b1/sse_200", "arm/musca_s1",
686 "arm/mps3/an524", "cypress/psoc64",
Arthur She19c0e1a2021-06-02 11:06:19 -0700687 "arm/musca_b1/secure_enclave",
688 "stm/stm32l562e_dk"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800689 "toolchain_file": ["toolchain_GNUARM.cmake",
690 "toolchain_ARMCLANG.cmake"],
691 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800692 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800693 "test_regression": [True, False],
694 "test_psa_api": ["OFF"],
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800695 "cmake_build_type": ["Debug", "Release", "Minsizerel", "RelWithDebInfo"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800696 "with_otp": ["off"],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800697 "with_bl2": [True],
698 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800699 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800700 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800701 },
702 "common_params": _common_tfm_builder_cfg,
703 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800704 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800705 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800706 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800707 "*", "*", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800708 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800709 "*", "*", "*", "*", True, True, "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800710 ("arm/mps2/an521", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800711 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800712 ("arm/mps2/an519", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800713 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800714 ("arm/musca_b1/sse_200", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800715 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800716 ("arm/musca_s1", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800717 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800718 ("arm/mps3/an524", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800719 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800720 ]
721 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800722
Karl Zhang14573bc2020-06-08 09:23:21 +0800723config_nightly_profile = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800724 "tfm_platform": ["arm/mps2/an519", "arm/mps2/an521",
725 "arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800726 "toolchain_file": ["toolchain_ARMCLANG.cmake",
727 "toolchain_GNUARM.cmake"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800728 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800729 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800730 "test_regression": [True, False],
731 "test_psa_api": ["OFF"],
732 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800733 "with_otp": ["off"],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800734 "with_bl2": [True],
735 "with_ns": [True],
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800736 "profile": ["profile_small", "profile_medium", "profile_large"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800737 "partition_ps": ["ON", "OFF"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800738 },
739 "common_params": _common_tfm_builder_cfg,
740 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800741 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800742 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800743 # Profile Large is only supported by AN521
Summer Qin3c2b5722021-05-26 10:43:45 +0800744 ("arm/mps2/an519", "*", "*",
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800745 "*", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800746 ("arm/musca_b1/sse_200", "*", "*",
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800747 "*", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800748 ]
749 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800750
Karl Zhang14573bc2020-06-08 09:23:21 +0800751config_nightly_PSA_API = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800752 "tfm_platform": ["arm/mps2/an521", "arm/musca_b1/sse_200",
753 "arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800754 "toolchain_file": ["toolchain_GNUARM.cmake",
755 "toolchain_ARMCLANG.cmake"],
756 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800757 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800758 "test_regression": [False],
759 "test_psa_api": ["CRYPTO",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800760 "INITIAL_ATTESTATION",
Xinyu Zhang39acb412021-07-09 20:35:19 +0800761 "STORAGE"],
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_PSA_FF = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800774 "tfm_platform": ["arm/mps2/an521", "arm/musca_b1/sse_200",
775 "arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800776 "toolchain_file": ["toolchain_GNUARM.cmake",
777 "toolchain_ARMCLANG.cmake"],
778 "psa_api": [True],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800779 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800780 "test_regression": [False],
781 "test_psa_api": ["IPC"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800782 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800783 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800784 "with_bl2": [True],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800785 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800786 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800787 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800788 },
789 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800790 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800791 }
792
Karl Zhang14573bc2020-06-08 09:23:21 +0800793config_nightly_OTP = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800794 "tfm_platform": ["arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800795 "toolchain_file": ["toolchain_GNUARM.cmake",
796 "toolchain_ARMCLANG.cmake"],
797 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800798 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800799 "test_regression": [True],
800 "test_psa_api": ["OFF"],
801 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800802 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800803 "with_bl2": [True],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800804 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800805 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800806 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800807 },
808 "common_params": _common_tfm_builder_cfg,
809 "invalid": _common_tfm_invalid_configs + []
810 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800811
Xinyu Zhangfd70cfe2021-06-29 11:14:13 +0800812config_nightly_STM32L562E_DK = {"seed_params": {
813 "tfm_platform": ["stm/stm32l562e_dk"],
814 "toolchain_file": ["toolchain_GNUARM.cmake",
815 "toolchain_ARMCLANG.cmake"],
816 "psa_api": [True, False],
817 "isolation_level": ["1", "2", "3"],
818 "test_regression": [True],
819 "test_psa_api": ["OFF"],
820 "cmake_build_type": ["Release"],
821 "with_otp": ["off"],
822 "with_bl2": [True],
823 "with_ns": [True],
824 "profile": [""],
825 "partition_ps": ["ON"],
826 },
827 "common_params": _common_tfm_builder_cfg,
828 "invalid": _common_tfm_invalid_configs + []
829 }
830
Karl Zhang14573bc2020-06-08 09:23:21 +0800831config_pp_test = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800832 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
Xinyu Zhangd1ef9982021-06-24 11:31:11 +0800833 "arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800834 "toolchain_file": ["toolchain_GNUARM.cmake",
835 "toolchain_ARMCLANG.cmake"],
836 "psa_api": [True, False],
Karl Zhangde36b772021-01-08 10:17:03 +0800837 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800838 "test_regression": [True],
839 "test_psa_api": ["OFF"],
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800840 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800841 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800842 "with_bl2": [True],
843 "with_ns": [True, False],
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800844 "profile": ["", "profile_small", "profile_medium"],
845 "partition_ps": ["ON", "OFF"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800846 },
847 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800848 "valid": [
Summer Qin3c2b5722021-05-26 10:43:45 +0800849 ("arm/mps2/an521", "toolchain_GNUARM.cmake",
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800850 False, "1", False, "OFF", "Debug",
851 "off", True, True, "", "ON"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800852 ("arm/mps2/an521", "toolchain_ARMCLANG.cmake",
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800853 True, "2", False, "OFF", "Debug",
854 "off", True, True, "", "ON"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800855 ("arm/mps2/an521", "toolchain_ARMCLANG.cmake",
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800856 True, "3", False, "OFF", "Release",
857 "off", True, True, "", "ON"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800858 ("arm/mps2/an521", "toolchain_GNUARM.cmake",
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800859 True, "2", False, "OFF", "Debug",
860 "off", True, True, "profile_medium", "ON"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800861 ("arm/mps2/an521", "toolchain_GNUARM.cmake",
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800862 True, "3", False, "OFF", "Debug",
863 "off", True, True, "profile_large", "ON"),
Xinyu Zhangd1ef9982021-06-24 11:31:11 +0800864 # AN521_GNUARM_PSA_2_REG_Release_BL2_NS_MEDIUM_PSOFF
865 ("arm/mps2/an521", "toolchain_GNUARM.cmake", True,
866 "2", True, "OFF", "Release", "off", True, True, "profile_medium", "OFF"),
Xinyu Zhangd1ef9982021-06-24 11:31:11 +0800867 # MUSCA_B1_GNUARM_1_REG_Minsizerel_BL2_NS
868 ("arm/musca_b1/sse_200", "toolchain_GNUARM.cmake", False,
869 "1", True, "OFF", "Minsizerel", "off", True, True, "", "ON"),
870 # stm32l562e_dk_ARMCLANG_PSA_1_REG_Release_BL2_NS
871 ("stm/stm32l562e_dk", "toolchain_ARMCLANG.cmake", True,
872 "1", True, "OFF", "Release", "off", True, True, "", "ON"),
873 # stm32l562e_dk_GNUARM_PSA_2_REG_Release_BL2_NS
874 ("stm/stm32l562e_dk", "toolchain_GNUARM.cmake", True,
875 "2", True, "OFF", "Release", "off", True, True, "", "ON"),
876 # stm32l562e_dk_GNUARM_PSA_3_REG_Release_BL2_NS
877 ("stm/stm32l562e_dk", "toolchain_GNUARM.cmake", True,
878 "3", True, "OFF", "Release", "off", True, True, "", "ON"),
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800879 ],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800880 "invalid": _common_tfm_invalid_configs + [
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800881 # invalid configs that are not supported by TF-M
Summer Qin3c2b5722021-05-26 10:43:45 +0800882 ("arm/musca_s1", "*", "*", "*", "*", "*",
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800883 "*", "*", "*", "*", "profile_medium", "*"),
884 # valid configs supported by TF-M but not needed in per-patch
885 ("*", "*", "*", "1", "*", "*", "Release",
886 "*", "*", "*", "*", "*"),
887 ("*", "*", "*", "1", "*", "*", "Minsizerel",
888 "*", "*", "*", "*", "*"),
889 ("*", "*", "*", "2", "*", "*", "Debug",
890 "*", "*", "*", "*", "*"),
891 ("*", "*", "*", "2", "*", "*", "Minsizerel",
892 "*", "*", "*", "*", "*"),
893 ("*", "*", "*", "3", "*", "*", "Debug",
894 "*", "*", "*", "*", "*"),
895 ("*", "*", "*", "3", "*", "*", "Release",
896 "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800897 ("arm/mps2/an519", "*", "*", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800898 "*", "*", "*", "*", "profile_small", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800899 ("arm/musca_s1", "*", "*", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800900 "*", "*", "*", "*", "profile_small", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800901 ("arm/mps2/an519", "*", "*", "*", "*", "*",
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800902 "*", "*", "*", "*", "profile_medium", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800903 ("arm/mps2/an521", "*", "*", "*", "*", "*",
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800904 "*", "*", "*", "*", "profile_medium", "*"),
905 ("*", "toolchain_GNUARM.cmake", "*", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800906 "*", "*", "*", "*", "profile_small", "*"),
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800907 ("*", "toolchain_ARMCLANG.cmake", "*", "*", "*", "*",
908 "*", "*", "*", "*", "profile_medium", "*"),
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800909 ("*", "toolchain_ARMCLANG.cmake", False, "*", "*", "*",
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800910 "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800911 ]
912 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800913
Karl Zhang14573bc2020-06-08 09:23:21 +0800914config_pp_OTP = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800915 "tfm_platform": ["arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800916 "toolchain_file": ["toolchain_GNUARM.cmake"],
917 "psa_api": [True, False],
918 "isolation_level": ["1", "2"],
919 "test_regression": [True],
920 "test_psa_api": ["OFF"],
921 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800922 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800923 "with_bl2": [True],
924 "with_ns": [True, False],
925 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800926 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800927 },
928 "common_params": _common_tfm_builder_cfg,
929 "invalid": _common_tfm_invalid_configs + []
930 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800931
932# Configure build manager to build several combinations
933config_pp_PSA_API = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800934 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800935 "toolchain_file": ["toolchain_GNUARM.cmake"],
936 "psa_api": [True],
937 "isolation_level": ["2"],
938 "test_regression": [False],
939 "test_psa_api": ["IPC",
940 "CRYPTO",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800941 "INITIAL_ATTESTATION",
Xinyu Zhang39acb412021-07-09 20:35:19 +0800942 "STORAGE"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800943 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800944 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800945 "with_bl2": [True],
946 "with_ns": [True, False],
947 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800948 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800949 },
950 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800951 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800952 }
953
Karl Zhang14573bc2020-06-08 09:23:21 +0800954config_pp_PSoC64 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800955 "tfm_platform": ["cypress/psoc64"],
956 "toolchain_file": ["toolchain_GNUARM.cmake"],
957 "psa_api": [True],
958 "isolation_level": ["1", "2"],
959 "test_regression": [True],
960 "test_psa_api": ["OFF"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800961 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800962 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800963 "with_bl2": [False],
964 "with_ns": [True, False],
965 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800966 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800967 },
968 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800969 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800970 }
971
Xinyu Zhangf25856a2021-06-17 14:06:46 +0800972config_cov_an519 = {"seed_params": {
973 "tfm_platform": ["arm/mps2/an519"],
974 "toolchain_file": ["toolchain_GNUARM.cmake"],
975 "psa_api": [True, False],
976 "isolation_level": ["1", "2", "3"],
977 "test_regression": [True, False],
978 "test_psa_api": ["OFF"],
979 "cmake_build_type": ["Debug", "Release"],
980 "with_otp": ["off"],
981 "with_bl2": [True],
982 "with_ns": [True],
983 "profile": ["", "profile_small", "profile_medium"],
984 "partition_ps": ["ON", "OFF"],
985 },
986 "common_params": _common_tfm_builder_cfg,
987 "invalid": _common_tfm_invalid_configs + []
988 }
989
990config_cov_an521 = {"seed_params": {
991 "tfm_platform": ["arm/mps2/an521"],
992 "toolchain_file": ["toolchain_GNUARM.cmake"],
993 "psa_api": [True, False],
994 "isolation_level": ["1", "2", "3"],
995 "test_regression": [True, False],
996 "test_psa_api": ["OFF"],
997 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
998 "with_otp": ["off"],
999 "with_bl2": [True],
1000 "with_ns": [True],
1001 "profile": ["", "profile_small", "profile_medium", "profile_large"],
1002 "partition_ps": ["ON", "OFF"],
1003 },
1004 "common_params": _common_tfm_builder_cfg,
1005 "invalid": _common_tfm_invalid_configs + []
1006 }
1007
Minos Galanakisea421232019-06-20 17:11:28 +01001008# Configruation used for document building
1009config_doxygen = {"common_params": {
1010 "config_type": "tf-m_documents",
1011 "codebase_root_dir": "tf-m",
Summer Qin3c2b5722021-05-26 10:43:45 +08001012 "build_cmds": {"all": ["-DTFM_PLATFORM=arm/mps2/an521 "
Fathi Boudra324fee72020-11-20 10:31:12 +01001013 "-DTFM_TOOLCHAIN_FILE=%(_tfm_code_dir_)s/toolchain_GNUARM.cmake"
Minos Galanakisea421232019-06-20 17:11:28 +01001014 "-DCMAKE_BUILD_TYPE=Debug "
Minos Galanakisea421232019-06-20 17:11:28 +01001015 "%(_tbm_code_dir_)s/",
Xinyu Zhangb708f572020-09-15 11:43:46 +08001016 "cmake --build ./ -- docs"]},
1017 "artifact_capture_rex": r'%(_tbm_build_dir_)s/docs/'
1018 r'reference_manual/(?:latex|html)'
Minos Galanakisea421232019-06-20 17:11:28 +01001019 r'/(\w+\.(?:html|md|pdf))$',
1020 },
Xinyu Zhangb708f572020-09-15 11:43:46 +08001021 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +01001022 }
1023
Karl Zhangaff558a2020-05-15 14:28:23 +01001024# Configuration used in testing
Minos Galanakisea421232019-06-20 17:11:28 +01001025config_debug = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +08001026 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001027 "toolchain_file": ["toolchain_ARMCLANG.cmake"],
1028 "psa_api": [False],
1029 "isolation_level": ["1"],
1030 "test_regression": [False],
1031 "test_psa_api": ["OFF"],
Minos Galanakisea421232019-06-20 17:11:28 +01001032 "cmake_build_type": ["Debug"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +08001033 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001034 "with_bl2": [True],
1035 "with_ns": [True],
1036 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001037 "partition_ps": ["ON"],
Minos Galanakisea421232019-06-20 17:11:28 +01001038 },
1039 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +08001040 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +01001041 }
1042
Dean Birch4c6ad622020-03-13 11:28:03 +00001043# Configuration used in CI
Xinyu Zhangb708f572020-09-15 11:43:46 +08001044config_ci = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +08001045 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001046 "toolchain_file": ["toolchain_ARMCLANG.cmake",
1047 "toolchain_GNUARM.cmake"],
1048 "psa_api": [True, False],
1049 "isolation_level": ["1", "2"],
1050 "test_regression": [True, False],
1051 "test_psa_api": ["OFF"],
1052 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +08001053 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001054 "with_bl2": [True, False],
1055 "with_ns": [True],
1056 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001057 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001058 },
1059 "common_params": _common_tfm_builder_cfg,
1060 "invalid": _common_tfm_invalid_configs + [
1061 ("*", "toolchain_ARMCLANG.cmake", True, "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001062 "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +08001063 ("*", "toolchain_ARMCLANG.cmake", False, "1", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001064 "*", "*", False, "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +08001065 ]
1066 }
Matthew Hartfb6fd362020-03-04 21:03:59 +00001067
Xinyu Zhangb708f572020-09-15 11:43:46 +08001068config_lava_debug = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +08001069 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001070 "toolchain_file": ["toolchain_GNUARM.cmake"],
1071 "psa_api": [True, False],
1072 "isolation_level": ["1", "2"],
1073 "test_regression": [True],
1074 "test_psa_api": ["OFF"],
1075 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +08001076 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001077 "with_bl2": [True, False],
1078 "with_ns": [True, False],
1079 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001080 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001081 },
1082 "common_params": _common_tfm_builder_cfg,
1083 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +08001084 ("arm/mps2/an521", "toolchain_GNUARM.cmake", True, "2", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001085 "*", "*", True, "*", "*", "*")
Xinyu Zhangb708f572020-09-15 11:43:46 +08001086 ]
1087 }
Dean Birch4c6ad622020-03-13 11:28:03 +00001088
Karl Zhangaff558a2020-05-15 14:28:23 +01001089_builtin_configs = {
Karl Zhang14573bc2020-06-08 09:23:21 +08001090 #release test group
Karl Zhangaff558a2020-05-15 14:28:23 +01001091 "tfm_test": config_tfm_test,
1092 "tfm_test2": config_tfm_test2,
Karl Zhang14573bc2020-06-08 09:23:21 +08001093 "tfm_profile": config_tfm_profile,
Karl Zhangaff558a2020-05-15 14:28:23 +01001094 "tfm_test_otp": config_tfm_test_OTP,
1095 "psa_api": config_PSA_API,
1096 "psa_api_otp": config_PSA_API_OTP,
1097 "psa_ff": config_PSA_FF,
1098 "psa_ff_otp": config_PSA_FF_OTP,
Karl Zhang14573bc2020-06-08 09:23:21 +08001099 "tfm_psoc64": config_PSOC64,
Arthur She19c0e1a2021-06-02 11:06:19 -07001100 "tfm_stm32l562e_dk": config_STM32L562E_DK,
Karl Zhang14573bc2020-06-08 09:23:21 +08001101
1102 #nightly test group
1103 "nightly_test": config_nightly,
1104 "nightly_profile": config_nightly_profile,
1105 "nightly_psa_api": config_nightly_PSA_API,
1106 "nightly_ff": config_nightly_PSA_FF,
1107 "nightly_otp": config_nightly_OTP,
Xinyu Zhangfd70cfe2021-06-29 11:14:13 +08001108 "nightly_stm32l562e_dk": config_nightly_STM32L562E_DK,
Karl Zhang14573bc2020-06-08 09:23:21 +08001109
1110 #per patch test group
1111 "pp_test": config_pp_test,
1112 "pp_OTP": config_pp_OTP,
1113 "pp_PSA_API": config_pp_PSA_API,
1114 "pp_psoc64": config_pp_PSoC64,
1115
Xinyu Zhangf25856a2021-06-17 14:06:46 +08001116 #code coverage test group
1117 "coverage_an519": config_cov_an519,
1118 "coverage_an521": config_cov_an521,
1119
Karl Zhang14573bc2020-06-08 09:23:21 +08001120 #full test group in the old CI
Karl Zhangaff558a2020-05-15 14:28:23 +01001121 "full": config_full,
Karl Zhang14573bc2020-06-08 09:23:21 +08001122
1123 #specific test group
Karl Zhangaff558a2020-05-15 14:28:23 +01001124 "an524": config_AN524,
Minos Galanakisea421232019-06-20 17:11:28 +01001125 "an521": config_AN521,
Karl Zhang14573bc2020-06-08 09:23:21 +08001126 "an521_psa_api": config_AN521_PSA_API,
1127 "an521_psa_ipc": config_AN521_PSA_IPC,
Minos Galanakisea421232019-06-20 17:11:28 +01001128 "an519": config_AN519,
Minos Galanakisea421232019-06-20 17:11:28 +01001129 "musca_b1": config_MUSCA_B1,
Mark Horvath8d281cd2020-12-07 15:20:26 +01001130 "musca_b1_se": config_MUSCA_B1_SE,
Karl Zhangeffed972020-06-30 15:48:01 +08001131 "musca_s1": config_MUSCA_S1,
Karl Zhang96dfe2d2020-05-11 11:31:40 +08001132 "psoc64": config_PSOC64,
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +08001133 "diphda": config_diphda,
Minos Galanakisea421232019-06-20 17:11:28 +01001134 "ipc": config_IPC,
1135 "doxygen": config_doxygen,
Dean Birch4c6ad622020-03-13 11:28:03 +00001136 "debug": config_debug,
Karl Zhangaff558a2020-05-15 14:28:23 +01001137 "release": config_release,
Matthew Hartfb6fd362020-03-04 21:03:59 +00001138 "debug": config_debug,
Karl Zhang14573bc2020-06-08 09:23:21 +08001139
1140 #DevOps team test group
Matthew Hartfb6fd362020-03-04 21:03:59 +00001141 "lava_debug": config_lava_debug,
Xinyu Zhanga1000582020-12-04 15:25:24 +08001142 "ci": config_ci}
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001143
1144if __name__ == '__main__':
1145 import os
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001146
Minos Galanakisea421232019-06-20 17:11:28 +01001147 # Default behavior is to export refference config when called
1148 _dir = os.getcwd()
1149 from utils import save_json
1150 for _cname, _cfg in _builtin_configs.items():
1151 _fname = os.path.join(_dir, _cname + ".json")
1152 print("Exporting config %s" % _fname)
1153 save_json(_fname, _cfg)