blob: f59d457f40fb52b4a4fcfd195d274e7c6bebfd82 [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
Minos Galanakisea421232019-06-20 17:11:28 +0100370config_AN519 = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800371 "tfm_platform": ["arm/mps2/an519"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800372 "toolchain_file": ["toolchain_GNUARM.cmake",
373 "toolchain_ARMCLANG.cmake"],
374 "psa_api": [True, False],
375 "isolation_level": ["1", "2"],
376 "test_regression": [True, False],
377 "test_psa_api": ["OFF"],
Minos Galanakisea421232019-06-20 17:11:28 +0100378 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800379 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800380 "with_bl2": [True, False],
381 "with_ns": [True, False],
382 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800383 "partition_ps": ["ON"],
Minos Galanakisea421232019-06-20 17:11:28 +0100384 },
385 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800386 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +0100387 }
388
Xinyu Zhangb708f572020-09-15 11:43:46 +0800389config_IPC = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800390 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
391 "arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800392 "toolchain_file": ["toolchain_GNUARM.cmake",
393 "toolchain_ARMCLANG.cmake"],
394 "psa_api": [True],
395 "isolation_level": ["1", "2"],
396 "test_regression": [True, False],
397 "test_psa_api": ["OFF"],
398 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800399 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800400 "with_bl2": [True, False],
401 "with_ns": [True, False],
402 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800403 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800404 },
Minos Galanakisea421232019-06-20 17:11:28 +0100405 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800406 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +0100407 }
408
Minos Galanakisea421232019-06-20 17:11:28 +0100409config_full = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800410 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
411 "arm/musca_b1/sse_200",
412 "arm/mps3/an524", "cypress/psoc64",
Arthur She19c0e1a2021-06-02 11:06:19 -0700413 "arm/musca_b1/secure_enclave",
414 "stm/stm32l562e_dk"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800415 "toolchain_file": ["toolchain_GNUARM.cmake",
416 "toolchain_ARMCLANG.cmake"],
417 "psa_api": [True, False],
418 "isolation_level": ["1", "2"],
419 "test_regression": [True, False],
420 "test_psa_api": ["OFF"],
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800421 "cmake_build_type": ["Debug", "Release", "RelWithDebInfo"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800422 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800423 "with_bl2": [True, False],
424 "with_ns": [True, False],
425 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800426 "partition_ps": ["ON"],
Dean Birchd6ce2c82020-05-13 13:16:15 +0100427 },
428 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800429 "invalid": _common_tfm_invalid_configs + [
430 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800431 "*", "*", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800432 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800433 "*", "*", "*", "*", True, True, "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800434 ("arm/mps2/an521", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800435 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800436 ("arm/mps2/an519", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800437 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800438 ("arm/musca_b1/sse_200", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800439 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800440 ("arm/mps3/an524", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800441 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800442 ]
Karl Zhang81a76772020-05-11 18:28:52 +0800443 }
444
Karl Zhangaff558a2020-05-15 14:28:23 +0100445config_tfm_test = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800446 "tfm_platform": ["arm/mps2/an521",
447 "arm/musca_b1/sse_200", "arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800448 "toolchain_file": ["toolchain_ARMCLANG.cmake",
449 "toolchain_GNUARM.cmake"],
450 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800451 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800452 "test_regression": [True, False],
453 "test_psa_api": ["OFF"],
454 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800455 "with_otp": ["off"],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800456 "with_bl2": [True],
457 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800458 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800459 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800460 },
461 "common_params": _common_tfm_builder_cfg,
462 "invalid": _common_tfm_invalid_configs + []
463 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800464
Karl Zhangaff558a2020-05-15 14:28:23 +0100465config_tfm_test2 = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800466 "tfm_platform": ["arm/mps2/an519", "arm/mps3/an524"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800467 "toolchain_file": ["toolchain_ARMCLANG.cmake",
468 "toolchain_GNUARM.cmake"],
469 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800470 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800471 "test_regression": [True, False],
472 "test_psa_api": ["OFF"],
473 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800474 "with_otp": ["off"],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800475 "with_bl2": [True],
476 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800477 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800478 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800479 },
480 "common_params": _common_tfm_builder_cfg,
481 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800482 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800483 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800484 ]
485 }
Karl Zhangaff558a2020-05-15 14:28:23 +0100486
Karl Zhang14573bc2020-06-08 09:23:21 +0800487config_tfm_profile = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800488 "tfm_platform": ["arm/mps2/an519", "arm/mps2/an521",
489 "arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800490 "toolchain_file": ["toolchain_ARMCLANG.cmake",
491 "toolchain_GNUARM.cmake"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800492 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800493 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800494 "test_regression": [True, False],
495 "test_psa_api": ["OFF"],
496 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800497 "with_otp": ["off"],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800498 "with_bl2": [True],
499 "with_ns": [True],
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800500 "profile": ["profile_small", "profile_medium", "profile_large"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800501 "partition_ps": ["ON", "OFF"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800502 },
503 "common_params": _common_tfm_builder_cfg,
504 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800505 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800506 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800507 # Profile Large is only supported by AN521
Summer Qin3c2b5722021-05-26 10:43:45 +0800508 ("arm/mps2/an519", "*", "*",
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800509 "*", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800510 ("arm/musca_b1/sse_200", "*", "*",
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800511 "*", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800512 ]
513 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800514
Karl Zhangaff558a2020-05-15 14:28:23 +0100515config_tfm_test_OTP = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800516 "tfm_platform": ["arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800517 "toolchain_file": ["toolchain_ARMCLANG.cmake",
518 "toolchain_GNUARM.cmake"],
519 "psa_api": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800520 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800521 "test_regression": [True, False],
522 "test_psa_api": ["OFF"],
523 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800524 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800525 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800526 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800527 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800528 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800529 },
530 "common_params": _common_tfm_builder_cfg,
531 "invalid": _common_tfm_invalid_configs + []
532 }
Karl Zhangaff558a2020-05-15 14:28:23 +0100533
Minos Galanakisea421232019-06-20 17:11:28 +0100534config_MUSCA_B1 = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800535 "tfm_platform": ["arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800536 "toolchain_file": ["toolchain_ARMCLANG.cmake",
537 "toolchain_GNUARM.cmake"],
538 "psa_api": [True, False],
539 "isolation_level": ["1", "2"],
540 "test_regression": [True, False],
541 "test_psa_api": ["OFF"],
542 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800543 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800544 "with_bl2": [True],
545 "with_ns": [True, False],
546 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800547 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800548 },
549 "common_params": _common_tfm_builder_cfg,
550 "invalid": _common_tfm_invalid_configs + []
551 }
Minos Galanakisea421232019-06-20 17:11:28 +0100552
Mark Horvath8d281cd2020-12-07 15:20:26 +0100553config_MUSCA_B1_SE = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800554 "tfm_platform": ["arm/musca_b1/secure_enclave"],
Mark Horvath8d281cd2020-12-07 15:20:26 +0100555 "toolchain_file": ["toolchain_ARMCLANG.cmake",
556 "toolchain_GNUARM.cmake"],
557 "psa_api": [True],
558 "isolation_level": ["1"],
559 "test_regression": [False],
560 "test_psa_api": ["OFF"],
561 "cmake_build_type": ["Debug", "Release"],
562 "with_otp": ["off"],
563 "with_bl2": [True],
564 "with_ns": [False],
565 "profile": [""],
566 "partition_ps": ["ON"],
567 },
568 "common_params": _common_tfm_builder_cfg,
569 "invalid": _common_tfm_invalid_configs + []
570 }
571
Karl Zhangeffed972020-06-30 15:48:01 +0800572config_MUSCA_S1 = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800573 "tfm_platform": ["arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800574 "toolchain_file": ["toolchain_ARMCLANG.cmake",
575 "toolchain_GNUARM.cmake"],
576 "psa_api": [True, False],
577 "isolation_level": ["1", "2"],
578 "test_regression": [True, False],
579 "test_psa_api": ["OFF"],
580 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800581 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800582 "with_bl2": [True],
583 "with_ns": [True, False],
584 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800585 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800586 },
587 "common_params": _common_tfm_builder_cfg,
588 "invalid": _common_tfm_invalid_configs + []
589 }
Karl Zhangeffed972020-06-30 15:48:01 +0800590
Karl Zhangaff558a2020-05-15 14:28:23 +0100591config_release = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800592 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
593 "arm/musca_b1/sse_200", "arm/musca_s1",
594 "arm/mps3/an524"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800595 "toolchain_file": ["toolchain_ARMCLANG.cmake",
596 "toolchain_GNUARM.cmake"],
597 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800598 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800599 "test_regression": [True, False],
600 "test_psa_api": ["OFF"],
601 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800602 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800603 "with_bl2": [True, False],
604 "with_ns": [True, False],
605 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800606 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800607 },
608 "common_params": _common_tfm_builder_cfg,
609 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800610 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800611 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800612 ]
613 }
Karl Zhangaff558a2020-05-15 14:28:23 +0100614
615# Configure build manager to build several combinations
616config_AN521_PSA_API = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800617 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
618 "arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800619 "toolchain_file": ["toolchain_GNUARM.cmake",
620 "toolchain_ARMCLANG.cmake"],
621 "psa_api": [True, False],
622 "isolation_level": ["1", "2"],
623 "test_regression": [False],
624 "test_psa_api": ["IPC",
625 "CRYPTO",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800626 "INITIAL_ATTESTATION",
Xinyu Zhang39acb412021-07-09 20:35:19 +0800627 "STORAGE"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800628 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800629 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800630 "with_bl2": [True],
631 "with_ns": [True, False],
632 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800633 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100634 },
635 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800636 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800637 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800638 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800639 ]
Karl Zhangaff558a2020-05-15 14:28:23 +0100640 }
641
Karl Zhangaff558a2020-05-15 14:28:23 +0100642config_AN521_PSA_IPC = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800643 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
644 "arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800645 "toolchain_file": ["toolchain_GNUARM.cmake",
646 "toolchain_ARMCLANG.cmake"],
647 "psa_api": [True],
648 "isolation_level": ["1", "2"],
649 "test_regression": [False],
650 "test_psa_api": ["IPC"],
651 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800652 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800653 "with_bl2": [True],
654 "with_ns": [True, False],
655 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800656 "partition_ps": ["ON"],
Karl Zhangaff558a2020-05-15 14:28:23 +0100657 },
658 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800659 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800660 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800661 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800662 ]
Karl Zhangaff558a2020-05-15 14:28:23 +0100663 }
664
Karl Zhang14573bc2020-06-08 09:23:21 +0800665config_nightly = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800666 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
667 "arm/musca_b1/sse_200", "arm/musca_s1",
668 "arm/mps3/an524", "cypress/psoc64",
Arthur She19c0e1a2021-06-02 11:06:19 -0700669 "arm/musca_b1/secure_enclave",
670 "stm/stm32l562e_dk"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800671 "toolchain_file": ["toolchain_GNUARM.cmake",
672 "toolchain_ARMCLANG.cmake"],
673 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800674 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800675 "test_regression": [True, False],
676 "test_psa_api": ["OFF"],
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800677 "cmake_build_type": ["Debug", "Release", "Minsizerel", "RelWithDebInfo"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800678 "with_otp": ["off"],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800679 "with_bl2": [True],
680 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800681 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800682 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800683 },
684 "common_params": _common_tfm_builder_cfg,
685 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800686 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800687 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800688 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800689 "*", "*", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800690 ("cypress/psoc64", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800691 "*", "*", "*", "*", True, True, "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800692 ("arm/mps2/an521", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800693 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800694 ("arm/mps2/an519", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800695 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800696 ("arm/musca_b1/sse_200", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800697 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800698 ("arm/musca_s1", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800699 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800700 ("arm/mps3/an524", "*", "*", "*",
Xinyu Zhangc61c87a2020-11-03 11:14:49 +0800701 "*", "*", "RelWithDebInfo", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800702 ]
703 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800704
Karl Zhang14573bc2020-06-08 09:23:21 +0800705config_nightly_profile = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800706 "tfm_platform": ["arm/mps2/an519", "arm/mps2/an521",
707 "arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800708 "toolchain_file": ["toolchain_ARMCLANG.cmake",
709 "toolchain_GNUARM.cmake"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800710 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800711 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800712 "test_regression": [True, False],
713 "test_psa_api": ["OFF"],
714 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800715 "with_otp": ["off"],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800716 "with_bl2": [True],
717 "with_ns": [True],
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800718 "profile": ["profile_small", "profile_medium", "profile_large"],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800719 "partition_ps": ["ON", "OFF"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800720 },
721 "common_params": _common_tfm_builder_cfg,
722 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +0800723 ("arm/mps2/an519", "toolchain_GNUARM.cmake", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800724 "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800725 # Profile Large is only supported by AN521
Summer Qin3c2b5722021-05-26 10:43:45 +0800726 ("arm/mps2/an519", "*", "*",
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800727 "*", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800728 ("arm/musca_b1/sse_200", "*", "*",
Xinyu Zhang9b1aef92021-03-12 15:36:44 +0800729 "*", "*", "*", "*", "*", "*", "*", "profile_large", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800730 ]
731 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800732
Karl Zhang14573bc2020-06-08 09:23:21 +0800733config_nightly_PSA_API = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800734 "tfm_platform": ["arm/mps2/an521", "arm/musca_b1/sse_200",
735 "arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800736 "toolchain_file": ["toolchain_GNUARM.cmake",
737 "toolchain_ARMCLANG.cmake"],
738 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800739 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800740 "test_regression": [False],
741 "test_psa_api": ["CRYPTO",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800742 "INITIAL_ATTESTATION",
Xinyu Zhang39acb412021-07-09 20:35:19 +0800743 "STORAGE"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800744 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800745 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800746 "with_bl2": [True],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800747 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800748 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800749 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800750 },
751 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800752 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800753 }
754
Karl Zhang14573bc2020-06-08 09:23:21 +0800755config_nightly_PSA_FF = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800756 "tfm_platform": ["arm/mps2/an521", "arm/musca_b1/sse_200",
757 "arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800758 "toolchain_file": ["toolchain_GNUARM.cmake",
759 "toolchain_ARMCLANG.cmake"],
760 "psa_api": [True],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800761 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800762 "test_regression": [False],
763 "test_psa_api": ["IPC"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800764 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800765 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800766 "with_bl2": [True],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800767 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800768 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800769 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800770 },
771 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800772 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800773 }
774
Karl Zhang14573bc2020-06-08 09:23:21 +0800775config_nightly_OTP = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800776 "tfm_platform": ["arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800777 "toolchain_file": ["toolchain_GNUARM.cmake",
778 "toolchain_ARMCLANG.cmake"],
779 "psa_api": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800780 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800781 "test_regression": [True],
782 "test_psa_api": ["OFF"],
783 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800784 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800785 "with_bl2": [True],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800786 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800787 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800788 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800789 },
790 "common_params": _common_tfm_builder_cfg,
791 "invalid": _common_tfm_invalid_configs + []
792 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800793
Xinyu Zhangfd70cfe2021-06-29 11:14:13 +0800794config_nightly_STM32L562E_DK = {"seed_params": {
795 "tfm_platform": ["stm/stm32l562e_dk"],
796 "toolchain_file": ["toolchain_GNUARM.cmake",
797 "toolchain_ARMCLANG.cmake"],
798 "psa_api": [True, False],
799 "isolation_level": ["1", "2", "3"],
800 "test_regression": [True],
801 "test_psa_api": ["OFF"],
802 "cmake_build_type": ["Release"],
803 "with_otp": ["off"],
804 "with_bl2": [True],
805 "with_ns": [True],
806 "profile": [""],
807 "partition_ps": ["ON"],
808 },
809 "common_params": _common_tfm_builder_cfg,
810 "invalid": _common_tfm_invalid_configs + []
811 }
812
Karl Zhang14573bc2020-06-08 09:23:21 +0800813config_pp_test = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800814 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519",
Xinyu Zhangd1ef9982021-06-24 11:31:11 +0800815 "arm/musca_s1"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800816 "toolchain_file": ["toolchain_GNUARM.cmake",
817 "toolchain_ARMCLANG.cmake"],
818 "psa_api": [True, False],
Karl Zhangde36b772021-01-08 10:17:03 +0800819 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800820 "test_regression": [True],
821 "test_psa_api": ["OFF"],
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800822 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800823 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800824 "with_bl2": [True],
825 "with_ns": [True, False],
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800826 "profile": ["", "profile_small", "profile_medium"],
827 "partition_ps": ["ON", "OFF"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800828 },
829 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800830 "valid": [
Summer Qin3c2b5722021-05-26 10:43:45 +0800831 ("arm/mps2/an521", "toolchain_GNUARM.cmake",
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800832 False, "1", False, "OFF", "Debug",
833 "off", True, True, "", "ON"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800834 ("arm/mps2/an521", "toolchain_ARMCLANG.cmake",
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800835 True, "2", False, "OFF", "Debug",
836 "off", True, True, "", "ON"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800837 ("arm/mps2/an521", "toolchain_ARMCLANG.cmake",
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800838 True, "3", False, "OFF", "Release",
839 "off", True, True, "", "ON"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800840 ("arm/mps2/an521", "toolchain_GNUARM.cmake",
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800841 True, "2", False, "OFF", "Debug",
842 "off", True, True, "profile_medium", "ON"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800843 ("arm/mps2/an521", "toolchain_GNUARM.cmake",
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800844 True, "3", False, "OFF", "Debug",
845 "off", True, True, "profile_large", "ON"),
Xinyu Zhangd1ef9982021-06-24 11:31:11 +0800846 # AN521_GNUARM_PSA_2_REG_Release_BL2_NS_MEDIUM_PSOFF
847 ("arm/mps2/an521", "toolchain_GNUARM.cmake", True,
848 "2", True, "OFF", "Release", "off", True, True, "profile_medium", "OFF"),
Xinyu Zhangd1ef9982021-06-24 11:31:11 +0800849 # MUSCA_B1_GNUARM_1_REG_Minsizerel_BL2_NS
850 ("arm/musca_b1/sse_200", "toolchain_GNUARM.cmake", False,
851 "1", True, "OFF", "Minsizerel", "off", True, True, "", "ON"),
852 # stm32l562e_dk_ARMCLANG_PSA_1_REG_Release_BL2_NS
853 ("stm/stm32l562e_dk", "toolchain_ARMCLANG.cmake", True,
854 "1", True, "OFF", "Release", "off", True, True, "", "ON"),
855 # stm32l562e_dk_GNUARM_PSA_2_REG_Release_BL2_NS
856 ("stm/stm32l562e_dk", "toolchain_GNUARM.cmake", True,
857 "2", True, "OFF", "Release", "off", True, True, "", "ON"),
858 # stm32l562e_dk_GNUARM_PSA_3_REG_Release_BL2_NS
859 ("stm/stm32l562e_dk", "toolchain_GNUARM.cmake", True,
860 "3", True, "OFF", "Release", "off", True, True, "", "ON"),
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800861 ],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800862 "invalid": _common_tfm_invalid_configs + [
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800863 # invalid configs that are not supported by TF-M
Summer Qin3c2b5722021-05-26 10:43:45 +0800864 ("arm/musca_s1", "*", "*", "*", "*", "*",
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800865 "*", "*", "*", "*", "profile_medium", "*"),
866 # valid configs supported by TF-M but not needed in per-patch
867 ("*", "*", "*", "1", "*", "*", "Release",
868 "*", "*", "*", "*", "*"),
869 ("*", "*", "*", "1", "*", "*", "Minsizerel",
870 "*", "*", "*", "*", "*"),
871 ("*", "*", "*", "2", "*", "*", "Debug",
872 "*", "*", "*", "*", "*"),
873 ("*", "*", "*", "2", "*", "*", "Minsizerel",
874 "*", "*", "*", "*", "*"),
875 ("*", "*", "*", "3", "*", "*", "Debug",
876 "*", "*", "*", "*", "*"),
877 ("*", "*", "*", "3", "*", "*", "Release",
878 "*", "*", "*", "*", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800879 ("arm/mps2/an519", "*", "*", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800880 "*", "*", "*", "*", "profile_small", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800881 ("arm/musca_s1", "*", "*", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800882 "*", "*", "*", "*", "profile_small", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800883 ("arm/mps2/an519", "*", "*", "*", "*", "*",
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800884 "*", "*", "*", "*", "profile_medium", "*"),
Summer Qin3c2b5722021-05-26 10:43:45 +0800885 ("arm/mps2/an521", "*", "*", "*", "*", "*",
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800886 "*", "*", "*", "*", "profile_medium", "*"),
887 ("*", "toolchain_GNUARM.cmake", "*", "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800888 "*", "*", "*", "*", "profile_small", "*"),
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800889 ("*", "toolchain_ARMCLANG.cmake", "*", "*", "*", "*",
890 "*", "*", "*", "*", "profile_medium", "*"),
Xinyu Zhangf86d42b2021-05-17 10:51:35 +0800891 ("*", "toolchain_ARMCLANG.cmake", False, "*", "*", "*",
Xinyu Zhangeb442a12021-02-01 15:16:19 +0800892 "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800893 ]
894 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800895
Karl Zhang14573bc2020-06-08 09:23:21 +0800896config_pp_OTP = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800897 "tfm_platform": ["arm/musca_b1/sse_200"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800898 "toolchain_file": ["toolchain_GNUARM.cmake"],
899 "psa_api": [True, False],
900 "isolation_level": ["1", "2"],
901 "test_regression": [True],
902 "test_psa_api": ["OFF"],
903 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800904 "with_otp": ["ENABLED"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800905 "with_bl2": [True],
906 "with_ns": [True, False],
907 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800908 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800909 },
910 "common_params": _common_tfm_builder_cfg,
911 "invalid": _common_tfm_invalid_configs + []
912 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800913
914# Configure build manager to build several combinations
915config_pp_PSA_API = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800916 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800917 "toolchain_file": ["toolchain_GNUARM.cmake"],
918 "psa_api": [True],
919 "isolation_level": ["2"],
920 "test_regression": [False],
921 "test_psa_api": ["IPC",
922 "CRYPTO",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800923 "INITIAL_ATTESTATION",
Xinyu Zhang39acb412021-07-09 20:35:19 +0800924 "STORAGE"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800925 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +0800926 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800927 "with_bl2": [True],
928 "with_ns": [True, False],
929 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800930 "partition_ps": ["ON"],
Karl Zhang14573bc2020-06-08 09:23:21 +0800931 },
932 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800933 "invalid": _common_tfm_invalid_configs + []
Karl Zhang14573bc2020-06-08 09:23:21 +0800934 }
935
Karl Zhang14573bc2020-06-08 09:23:21 +0800936config_pp_PSoC64 = {"seed_params": {
Xinyu Zhangb708f572020-09-15 11:43:46 +0800937 "tfm_platform": ["cypress/psoc64"],
938 "toolchain_file": ["toolchain_GNUARM.cmake"],
939 "psa_api": [True],
940 "isolation_level": ["1", "2"],
941 "test_regression": [True],
942 "test_psa_api": ["OFF"],
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": [False],
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
Xinyu Zhangf25856a2021-06-17 14:06:46 +0800954config_cov_an519 = {"seed_params": {
955 "tfm_platform": ["arm/mps2/an519"],
956 "toolchain_file": ["toolchain_GNUARM.cmake"],
957 "psa_api": [True, False],
958 "isolation_level": ["1", "2", "3"],
959 "test_regression": [True, False],
960 "test_psa_api": ["OFF"],
961 "cmake_build_type": ["Debug", "Release"],
962 "with_otp": ["off"],
963 "with_bl2": [True],
964 "with_ns": [True],
965 "profile": ["", "profile_small", "profile_medium"],
966 "partition_ps": ["ON", "OFF"],
967 },
968 "common_params": _common_tfm_builder_cfg,
969 "invalid": _common_tfm_invalid_configs + []
970 }
971
972config_cov_an521 = {"seed_params": {
973 "tfm_platform": ["arm/mps2/an521"],
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", "Minsizerel"],
980 "with_otp": ["off"],
981 "with_bl2": [True],
982 "with_ns": [True],
983 "profile": ["", "profile_small", "profile_medium", "profile_large"],
984 "partition_ps": ["ON", "OFF"],
985 },
986 "common_params": _common_tfm_builder_cfg,
987 "invalid": _common_tfm_invalid_configs + []
988 }
989
Minos Galanakisea421232019-06-20 17:11:28 +0100990# Configruation used for document building
991config_doxygen = {"common_params": {
992 "config_type": "tf-m_documents",
993 "codebase_root_dir": "tf-m",
Summer Qin3c2b5722021-05-26 10:43:45 +0800994 "build_cmds": {"all": ["-DTFM_PLATFORM=arm/mps2/an521 "
Fathi Boudra324fee72020-11-20 10:31:12 +0100995 "-DTFM_TOOLCHAIN_FILE=%(_tfm_code_dir_)s/toolchain_GNUARM.cmake"
Minos Galanakisea421232019-06-20 17:11:28 +0100996 "-DCMAKE_BUILD_TYPE=Debug "
Minos Galanakisea421232019-06-20 17:11:28 +0100997 "%(_tbm_code_dir_)s/",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800998 "cmake --build ./ -- docs"]},
999 "artifact_capture_rex": r'%(_tbm_build_dir_)s/docs/'
1000 r'reference_manual/(?:latex|html)'
Minos Galanakisea421232019-06-20 17:11:28 +01001001 r'/(\w+\.(?:html|md|pdf))$',
1002 },
Xinyu Zhangb708f572020-09-15 11:43:46 +08001003 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +01001004 }
1005
Karl Zhangaff558a2020-05-15 14:28:23 +01001006# Configuration used in testing
Minos Galanakisea421232019-06-20 17:11:28 +01001007config_debug = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +08001008 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001009 "toolchain_file": ["toolchain_ARMCLANG.cmake"],
1010 "psa_api": [False],
1011 "isolation_level": ["1"],
1012 "test_regression": [False],
1013 "test_psa_api": ["OFF"],
Minos Galanakisea421232019-06-20 17:11:28 +01001014 "cmake_build_type": ["Debug"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +08001015 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001016 "with_bl2": [True],
1017 "with_ns": [True],
1018 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001019 "partition_ps": ["ON"],
Minos Galanakisea421232019-06-20 17:11:28 +01001020 },
1021 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +08001022 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +01001023 }
1024
Dean Birch4c6ad622020-03-13 11:28:03 +00001025# Configuration used in CI
Xinyu Zhangb708f572020-09-15 11:43:46 +08001026config_ci = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +08001027 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001028 "toolchain_file": ["toolchain_ARMCLANG.cmake",
1029 "toolchain_GNUARM.cmake"],
1030 "psa_api": [True, False],
1031 "isolation_level": ["1", "2"],
1032 "test_regression": [True, False],
1033 "test_psa_api": ["OFF"],
1034 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +08001035 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001036 "with_bl2": [True, False],
1037 "with_ns": [True],
1038 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001039 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001040 },
1041 "common_params": _common_tfm_builder_cfg,
1042 "invalid": _common_tfm_invalid_configs + [
1043 ("*", "toolchain_ARMCLANG.cmake", True, "*", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001044 "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +08001045 ("*", "toolchain_ARMCLANG.cmake", False, "1", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001046 "*", "*", False, "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +08001047 ]
1048 }
Matthew Hartfb6fd362020-03-04 21:03:59 +00001049
Xinyu Zhangb708f572020-09-15 11:43:46 +08001050config_lava_debug = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +08001051 "tfm_platform": ["arm/mps2/an521", "arm/mps2/an519"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001052 "toolchain_file": ["toolchain_GNUARM.cmake"],
1053 "psa_api": [True, False],
1054 "isolation_level": ["1", "2"],
1055 "test_regression": [True],
1056 "test_psa_api": ["OFF"],
1057 "cmake_build_type": ["Release"],
Xinyu Zhanga50432e2020-10-23 18:00:18 +08001058 "with_otp": ["off"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001059 "with_bl2": [True, False],
1060 "with_ns": [True, False],
1061 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001062 "partition_ps": ["ON"],
Xinyu Zhangb708f572020-09-15 11:43:46 +08001063 },
1064 "common_params": _common_tfm_builder_cfg,
1065 "invalid": _common_tfm_invalid_configs + [
Summer Qin3c2b5722021-05-26 10:43:45 +08001066 ("arm/mps2/an521", "toolchain_GNUARM.cmake", True, "2", "*", "*",
Xinyu Zhang9fd74242020-10-22 11:30:50 +08001067 "*", "*", True, "*", "*", "*")
Xinyu Zhangb708f572020-09-15 11:43:46 +08001068 ]
1069 }
Dean Birch4c6ad622020-03-13 11:28:03 +00001070
Karl Zhangaff558a2020-05-15 14:28:23 +01001071_builtin_configs = {
Karl Zhang14573bc2020-06-08 09:23:21 +08001072 #release test group
Karl Zhangaff558a2020-05-15 14:28:23 +01001073 "tfm_test": config_tfm_test,
1074 "tfm_test2": config_tfm_test2,
Karl Zhang14573bc2020-06-08 09:23:21 +08001075 "tfm_profile": config_tfm_profile,
Karl Zhangaff558a2020-05-15 14:28:23 +01001076 "tfm_test_otp": config_tfm_test_OTP,
1077 "psa_api": config_PSA_API,
1078 "psa_api_otp": config_PSA_API_OTP,
1079 "psa_ff": config_PSA_FF,
1080 "psa_ff_otp": config_PSA_FF_OTP,
Karl Zhang14573bc2020-06-08 09:23:21 +08001081 "tfm_psoc64": config_PSOC64,
Arthur She19c0e1a2021-06-02 11:06:19 -07001082 "tfm_stm32l562e_dk": config_STM32L562E_DK,
Karl Zhang14573bc2020-06-08 09:23:21 +08001083
1084 #nightly test group
1085 "nightly_test": config_nightly,
1086 "nightly_profile": config_nightly_profile,
1087 "nightly_psa_api": config_nightly_PSA_API,
1088 "nightly_ff": config_nightly_PSA_FF,
1089 "nightly_otp": config_nightly_OTP,
Xinyu Zhangfd70cfe2021-06-29 11:14:13 +08001090 "nightly_stm32l562e_dk": config_nightly_STM32L562E_DK,
Karl Zhang14573bc2020-06-08 09:23:21 +08001091
1092 #per patch test group
1093 "pp_test": config_pp_test,
1094 "pp_OTP": config_pp_OTP,
1095 "pp_PSA_API": config_pp_PSA_API,
1096 "pp_psoc64": config_pp_PSoC64,
1097
Xinyu Zhangf25856a2021-06-17 14:06:46 +08001098 #code coverage test group
1099 "coverage_an519": config_cov_an519,
1100 "coverage_an521": config_cov_an521,
1101
Karl Zhang14573bc2020-06-08 09:23:21 +08001102 #full test group in the old CI
Karl Zhangaff558a2020-05-15 14:28:23 +01001103 "full": config_full,
Karl Zhang14573bc2020-06-08 09:23:21 +08001104
1105 #specific test group
Karl Zhangaff558a2020-05-15 14:28:23 +01001106 "an524": config_AN524,
Minos Galanakisea421232019-06-20 17:11:28 +01001107 "an521": config_AN521,
Karl Zhang14573bc2020-06-08 09:23:21 +08001108 "an521_psa_api": config_AN521_PSA_API,
1109 "an521_psa_ipc": config_AN521_PSA_IPC,
Minos Galanakisea421232019-06-20 17:11:28 +01001110 "an519": config_AN519,
Minos Galanakisea421232019-06-20 17:11:28 +01001111 "musca_b1": config_MUSCA_B1,
Mark Horvath8d281cd2020-12-07 15:20:26 +01001112 "musca_b1_se": config_MUSCA_B1_SE,
Karl Zhangeffed972020-06-30 15:48:01 +08001113 "musca_s1": config_MUSCA_S1,
Karl Zhang96dfe2d2020-05-11 11:31:40 +08001114 "psoc64": config_PSOC64,
Minos Galanakisea421232019-06-20 17:11:28 +01001115 "ipc": config_IPC,
1116 "doxygen": config_doxygen,
Dean Birch4c6ad622020-03-13 11:28:03 +00001117 "debug": config_debug,
Karl Zhangaff558a2020-05-15 14:28:23 +01001118 "release": config_release,
Matthew Hartfb6fd362020-03-04 21:03:59 +00001119 "debug": config_debug,
Karl Zhang14573bc2020-06-08 09:23:21 +08001120
1121 #DevOps team test group
Matthew Hartfb6fd362020-03-04 21:03:59 +00001122 "lava_debug": config_lava_debug,
Xinyu Zhanga1000582020-12-04 15:25:24 +08001123 "ci": config_ci}
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001124
1125if __name__ == '__main__':
1126 import os
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001127
Minos Galanakisea421232019-06-20 17:11:28 +01001128 # Default behavior is to export refference config when called
1129 _dir = os.getcwd()
1130 from utils import save_json
1131 for _cname, _cfg in _builtin_configs.items():
1132 _fname = os.path.join(_dir, _cname + ".json")
1133 print("Exporting config %s" % _fname)
1134 save_json(_fname, _cfg)