blob: 984e2c689e6d03c0ee095a78b2e0491d3302c85c [file] [log] [blame]
Xinyu Zhang1fa7f982022-04-20 17:46:17 +08001#!/usr/bin/env python3
2
3""" build_helper_config_maps.py:
4 Set map info of config params for build helper """
5
6__copyright__ = """
7/*
8 * Copyright (c) 2022, Arm Limited. All rights reserved.
9 *
10 * SPDX-License-Identifier: BSD-3-Clause
11 *
12 */
13 """
14
15# Map platform names to short format
16mapPlatform = {
17 "arm/mps2/an519" : "AN519",
18 "arm/mps2/an521" : "AN521",
19 "arm/mps3/an524" : "AN524",
Xinyu Zhang1fa7f982022-04-20 17:46:17 +080020 "arm/mps3/an547" : "AN547",
21 "arm/mps3/an552" : "AN552",
Mark Horvathef57baa2022-09-12 13:36:36 +020022 "arm/musca_b1" : "MUSCA_B1",
Xinyu Zhang1fa7f982022-04-20 17:46:17 +080023 "arm/musca_s1" : "MUSCA_S1",
24 "arm/corstone1000" : "corstone1000",
Bence Balogh23d8fa72022-11-08 12:16:23 +010025 "arm/mps3/corstone310/fvp" : "corstone310",
Xinyu Zhang58ddc602022-10-25 11:26:35 +080026 "arm/rss/tc" : "RSS",
Xinyu Zhang1fa7f982022-04-20 17:46:17 +080027 "cypress/psoc64" : "psoc64",
28 "lairdconnectivity/bl5340_dvk_cpuapp": "BL5340",
29 "nordic_nrf/nrf5340dk_nrf5340_cpuapp": "nrf5340dk",
30 "nordic_nrf/nrf9160dk_nrf9160" : "nrf9160dk",
31 "nuvoton/m2351" : "M2351",
32 "nuvoton/m2354" : "M2354",
33 "nxp/lpcxpresso55s69" : "lpcxpresso55s69",
34 "stm/stm32l562e_dk" : "stm32l562e_dk",
35 "stm/b_u585i_iot02a" : "b_u585i_iot02a",
36 "stm/nucleo_l552ze_q" : "nucleo_l552ze_q",
37}
38
39# Map PSA Arch Tests to short format
40mapTestPsaApi = {
41 "IPC" : "FF",
42 "CRYPTO" : "CRYPTO",
43 "INITIAL_ATTESTATION": "ATTEST",
44 "STORAGE" : "STORAGE",
45}
46
47# Map Profile names to short format
48mapProfile = {
49 "profile_small" : "SMALL",
50 "profile_medium": "MEDIUM",
David Hu3d333762022-10-27 18:12:33 +080051 "profile_medium_arotless": "MEDIUM-AROT-LESS",
Xinyu Zhang1fa7f982022-04-20 17:46:17 +080052 "profile_large" : "LARGE",
53}
54
55# Map abbreviation of extra params to cmake build commands
56mapExtraParams = {
57 # Default
58 "" : "",
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +080059 "NSOFF" : "-DNS=OFF ",
Xinyu Zhang1fa7f982022-04-20 17:46:17 +080060 # NSCE
61 "NSCE" : "-DTFM_NS_MANAGE_NSID=ON ",
62 # MMIO
63 "MMIO" : "-DPSA_FRAMEWORK_HAS_MM_IOVEC=ON ",
64 # FPU support
Mark Horvath93cb5fb2022-09-06 17:51:24 +020065 "FPOFF" : "-DCONFIG_TFM_ENABLE_FP=OFF ",
66 "FPON" : ("-DCONFIG_TFM_ENABLE_FP=ON "
Xinyu Zhang1fa7f982022-04-20 17:46:17 +080067 "-DTEST_S_FPU=ON -DTEST_NS_FPU=ON "),
Xinyu Zhangfc061dd2022-07-26 14:52:56 +080068 "LZOFF" : "-DCONFIG_TFM_LAZY_STACKING=OFF ",
Xinyu Zhangdf88e302022-09-19 11:27:57 +080069 # Partiton
70 "PSOFF" : "-DTFM_PARTITION_PROTECTED_STORAGE=OFF ",
Xinyu Zhang88b965c2022-11-21 17:50:33 +080071 # IPC
72 "IPC" : "-DCONFIG_TFM_SPM_BACKEND=IPC ",
Xinyu Zhang1fa7f982022-04-20 17:46:17 +080073 # CC Driver
74 "CC_DRIVER_PSA": "-DCC312_LEGACY_DRIVER_API_ENABLED=OFF ",
75 # ST support
76 "CRYPTO_OFF" : ("-DTEST_S_CRYPTO=OFF "
77 "-DTEST_NS_CRYPTO=OFF "),
78 "CRYPTO_ON" : ("-DTEST_S_CRYPTO=ON "
79 "-DTEST_NS_CRYPTO=ON "),
80 # Corstone1000 support
81 "FVP" : "-DPLATFORM_IS_FVP=True ",
82 "FPGA" : "-DPLATFORM_IS_FVP=False ",
Xinyu Zhangfc061dd2022-07-26 14:52:56 +080083 "S_PS_OFF" : "-DTEST_S_PS=OFF ",
Xinyu Zhang1fa7f982022-04-20 17:46:17 +080084}