blob: 8140c20827f589427e28533f8622e7bf1f91a504 [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/*
Raef Coles61b43a42022-01-12 11:42:57 +000011 * Copyright (c) 2018-2022, 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
Paul Sokolovsky3e8fce02022-04-07 01:23:30 +030022from copy import deepcopy
23
24
Minos Galanakisea421232019-06-20 17:11:28 +010025# common parameters for tf-m build system
26# This configuration template will be passed into the tfm-builder module after
27# the template evaluation is converted to a command
28
29_common_tfm_builder_cfg = {
30 "config_type": "tf-m",
31 "codebase_root_dir": "tf-m",
32 # Order to which the variants are evaluated. This affects the name of
33 # variant configuration and the wildcard replacement logic in invalid
34 # configuration tuples
Xinyu Zhangb708f572020-09-15 11:43:46 +080035 "sort_order": ["tfm_platform",
Xinyu Zhang433771e2022-04-01 16:49:17 +080036 "compiler",
Xinyu Zhang73ed2992021-09-15 11:38:23 +080037 "lib_model",
Xinyu Zhangb708f572020-09-15 11:43:46 +080038 "isolation_level",
39 "test_regression",
40 "test_psa_api",
Minos Galanakisea421232019-06-20 17:11:28 +010041 "cmake_build_type",
Xinyu Zhangb708f572020-09-15 11:43:46 +080042 "with_bl2",
43 "with_ns",
Xinyu Zhang9fd74242020-10-22 11:30:50 +080044 "profile",
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +080045 "partition_ps",
Xinyu Zhangfd2e1152021-12-17 18:09:01 +080046 "extra_params"],
Minos Galanakisea421232019-06-20 17:11:28 +010047
48 # Keys for the templace will come from the combinations of parameters
49 # provided in the seed dictionary.
50
Xinyu Zhangf3e19482022-01-11 15:48:13 +080051 "config_template": "cmake -G Ninja " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080052 "-DTFM_PLATFORM=%(tfm_platform)s " + \
Xinyu Zhang433771e2022-04-01 16:49:17 +080053 "-DTFM_TOOLCHAIN_FILE=%(codebase_root_dir)s/%(compiler)s " + \
Xinyu Zhang73ed2992021-09-15 11:38:23 +080054 "-DTFM_LIB_MODEL=%(lib_model)s " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080055 "-DTFM_ISOLATION_LEVEL=%(isolation_level)s " + \
56 "-DTEST_NS=%(test_regression)s -DTEST_S=%(test_regression)s " + \
Raef Coles61b43a42022-01-12 11:42:57 +000057 "-DTEST_BL2=%(test_regression)s " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080058 "-DCMAKE_BUILD_TYPE=%(cmake_build_type)s " + \
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +080059 "-DTEST_PSA_API=%(test_psa_api)s " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080060 "-DBL2=%(with_bl2)s " + \
61 "-DNS=%(with_ns)s " + \
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +080062 "-DTFM_PROFILE=%(profile)s " + \
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +080063 "-DTFM_PARTITION_PROTECTED_STORAGE=%(partition_ps)s " + \
64 "%(extra_params)s " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080065 "-DTFM_TEST_REPO_PATH=%(codebase_root_dir)s/../tf-m-tests " + \
66 "-DMBEDCRYPTO_PATH=%(codebase_root_dir)s/../mbedtls " + \
67 "-DPSA_ARCH_TESTS_PATH=%(codebase_root_dir)s/../psa-arch-tests " + \
68 "-DMCUBOOT_PATH=%(codebase_root_dir)s/../mcuboot " + \
Xinyu Zhangb708f572020-09-15 11:43:46 +080069 "%(codebase_root_dir)s",
Karl Zhangaff558a2020-05-15 14:28:23 +010070
Xinyu Zhang433771e2022-04-01 16:49:17 +080071 "set_compiler_path": "export PATH=$PATH:$%(compiler)s_PATH",
72
Minos Galanakisea421232019-06-20 17:11:28 +010073 # A small subset of string substitution params is allowed in commands.
74 # tfm_build_manager will replace %(_tbm_build_dir_)s, %(_tbm_code_dir_)s,
75 # _tbm_target_platform_ with the paths set when building
76
Xinyu Zhangb708f572020-09-15 11:43:46 +080077 "artifact_capture_rex": (r'%(_tbm_build_dir_)s/bin'
Minos Galanakisea421232019-06-20 17:11:28 +010078 r'/(\w+\.(?:axf|bin|hex))$'),
79
80 # ALL commands will be executed for every build.
81 # Other keys will append extra commands when matching target_platform
Fathi Boudra83e4f292020-12-04 22:33:40 +010082 "build_cmds": {"all": ["cmake --build ./ -- install"],
Summer Qin3c2b5722021-05-26 10:43:45 +080083 "arm/musca_b1/sse_200": [("srec_cat "
Mark Horvath8d281cd2020-12-07 15:20:26 +010084 "%(_tbm_build_dir_)s/bin/"
85 "bl2.bin "
86 "-Binary -offset 0xA000000 "
87 "-fill 0xFF 0xA000000 0xA020000 "
88 "%(_tbm_build_dir_)s/bin/"
89 "tfm_s_ns_signed.bin "
90 "-Binary -offset 0xA020000 "
91 "-fill 0xFF 0xA020000 0xA200000 "
92 "-o %(_tbm_build_dir_)s/bin/"
93 "tfm.hex -Intel")],
Summer Qin3c2b5722021-05-26 10:43:45 +080094 "arm/musca_s1": [("srec_cat "
Xinyu Zhangb708f572020-09-15 11:43:46 +080095 "%(_tbm_build_dir_)s/bin/"
96 "bl2.bin "
Karl Zhangeffed972020-06-30 15:48:01 +080097 "-Binary -offset 0xA000000 "
Raef Coles543aab32020-12-03 11:12:02 +000098 "-fill 0xFF 0xA000000 0xA020000 "
Xinyu Zhangb708f572020-09-15 11:43:46 +080099 "%(_tbm_build_dir_)s/bin/"
Xinyu Zhang694eb492020-11-04 18:29:08 +0800100 "tfm_s_ns_signed.bin "
Raef Coles543aab32020-12-03 11:12:02 +0000101 "-Binary -offset 0xA020000 "
102 "-fill 0xFF 0xA020000 0xA200000 "
103 "-o %(_tbm_build_dir_)s/bin/"
Arthur She19c0e1a2021-06-02 11:06:19 -0700104 "tfm.hex -Intel")],
105 "stm/stm32l562e_dk": [("echo 'STM32L562E-DK board post process';"
106 "%(_tbm_build_dir_)s/postbuild.sh;"
107 "pushd %(_tbm_build_dir_)s;"
Arthur She07c91b52021-07-15 15:03:10 -0700108 "BIN_FILES=$(grep -o '\/.*\.bin' TFM_UPDATE.sh | sed 's/^/bin/');"
109 "tar jcf ./bin/stm32l562e-dk-tfm.tar.bz2 regression.sh TFM_UPDATE.sh ${BIN_FILES};"
Arthur She3c0dadd2021-11-18 21:17:48 -0800110 "popd")],
111 "nxp/lpcxpresso55s69": [("echo 'LPCXpresso55S69 board post process\n';"
112 "if [ -f \"%(_tbm_build_dir_)s/bin/bl2.hex\" ]; then FLASH_FILE='flash_bl2_JLink.py'; else FLASH_FILE='flash_JLink.py'; fi;"
113 "pushd %(_tbm_build_dir_)s/../platform/ext/target/nxp/lpcxpresso55s69/scripts;"
114 "LN=$(grep -n 'JLinkExe' ${FLASH_FILE}|awk -F: '{print $1}');"
115 "sed -i \"${LN}s/.*/ print('flash.jlink generated')/\" ${FLASH_FILE};"
116 "python3 ./${FLASH_FILE};"
117 "cd %(_tbm_build_dir_)s/bin;"
118 "BIN_FILES=$(grep loadfile flash.jlink | awk '{print $2}');"
119 "tar jcf lpcxpresso55s69-tfm.tar.bz2 flash.jlink ${BIN_FILES};"
Arthur She87602dc2022-02-06 14:42:18 -0800120 "popd")],
121 "cypress/psoc64": [("echo 'Sign binaries for Cypress PSoC64 platform';"
122 "pushd %(_tbm_build_dir_)s/..;"
123 "sudo /usr/local/bin/cysecuretools "
124 "--policy platform/ext/target/cypress/psoc64/security/policy/policy_multi_CM0_CM4_tfm.json "
125 "--target cy8ckit-064s0s2-4343w "
126 "sign-image "
127 "--hex %(_tbm_build_dir_)s/bin/tfm_s.hex "
128 "--image-type BOOT --image-id 1;"
129 "sudo /usr/local/bin/cysecuretools "
130 "--policy platform/ext/target/cypress/psoc64/security/policy/policy_multi_CM0_CM4_tfm.json "
131 "--target cy8ckit-064s0s2-4343w "
132 "sign-image "
133 "--hex %(_tbm_build_dir_)s/bin/tfm_ns.hex "
134 "--image-type BOOT --image-id 16;"
135 "mv %(_tbm_build_dir_)s/bin/tfm_s.hex %(_tbm_build_dir_)s/bin/tfm_s_signed.hex;"
136 "mv %(_tbm_build_dir_)s/bin/tfm_ns.hex %(_tbm_build_dir_)s/bin/tfm_ns_signed.hex;"
137 "popd")]
Minos Galanakisea421232019-06-20 17:11:28 +0100138 },
139
140 # (Optional) If set will fail if those artefacts are missing post build
141 "required_artefacts": {"all": [
Xinyu Zhangb708f572020-09-15 11:43:46 +0800142 "%(_tbm_build_dir_)s/bin/"
143 "tfm_s.bin",
144 "%(_tbm_build_dir_)s/bin/"
145 "tfm_ns.bin"],
Summer Qin3c2b5722021-05-26 10:43:45 +0800146 "arm/musca_b1/sse_200": [
Xinyu Zhangb708f572020-09-15 11:43:46 +0800147 "%(_tbm_build_dir_)s/bin/"
148 "tfm.hex",
149 "%(_tbm_build_dir_)s/bin/"
Xinyu Zhang694eb492020-11-04 18:29:08 +0800150 "bl2.bin",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800151 "%(_tbm_build_dir_)s/bin/"
152 "tfm_sign.bin"],
Summer Qin3c2b5722021-05-26 10:43:45 +0800153 "arm/musca_s1": [
Xinyu Zhangb708f572020-09-15 11:43:46 +0800154 "%(_tbm_build_dir_)s/bin/"
155 "tfm.hex",
156 "%(_tbm_build_dir_)s/bin/"
Xinyu Zhang694eb492020-11-04 18:29:08 +0800157 "bl2.bin",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800158 "%(_tbm_build_dir_)s/bin/"
159 "tfm_sign.bin"]
Minos Galanakisea421232019-06-20 17:11:28 +0100160 }
161}
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100162
Xinyu Zhangb708f572020-09-15 11:43:46 +0800163# List of all build configs that are impossible under all circumstances
164_common_tfm_invalid_configs = [
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800165 # GCC defect
Xinyu Zhang589fd052022-04-19 17:54:16 +0800166 ("arm/mps2/an519", "GCC_7_3_1", "*", "*", "*", "*", "Minsizerel", "*", "*", "*", "*", "*"),
Xinyu Zhang459a1982021-07-21 22:34:49 +0800167 # LR_CODE size exceeds limit on MUSCA_B1 & MUSCA_S1 with regression tests in Debug mode built with ARMCLANG
Xinyu Zhang589fd052022-04-19 17:54:16 +0800168 ("arm/musca_b1/sse_200", "ARMCLANG_6_13", "*", "*", True, "OFF", "Debug", "*", "*", "", "*", "*"),
169 ("arm/musca_s1", "ARMCLANG_6_13", "*", "*", True, "OFF", "Debug", "*", "*", "", "*", "*"),
Karl Zhangc858a722021-03-22 21:38:19 +0800170 # Load range overlap on Musca for IPC Debug type: T895
Xinyu Zhang589fd052022-04-19 17:54:16 +0800171 ("arm/musca_b1/sse_200", "ARMCLANG_6_13", "*", "*", "*", "IPC", "Debug", "*", "*", "*", "*", "*"),
172 ("arm/musca_s1", "ARMCLANG_6_13", "*", "*", "*", "IPC", "Debug", "*", "*", "*", "*", "*"),
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800173 # LVL2 and LVL3 requires IPC model
Xinyu Zhang589fd052022-04-19 17:54:16 +0800174 ("*", "*", True, "2", "*", "*", "*", "*", "*", "*", "*", "*"),
175 ("*", "*", True, "3", "*", "*", "*", "*", "*", "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800176 # Regression requires NS
Xinyu Zhang589fd052022-04-19 17:54:16 +0800177 ("*", "*", "*", "*", True, "*", "*", "*", False, "*", "*", "*"),
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800178 # Musca requires BL2
Xinyu Zhang589fd052022-04-19 17:54:16 +0800179 ("arm/musca_b1/sse_200", "*", "*", "*", "*", "*", "*", False, "*", "*", "*", "*"),
180 ("arm/musca_s1", "*", "*", "*", "*", "*", "*", False, "*", "*", "*", "*"),
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800181 # Only AN521 and MUSCA_B1 support Isolation Level 3
Xinyu Zhang589fd052022-04-19 17:54:16 +0800182 ("arm/mps2/an519", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
183 ("arm/mps3/an524", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
184 ("arm/musca_s1", "*", "*", "3", "*", "*", "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800185 ]
186
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100187# Configure build manager to build several combinations
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800188# Config group for per-patch job
189config_pp_test = {"seed_params": {
190 # AN519_ARMCLANG_IPC_1_REG_Debug_BL2_NS
191 "tfm_platform": ["arm/mps2/an519"],
192 "compiler": ["ARMCLANG_6_13"],
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800193 "lib_model": [False],
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800194 "isolation_level": ["1"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800195 "test_regression": [True],
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800196 "test_psa_api": ["OFF"],
197 "cmake_build_type": ["Debug"],
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800198 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800199 "with_ns": [True],
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800200 "profile": [""],
201 "partition_ps": ["ON"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800202 "extra_params": [""]
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800203 },
204 "common_params": _common_tfm_builder_cfg,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800205 "valid": [
206 # AN519_ARMCLANG_IPC_2_REG_Release_BL2_NS
207 ("arm/mps2/an519", "ARMCLANG_6_13", False, "2", True,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800208 "OFF", "Release", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800209 # AN519_GCC_IPC_1_REG_Debug_BL2_NS
210 ("arm/mps2/an519", "GCC_7_3_1", False, "1", True,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800211 "OFF", "Debug", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800212 # AN519_GCC_IPC_2_REG_Release_BL2_NS
213 ("arm/mps2/an519", "GCC_7_3_1", False, "2", True,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800214 "OFF", "Release", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800215 # AN519_GCC_LIB_1_REG_Debug_BL2_NS
216 ("arm/mps2/an519", "GCC_7_3_1", True, "1", True,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800217 "OFF", "Debug", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800218 # AN521_ARMCLANG_IPC_1_REG_Debug_BL2_NS
219 ("arm/mps2/an521", "ARMCLANG_6_13", False, "1", True,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800220 "OFF", "Debug", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800221 # AN521_ARMCLANG_IPC_2_Debug_BL2_NS
222 ("arm/mps2/an521", "ARMCLANG_6_13", False, "2", False,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800223 "OFF", "Debug", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800224 # AN521_ARMCLANG_IPC_2_REG_Release_BL2_NS
225 ("arm/mps2/an521", "ARMCLANG_6_13", False, "2", True,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800226 "OFF", "Release", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800227 # AN521_ARMCLANG_IPC_3_REG_Minsizerel_BL2_NS
228 ("arm/mps2/an521", "ARMCLANG_6_13", False, "3", True,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800229 "OFF", "Minsizerel", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800230 # AN521_ARMCLANG_IPC_3_Release_BL2_NS
231 ("arm/mps2/an521", "ARMCLANG_6_13", False, "3", False,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800232 "OFF", "Release", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800233 # AN521_GCC_IPC_1_REG_Debug_BL2_NS
234 ("arm/mps2/an521", "GCC_7_3_1", False, "1", True,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800235 "OFF", "Debug", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800236 # AN521_GCC_IPC_2_Debug_BL2_NS_MEDIUM
237 ("arm/mps2/an521", "GCC_7_3_1", False, "2", False, "OFF",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800238 "Debug", True, True, "profile_medium", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800239 # AN521_GCC_IPC_2_REG_Release_BL2_NS
240 ("arm/mps2/an521", "GCC_7_3_1", False, "2", True,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800241 "OFF", "Release", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800242 # AN521_GCC_IPC_3_Debug_BL2_NS_LARGE
243 ("arm/mps2/an521", "GCC_7_3_1", False, "3", False, "OFF",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800244 "Debug", True, True, "profile_large", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800245 # AN521_GCC_IPC_3_REG_Minsizerel_BL2_NS
246 ("arm/mps2/an521", "GCC_7_3_1", False, "3", True,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800247 "OFF", "Minsizerel", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800248 # AN521_GCC_LIB_1_Debug_BL2_NS
249 ("arm/mps2/an521", "GCC_7_3_1", True, "1", False,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800250 "OFF", "Debug", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800251 # AN521_GCC_LIB_1_REG_Debug_BL2_NS
252 ("arm/mps2/an521", "GCC_7_3_1", True, "1", True,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800253 "OFF", "Debug", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800254 # AN521_GCC_IPC_2_REG_Release_BL2_NS_MEDIUM_PSOFF
255 ("arm/mps2/an521", "GCC_7_3_1",
256 False, "2", True, "OFF", "Release",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800257 True, True, "profile_medium", "OFF", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800258 # AN552_GNUARM_IPC_1_REG_Debug_BL2_NS
259 ("arm/mps3/an552", "GCC_10_3", False, "1", True, "OFF",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800260 "Debug", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800261 # AN552_GNUARM_IPC_1_REG_Release_BL2_NS
262 ("arm/mps3/an552", "GCC_10_3", False, "1", True, "OFF",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800263 "Release", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800264 # MUSCA_B1_GCC_LIB_1_REG_Minsizerel_BL2_NS
265 ("arm/musca_b1/sse_200", "GCC_7_3_1", True, "1", True,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800266 "OFF", "Minsizerel", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800267 # MUSCA_S1_ARMCLANG_IPC_2_REG_Release_BL2_NS
268 ("arm/musca_s1", "ARMCLANG_6_13", False, "2", True, "OFF",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800269 "Release", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800270 # MUSCA_S1_GCC_IPC_1_REG_Debug_BL2_NS
271 ("arm/musca_s1", "GCC_10_3", False, "1", True, "OFF",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800272 "Debug", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800273 # MUSCA_S1_GCC_IPC_2_REG_Release_BL2_NS
274 ("arm/musca_s1", "GCC_10_3", False, "2", True, "OFF",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800275 "Release", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800276 # MUSCA_S1_GCC_LIB_1_REG_Debug_BL2_NS
277 ("arm/musca_s1", "GCC_10_3", True, "1", True, "OFF",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800278 "Debug", True, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800279 # MUSCA_S1_GCC_IPC_2_REG_Release_BL2_NS_FPHARD
280 ("arm/musca_s1", "GCC_10_3", False, "2", True, "OFF",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800281 "Release", True, True, "", "ON", "FPHARD"),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800282 # MUSCA_S1_GCC_IPC_1_REG_Release_BL2_NS_CC_DRIVER_PSA
283 ("arm/musca_s1", "GCC_7_3_1", False, "1", True, "OFF",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800284 "Release", True, True, "", "ON", "CC_DRIVER_PSA"),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800285 # stm32l562e_dk_ARMCLANG_IPC_1_REG_Release_BL2_NS
286 ("stm/stm32l562e_dk", "ARMCLANG_6_13", False, "1", True,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800287 "OFF", "Release", True, True, "", "ON", "CRYPTO_OFF"),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800288 # stm32l562e_dk_GCC_IPC_2_REG_Release_BL2_NS
289 ("stm/stm32l562e_dk", "GCC_7_3_1", False, "2", False, "OFF",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800290 "Release", True, True, "", "ON", "CRYPTO_ON"),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800291 # stm32l562e_dk_GCC_IPC_3_REG_Release_BL2_NS
292 ("stm/stm32l562e_dk", "GCC_7_3_1", False, "3", True, "OFF",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800293 "Release", True, True, "", "ON", "CRYPTO_OFF"),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800294 # psoc64_GCC_IPC_2_REG_Release_NS
295 ("cypress/psoc64", "GCC_7_3_1", False, "2", True, "OFF",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800296 "Release", False, True, "", "ON", ""),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800297 ],
Xinyu Zhangfcb6aad2021-08-25 16:24:11 +0800298 "invalid": _common_tfm_invalid_configs + []
299 }
300
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800301# Config group for nightly job
302config_nightly_test = {"seed_params": {
303 "tfm_platform": ["arm/mps2/an519",
304 "arm/mps2/an521",
305 "arm/mps3/an524",
306 "arm/musca_s1",
307 "arm/musca_b1/sse_200"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800308 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800309 "lib_model": [True, False],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800310 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800311 "test_regression": [True, False],
312 "test_psa_api": ["OFF"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800313 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800314 "with_bl2": [True],
315 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800316 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800317 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800318 "extra_params": [""]
Minos Galanakisea421232019-06-20 17:11:28 +0100319 },
320 "common_params": _common_tfm_builder_cfg,
Xinyu Zhangb708f572020-09-15 11:43:46 +0800321 "invalid": _common_tfm_invalid_configs + []
Minos Galanakisea421232019-06-20 17:11:28 +0100322 }
323
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800324# Config group for release job
325config_release_test = {"seed_params": {
326 "tfm_platform": ["arm/mps2/an519",
327 "arm/mps2/an521",
328 "arm/mps3/an524",
329 "arm/musca_b1/sse_200",
330 "arm/musca_s1"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800331 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800332 "lib_model": [True, False],
Xinyu Zhang6922b7a2020-11-05 15:21:27 +0800333 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800334 "test_regression": [True, False],
335 "test_psa_api": ["OFF"],
336 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800337 "with_bl2": [True],
338 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800339 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800340 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800341 "extra_params": [""]
Xinyu Zhangb708f572020-09-15 11:43:46 +0800342 },
343 "common_params": _common_tfm_builder_cfg,
Xinyu Zhang47bfc0e2022-04-06 17:26:59 +0800344 "valid": [
345 # sanity test for GCC v11.2
346 # AN521_GCC_IPC_3_REG_Relwithdebinfo_BL2_NS
347 ("arm/mps2/an521", "GCC_11_2",
348 False, "3", True, "OFF", "Relwithdebinfo",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800349 True, True, "", "ON", ""),
Xinyu Zhang47bfc0e2022-04-06 17:26:59 +0800350 ],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800351 "invalid": _common_tfm_invalid_configs + []
352 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800353
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800354# Config groups for TF-M features
355config_profile_s = {"seed_params": {
David Huda27ae72022-03-28 15:32:19 +0800356 "tfm_platform": ["arm/mps2/an519", "arm/mps2/an521"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800357 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
David Huda27ae72022-03-28 15:32:19 +0800358 "lib_model": [True],
359 "isolation_level": ["1"],
360 "test_regression": [True, False],
361 "test_psa_api": ["OFF"],
362 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
David Huda27ae72022-03-28 15:32:19 +0800363 "with_bl2": [True],
364 "with_ns": [True],
365 "profile": ["profile_small"],
366 "partition_ps": ["OFF"],
367 "extra_params": [""]
368 },
369 "common_params": _common_tfm_builder_cfg,
370 "valid": [
371 # Profile Small also supports SFN model
Xinyu Zhang589fd052022-04-19 17:54:16 +0800372 ("*", "*", False, "*", "*", "*", "*", "*", "*", "*",
David Huda27ae72022-03-28 15:32:19 +0800373 "*", "SFN_ENABLE")
374 ],
375 "invalid": _common_tfm_invalid_configs + [
Xinyu Zhang433771e2022-04-01 16:49:17 +0800376 ("arm/mps2/an519", "GCC_7_3_1", "*", "*", "*",
Xinyu Zhang589fd052022-04-19 17:54:16 +0800377 "*", "Minsizerel", "*", "*", "*", "*", "*")
David Huda27ae72022-03-28 15:32:19 +0800378 ]
379 }
380
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800381config_profile_m = {"seed_params": {
382 "tfm_platform": ["arm/mps2/an519",
383 "arm/mps2/an521",
384 "arm/musca_b1/sse_200"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800385 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800386 "lib_model": [False],
387 "isolation_level": ["2"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800388 "test_regression": [True, False],
389 "test_psa_api": ["OFF"],
390 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800391 "with_bl2": [True],
392 "with_ns": [True],
393 "profile": ["profile_medium"],
394 "partition_ps": ["ON", "OFF"],
395 "extra_params": [""]
396 },
397 "common_params": _common_tfm_builder_cfg,
398 "invalid": _common_tfm_invalid_configs + []
399 }
400
401config_profile_l = {"seed_params": {
402 "tfm_platform": ["arm/mps2/an521"],
403 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
404 "lib_model": [False],
405 "isolation_level": ["3"],
406 "test_regression": [True, False],
407 "test_psa_api": ["OFF"],
408 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800409 "with_bl2": [True],
410 "with_ns": [True],
411 "profile": ["profile_large"],
412 "partition_ps": ["ON", "OFF"],
413 "extra_params": [""]
414 },
415 "common_params": _common_tfm_builder_cfg,
416 "invalid": _common_tfm_invalid_configs + []
417 }
418
419config_cc_driver_psa = {"seed_params": {
420 "tfm_platform": ["arm/musca_b1/sse_200",
421 "arm/musca_s1"],
422 "compiler": ["GCC_7_3_1"],
423 "lib_model": [False],
424 "isolation_level": ["1"],
425 "test_regression": [True],
426 "test_psa_api": ["OFF"],
427 "cmake_build_type": ["Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800428 "with_bl2": [True],
Xinyu Zhang5564d8b2020-11-13 10:22:27 +0800429 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800430 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800431 "partition_ps": ["ON"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800432 "extra_params": ["CC_DRIVER_PSA"]
Xinyu Zhangb708f572020-09-15 11:43:46 +0800433 },
434 "common_params": _common_tfm_builder_cfg,
435 "invalid": _common_tfm_invalid_configs + []
436 }
Karl Zhangaff558a2020-05-15 14:28:23 +0100437
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800438config_fp = {"seed_params": {
Summer Qin3c2b5722021-05-26 10:43:45 +0800439 "tfm_platform": ["arm/musca_s1"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800440 "compiler": ["GCC_10_3"],
441 "lib_model": [False],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800442 "isolation_level": ["1", "2"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800443 "test_regression": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800444 "test_psa_api": ["OFF"],
445 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800446 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800447 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800448 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800449 "partition_ps": ["ON"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800450 "extra_params": ["FPSOFT", "FPHARD", "FPHARD_LOFF"]
Xinyu Zhangb708f572020-09-15 11:43:46 +0800451 },
452 "common_params": _common_tfm_builder_cfg,
453 "invalid": _common_tfm_invalid_configs + []
454 }
Karl Zhangeffed972020-06-30 15:48:01 +0800455
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800456config_psa_api = {"seed_params": {
457 "tfm_platform": ["arm/mps2/an521",
458 "arm/musca_b1/sse_200",
459 "arm/musca_s1"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800460 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800461 "lib_model": [True, False],
Xinyu Zhangb1c550f2020-10-28 15:32:38 +0800462 "isolation_level": ["1", "2", "3"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800463 "test_regression": [False],
464 "test_psa_api": ["IPC",
465 "CRYPTO",
Xinyu Zhangb708f572020-09-15 11:43:46 +0800466 "INITIAL_ATTESTATION",
Xinyu Zhang39acb412021-07-09 20:35:19 +0800467 "STORAGE"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800468 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800469 "with_bl2": [True],
Xinyu Zhang55363aa2020-11-16 16:38:30 +0800470 "with_ns": [True],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800471 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800472 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800473 "extra_params": [""]
Xinyu Zhangb708f572020-09-15 11:43:46 +0800474 },
475 "common_params": _common_tfm_builder_cfg,
476 "invalid": _common_tfm_invalid_configs + [
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800477 # FF does not support library model
Xinyu Zhang589fd052022-04-19 17:54:16 +0800478 ("*", "*", True, "*", "*", "IPC",
Feder Liang357b1602022-01-11 16:47:49 +0800479 "*", "*", "*", "*", "*", "*"),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800480 # FF does not support L3
Xinyu Zhang589fd052022-04-19 17:54:16 +0800481 ("*", "*", "*", "3", "*", "IPC",
Feder Liang357b1602022-01-11 16:47:49 +0800482 "*", "*", "*", "*", "*", "*"),
Xinyu Zhangb708f572020-09-15 11:43:46 +0800483 ]
484 }
Karl Zhang14573bc2020-06-08 09:23:21 +0800485
Xinyu Zhang050e39a2021-11-16 14:38:15 +0800486config_nsce = {"seed_params": {
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +0800487 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800488 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +0800489 "lib_model": [True, False],
490 "isolation_level": ["1", "2", "3"],
491 "test_regression": [True],
492 "test_psa_api": ["OFF"],
493 "cmake_build_type": ["Debug"],
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +0800494 "with_bl2": [True],
495 "with_ns": [True],
496 "profile": [""],
497 "partition_ps": ["ON"],
Xinyu Zhang67612992021-12-20 14:11:27 +0800498 "extra_params": ["NSCE"]
Xinyu Zhanga1088e22021-11-11 18:02:45 +0800499 },
500 "common_params": _common_tfm_builder_cfg,
501 "invalid": _common_tfm_invalid_configs + []
502 }
503
Xinyu Zhang050e39a2021-11-16 14:38:15 +0800504config_mmio = {"seed_params": {
Xinyu Zhanga1088e22021-11-11 18:02:45 +0800505 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800506 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhanga1088e22021-11-11 18:02:45 +0800507 "lib_model": [False],
508 "isolation_level": ["1"],
509 "test_regression": [True],
510 "test_psa_api": ["OFF"],
511 "cmake_build_type": ["Debug", "Release", "Minsizerel"],
Xinyu Zhanga1088e22021-11-11 18:02:45 +0800512 "with_bl2": [True],
513 "with_ns": [True],
514 "profile": [""],
515 "partition_ps": ["ON"],
Xinyu Zhang3bb01af2021-12-20 14:45:49 +0800516 "extra_params": ["MMIO"]
Xinyu Zhang9bfe8a92021-10-28 16:27:12 +0800517 },
518 "common_params": _common_tfm_builder_cfg,
519 "invalid": _common_tfm_invalid_configs + []
520 }
521
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800522# Config groups for code coverage
523config_cov_profile_s = deepcopy(config_profile_s)
524config_cov_profile_s["seed_params"]["compiler"] = ["GCC_7_3_1"]
Xinyu Zhangbdc37e32022-04-06 17:47:44 +0800525
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800526config_cov_profile_m = deepcopy(config_profile_m)
527config_cov_profile_m["seed_params"]["compiler"] = ["GCC_7_3_1"]
Karl Zhang14573bc2020-06-08 09:23:21 +0800528
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800529config_cov_profile_l = deepcopy(config_profile_l)
530config_cov_profile_l["seed_params"]["compiler"] = ["GCC_7_3_1"]
Karl Zhang14573bc2020-06-08 09:23:21 +0800531
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800532config_cov_nsce = deepcopy(config_nsce)
533config_cov_nsce["seed_params"]["compiler"] = ["GCC_7_3_1"]
Karl Zhang14573bc2020-06-08 09:23:21 +0800534
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800535config_cov_mmio = deepcopy(config_mmio)
536config_cov_mmio["seed_params"]["compiler"] = ["GCC_7_3_1"]
Karl Zhang14573bc2020-06-08 09:23:21 +0800537
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800538# Config groups for platforms
539config_an519 = {"seed_params": {
Xinyu Zhangf25856a2021-06-17 14:06:46 +0800540 "tfm_platform": ["arm/mps2/an519"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800541 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
Xinyu Zhang73ed2992021-09-15 11:38:23 +0800542 "lib_model": [True, False],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800543 "isolation_level": ["1", "2"],
544 "test_regression": [True, False],
545 "test_psa_api": ["OFF"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800546 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhangb708f572020-09-15 11:43:46 +0800547 "with_bl2": [True, False],
548 "with_ns": [True, False],
549 "profile": [""],
Xinyu Zhang9fd74242020-10-22 11:30:50 +0800550 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800551 "extra_params": [""]
Xinyu Zhangb708f572020-09-15 11:43:46 +0800552 },
553 "common_params": _common_tfm_builder_cfg,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800554 "invalid": _common_tfm_invalid_configs + []
555 }
556
557config_an521 = {"seed_params": {
558 "tfm_platform": ["arm/mps2/an521"],
559 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
560 "lib_model": [True, False],
561 "isolation_level": ["1", "2", "3"],
562 "test_regression": [True, False],
563 "test_psa_api": ["OFF"],
564 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800565 "with_bl2": [True, False],
566 "with_ns": [True, False],
567 "profile": [""],
568 "partition_ps": ["ON"],
569 "extra_params": [""]
570 },
571 "common_params": _common_tfm_builder_cfg,
572 "invalid": _common_tfm_invalid_configs + []
573 }
574
575config_an524 = {"seed_params": {
576 "tfm_platform": ["arm/mps3/an524"],
577 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
578 "lib_model": [True, False],
579 "isolation_level": ["1", "2"],
580 "test_regression": [True, False],
581 "test_psa_api": ["OFF"],
582 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800583 "with_bl2": [True, False],
584 "with_ns": [True, False],
585 "profile": [""],
586 "partition_ps": ["ON"],
587 "extra_params": [""]
588 },
589 "common_params": _common_tfm_builder_cfg,
590 "invalid": _common_tfm_invalid_configs + []
Xinyu Zhangb708f572020-09-15 11:43:46 +0800591 }
Dean Birch4c6ad622020-03-13 11:28:03 +0000592
Xinyu Zhang38b76742021-11-11 13:57:56 +0800593config_an547 = {"seed_params": {
594 "tfm_platform": ["arm/mps3/an547"],
Bence Balogh176b78f2022-02-22 13:49:34 +0100595 "compiler": ["GCC_10_3"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800596 "lib_model": [False],
597 "isolation_level": ["1"],
598 "test_regression": [False],
599 "test_psa_api": ["OFF"],
600 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800601 "with_bl2": [True],
602 "with_ns": [False],
603 "profile": [""],
604 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800605 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800606 },
607 "common_params": _common_tfm_builder_cfg,
608 "invalid": _common_tfm_invalid_configs + []
609 }
610
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800611config_an552 = {"seed_params": {
612 "tfm_platform": ["arm/mps3/an552"],
613 "compiler": ["GCC_10_3"],
614 "lib_model": [True, False],
615 "isolation_level": ["1", "2"],
616 "test_regression": [True, False],
617 "test_psa_api": ["OFF"],
618 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800619 "with_bl2": [True],
620 "with_ns": [True],
621 "profile": [""],
622 "partition_ps": ["ON"],
623 "extra_params": [""]
624 },
625 "common_params": _common_tfm_builder_cfg,
626 "invalid": _common_tfm_invalid_configs + []
627 }
628
629config_musca_b1 = {"seed_params": {
630 "tfm_platform": ["arm/musca_b1/sse_200"],
631 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
632 "lib_model": [True, False],
633 "isolation_level": ["1", "2", "3"],
634 "test_regression": [True, False],
635 "test_psa_api": ["OFF"],
636 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800637 "with_bl2": [True],
638 "with_ns": [True, False],
639 "profile": [""],
640 "partition_ps": ["ON"],
641 "extra_params": [""]
642 },
643 "common_params": _common_tfm_builder_cfg,
644 "invalid": _common_tfm_invalid_configs + []
645 }
646
647config_musca_b1_se = {"seed_params": {
648 "tfm_platform": ["arm/musca_b1/secure_enclave"],
649 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
650 "lib_model": [False],
651 "isolation_level": ["1"],
652 "test_regression": [False],
653 "test_psa_api": ["OFF"],
654 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800655 "with_bl2": [True],
656 "with_ns": [False],
657 "profile": [""],
658 "partition_ps": ["ON"],
659 "extra_params": [""]
660 },
661 "common_params": _common_tfm_builder_cfg,
662 "invalid": _common_tfm_invalid_configs + []
663 }
664
665config_musca_s1 = {"seed_params": {
666 "tfm_platform": ["arm/musca_s1"],
667 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
668 "lib_model": [True, False],
669 "isolation_level": ["1", "2"],
670 "test_regression": [True, False],
671 "test_psa_api": ["OFF"],
672 "cmake_build_type": ["Debug", "Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800673 "with_bl2": [True],
674 "with_ns": [True, False],
675 "profile": [""],
676 "partition_ps": ["ON"],
677 "extra_params": [""]
678 },
679 "common_params": _common_tfm_builder_cfg,
680 "invalid": _common_tfm_invalid_configs + []
681 }
682
Xinyu Zhang38b76742021-11-11 13:57:56 +0800683config_corstone_polaris = {"seed_params": {
684 "tfm_platform": ["arm/mps3/corstone_polaris"],
Bence Balogh176b78f2022-02-22 13:49:34 +0100685 "compiler": ["GCC_10_3"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800686 "lib_model": [False],
687 "isolation_level": ["1"],
688 "test_regression": [False],
689 "test_psa_api": ["OFF"],
690 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800691 "with_bl2": [True],
692 "with_ns": [False],
693 "profile": [""],
694 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800695 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800696 },
697 "common_params": _common_tfm_builder_cfg,
698 "invalid": _common_tfm_invalid_configs + []
699 }
700
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800701config_psoc64 = {"seed_params": {
702 "tfm_platform": ["cypress/psoc64"],
703 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
704 "lib_model": [False],
705 "isolation_level": ["1", "2"],
706 "test_regression": [True],
707 "test_psa_api": ["OFF"],
708 "cmake_build_type": ["Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800709 "with_bl2": [False],
710 "with_ns": [True],
711 "profile": [""],
712 "partition_ps": ["ON"],
713 "extra_params": [""]
714 },
715 "common_params": _common_tfm_builder_cfg,
716 "invalid": _common_tfm_invalid_configs + []
717 }
718
719config_corstone1000 = {"seed_params": {
720 "tfm_platform": ["arm/corstone1000"],
721 "compiler": ["GCC_7_3_1"],
722 "lib_model": [False],
723 "isolation_level": ["1"],
724 "test_regression": [False],
725 "test_psa_api": ["OFF"],
726 "cmake_build_type": ["Debug"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800727 "with_bl2": [True],
728 "with_ns": [False],
729 "profile": [""],
730 "partition_ps": ["ON"],
731 "extra_params": ["FVP", "FPGA"]
732 },
733 "common_params": _common_tfm_builder_cfg,
734 "invalid": _common_tfm_invalid_configs + []
735 }
736
737config_stm32l562e_dk = {"seed_params": {
738 "tfm_platform": ["stm/stm32l562e_dk"],
739 "compiler": ["GCC_7_3_1", "ARMCLANG_6_13"],
740 "lib_model": [True, False],
741 "isolation_level": ["1", "2", "3"],
742 "test_regression": [True, False],
743 "test_psa_api": ["OFF"],
744 "cmake_build_type": ["Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800745 "with_bl2": [True],
746 "with_ns": [True],
747 "profile": [""],
748 "partition_ps": ["ON"],
749 "extra_params": ["CRYPTO_OFF", "CRYPTO_ON"]
750 },
751 "common_params": _common_tfm_builder_cfg,
752 "invalid": _common_tfm_invalid_configs + [
753 # Oversize issue on config stm32l562e_dk_ARMCLANG_LIB_1_REG_Release_BL2_NS
754 ("stm/stm32l562e_dk", "ARMCLANG_6_13", True, "1", True,
Xinyu Zhang589fd052022-04-19 17:54:16 +0800755 "OFF", "Release", True, True, "", "ON", "*"),
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800756 # all other tests are off when CRYPTO is ON
Xinyu Zhang589fd052022-04-19 17:54:16 +0800757 ("stm/stm32l562e_dk", "*", "*", "*", True, "*", "*",
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800758 "*", "*", "*", "*", "CRYPTO_ON"),
759 # all other tests are ON when CRYPTO is OFF
Xinyu Zhang589fd052022-04-19 17:54:16 +0800760 ("stm/stm32l562e_dk", "*", "*", "*", False, "*", "*",
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800761 "*", "*", "*", "*", "CRYPTO_OFF"),
762 ]
763 }
764
765config_b_u585i_iot02a = {"seed_params": {
766 "tfm_platform": ["stm/b_u585i_iot02a"],
767 "compiler": ["GCC_7_3_1"],
768 "lib_model": [False],
769 "isolation_level": ["1"],
770 "test_regression": [False],
771 "test_psa_api": ["OFF"],
772 "cmake_build_type": ["Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800773 "with_bl2": [True],
774 "with_ns": [False],
775 "profile": [""],
776 "partition_ps": ["ON"],
777 "extra_params": [""]
778 },
779 "common_params": _common_tfm_builder_cfg,
780 "invalid": _common_tfm_invalid_configs + []
781 }
782
783config_nucleo_l552ze_q = {"seed_params": {
784 "tfm_platform": ["stm/nucleo_l552ze_q"],
785 "compiler": ["GCC_7_3_1"],
786 "lib_model": [False],
787 "isolation_level": ["1"],
788 "test_regression": [False],
789 "test_psa_api": ["OFF"],
790 "cmake_build_type": ["Release"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800791 "with_bl2": [True],
792 "with_ns": [False],
793 "profile": [""],
794 "partition_ps": ["ON"],
795 "extra_params": [""]
796 },
797 "common_params": _common_tfm_builder_cfg,
798 "invalid": _common_tfm_invalid_configs + []
799 }
800
801config_lpcxpresso55s69 = {"seed_params": {
802 "tfm_platform": ["nxp/lpcxpresso55s69"],
803 "compiler": ["GCC_7_3_1"],
804 "lib_model": [False],
805 "isolation_level": ["2"],
806 "test_regression": [True, False],
807 "test_psa_api": ["OFF"],
808 "cmake_build_type": ["Relwithdebinfo"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800809 "with_bl2": [False],
810 "with_ns": [True],
811 "profile": ["profile_medium"],
812 "partition_ps": ["ON"],
813 "extra_params": [""]
814 },
815 "common_params": _common_tfm_builder_cfg,
816 "invalid": _common_tfm_invalid_configs + []
817 }
818
Xinyu Zhang38b76742021-11-11 13:57:56 +0800819config_bl5340 = {"seed_params": {
820 "tfm_platform": ["lairdconnectivity/bl5340_dvk_cpuapp"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800821 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800822 "lib_model": [False],
823 "isolation_level": ["1"],
824 "test_regression": [False],
825 "test_psa_api": ["OFF"],
826 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800827 "with_bl2": [True],
828 "with_ns": [False],
829 "profile": [""],
830 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800831 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800832 },
833 "common_params": _common_tfm_builder_cfg,
834 "invalid": _common_tfm_invalid_configs + []
835 }
836
837config_nrf5340dk = {"seed_params": {
838 "tfm_platform": ["nordic_nrf/nrf5340dk_nrf5340_cpuapp"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800839 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800840 "lib_model": [False],
841 "isolation_level": ["1"],
842 "test_regression": [False],
843 "test_psa_api": ["OFF"],
844 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800845 "with_bl2": [True],
846 "with_ns": [False],
847 "profile": [""],
848 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800849 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800850 },
851 "common_params": _common_tfm_builder_cfg,
852 "invalid": _common_tfm_invalid_configs + []
853 }
854
855config_nrf9160dk = {"seed_params": {
856 "tfm_platform": ["nordic_nrf/nrf9160dk_nrf9160"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800857 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800858 "lib_model": [False],
859 "isolation_level": ["1"],
860 "test_regression": [False],
861 "test_psa_api": ["OFF"],
862 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800863 "with_bl2": [True],
864 "with_ns": [False],
865 "profile": [""],
866 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800867 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800868 },
869 "common_params": _common_tfm_builder_cfg,
870 "invalid": _common_tfm_invalid_configs + []
871 }
872
873config_m2351 = {"seed_params": {
874 "tfm_platform": ["nuvoton/m2351"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800875 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800876 "lib_model": [False],
877 "isolation_level": ["1"],
878 "test_regression": [False],
879 "test_psa_api": ["OFF"],
880 "cmake_build_type": ["Release"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800881 "with_bl2": [True],
882 "with_ns": [False],
883 "profile": [""],
884 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800885 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800886 },
887 "common_params": _common_tfm_builder_cfg,
888 "invalid": _common_tfm_invalid_configs + []
889 }
890
891config_m2354 = {"seed_params": {
892 "tfm_platform": ["nuvoton/m2354"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800893 "compiler": ["GCC_7_3_1"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800894 "lib_model": [False],
895 "isolation_level": ["1"],
896 "test_regression": [False],
897 "test_psa_api": ["OFF"],
898 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800899 "with_bl2": [True],
900 "with_ns": [False],
901 "profile": [""],
902 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800903 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800904 },
905 "common_params": _common_tfm_builder_cfg,
906 "invalid": _common_tfm_invalid_configs + []
907 }
908
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800909# Config groups for debug
910config_debug = {"seed_params": {
911 "tfm_platform": ["arm/mps2/an521"],
Xinyu Zhang433771e2022-04-01 16:49:17 +0800912 "compiler": ["GCC_7_3_1"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800913 "lib_model": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800914 "isolation_level": ["1"],
915 "test_regression": [False],
916 "test_psa_api": ["OFF"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800917 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800918 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800919 "with_ns": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800920 "profile": [""],
921 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800922 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800923 },
924 "common_params": _common_tfm_builder_cfg,
925 "invalid": _common_tfm_invalid_configs + []
926 }
927
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800928config_debug_regr = deepcopy(config_debug)
929config_debug_regr["seed_params"]["test_regression"] = [True]
930
931config_debug_PSA_API = {"seed_params": {
932 "tfm_platform": ["arm/mps2/an521"],
933 "compiler": ["ARMCLANG_6_13"],
934 "lib_model": [True],
935 "isolation_level": ["1"],
936 "test_regression": [False],
937 "test_psa_api": ["CRYPTO",
938 "INITIAL_ATTESTATION",
939 "STORAGE",
940 "IPC"],
941 "cmake_build_type": ["Debug"],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800942 "with_bl2": [True],
943 "with_ns": [True],
944 "profile": [""],
945 "partition_ps": ["ON"],
946 "extra_params": [""]
947 },
948 "common_params": _common_tfm_builder_cfg,
949 "invalid": _common_tfm_invalid_configs + []
950 }
951
952config_debug_PSA_API_nolib = {"seed_params": {
953 "tfm_platform": ["arm/mps2/an521"],
954 "compiler": ["ARMCLANG_6_13"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800955 "lib_model": [False],
956 "isolation_level": ["1"],
957 "test_regression": [False],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800958 "test_psa_api": ["CRYPTO",
959 "INITIAL_ATTESTATION",
960 "STORAGE",
961 "IPC"],
962 "cmake_build_type": ["Debug"],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800963 "with_bl2": [True],
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800964 "with_ns": [True],
Xinyu Zhang38b76742021-11-11 13:57:56 +0800965 "profile": [""],
966 "partition_ps": ["ON"],
Xinyu Zhangfd2e1152021-12-17 18:09:01 +0800967 "extra_params": [""]
Xinyu Zhang38b76742021-11-11 13:57:56 +0800968 },
969 "common_params": _common_tfm_builder_cfg,
970 "invalid": _common_tfm_invalid_configs + []
971 }
972
Karl Zhangaff558a2020-05-15 14:28:23 +0100973_builtin_configs = {
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800974 # per-patch test groups
975 "pp_test": config_pp_test,
976 "pp_corstone1000": config_corstone1000,
Karl Zhang14573bc2020-06-08 09:23:21 +0800977
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800978 # nightly test groups
979 "nightly_test": config_nightly_test,
980 "nightly_profile_s": config_profile_s,
981 "nightly_profile_m": config_profile_m,
982 "nightly_profile_l": config_profile_l,
983 "nightly_cc_driver_psa": config_cc_driver_psa,
984 "nightly_fp":config_fp,
985 "nightly_psa_api": config_psa_api,
Xinyu Zhang050e39a2021-11-16 14:38:15 +0800986 "nightly_nsce": config_nsce,
987 "nightly_mmio": config_mmio,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800988 "nightly_an547": config_an547,
989 "nightly_an552": config_an552,
990 "nightly_musca_b1_se": config_musca_b1_se,
991 "nightly_polaris": config_corstone_polaris,
992 "nightly_corstone1000": config_corstone1000,
993 "nightly_psoc64": config_psoc64,
994 "nightly_stm32l562e_dk": config_stm32l562e_dk,
995 "nightly_lpcxpresso55s69": config_lpcxpresso55s69,
Karl Zhang14573bc2020-06-08 09:23:21 +0800996
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +0800997 # release test groups
998 "release_test": config_release_test,
999 "release_profile_s": config_profile_s,
1000 "release_profile_m": config_profile_m,
1001 "release_profile_l": config_profile_l,
1002 "release_cc_driver_psa": config_cc_driver_psa,
1003 "release_fp": config_fp,
1004 "release_psa_api": config_psa_api,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001005 "release_nsce": config_nsce,
1006 "release_mmio": config_mmio,
1007 "release_an547": config_an547,
1008 "release_an552": config_an552,
1009 "release_polaris": config_corstone_polaris,
1010 "release_psoc64": config_psoc64,
1011 "release_stm32l562e_dk": config_stm32l562e_dk,
1012 "release_lpcxpresso55s69": config_lpcxpresso55s69,
Karl Zhang14573bc2020-06-08 09:23:21 +08001013
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001014 # code coverage test groups
1015 "coverage_profile_s": config_cov_profile_s,
1016 "coverage_profile_m": config_cov_profile_m,
1017 "coverage_profile_l": config_cov_profile_l,
1018 "coverage_nsce": config_cov_nsce,
1019 "coverage_mmio": config_cov_mmio,
1020 "coverage_fp": config_fp,
Xinyu Zhangf25856a2021-06-17 14:06:46 +08001021
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001022 # platform groups
1023 "an521": config_an521,
1024 "an519": config_an519,
1025 "an524": config_an524,
1026 "an547": config_an547,
1027 "an552": config_an552,
1028 "musca_b1": config_musca_b1,
1029 "musca_b1_se": config_musca_b1_se,
1030 "musca_s1": config_musca_s1,
1031 "corstone_polaris": config_corstone_polaris,
1032 "cypress_psoc64": config_psoc64,
1033 "corstone1000": config_corstone1000,
1034 "stm_stm32l562e_dk": config_stm32l562e_dk,
1035 "stm_b_u585i_iot02a": config_b_u585i_iot02a,
1036 "stm_nucleo_l552ze_q": config_nucleo_l552ze_q,
1037 "nxp_lpcxpresso55s69": config_lpcxpresso55s69,
Xinyu Zhang38b76742021-11-11 13:57:56 +08001038 "laird_bl5340": config_bl5340,
1039 "nordic_nrf5340dk": config_nrf5340dk,
1040 "nordic_nrf9160dk": config_nrf9160dk,
1041 "nuvoton_m2351": config_m2351,
1042 "nuvoton_m2354": config_m2354,
Xinyu Zhang38b76742021-11-11 13:57:56 +08001043
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001044 # config groups for debug
Dean Birch4c6ad622020-03-13 11:28:03 +00001045 "debug": config_debug,
Paul Sokolovsky6c3c6562022-04-04 23:23:02 +03001046 "debug_regr": config_debug_regr,
Paul Sokolovsky1ec752b2022-01-22 19:50:58 +03001047 "debug_PSA_API": config_debug_PSA_API,
Paul Sokolovsky49a99282022-02-02 23:43:37 +03001048 "debug_PSA_API_nolib": config_debug_PSA_API_nolib,
Xinyu Zhang0aebb3d2022-04-11 18:27:12 +08001049 }
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001050
1051if __name__ == '__main__':
1052 import os
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001053
Minos Galanakisea421232019-06-20 17:11:28 +01001054 # Default behavior is to export refference config when called
1055 _dir = os.getcwd()
1056 from utils import save_json
1057 for _cname, _cfg in _builtin_configs.items():
1058 _fname = os.path.join(_dir, _cname + ".json")
1059 print("Exporting config %s" % _fname)
1060 save_json(_fname, _cfg)