blob: b1297fba4f3c743cd298b09e20fca2499e41703e [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
Xinyu Zhangb18ae742023-04-25 14:33:27 +080039# Map regression test parameters to short format
40mapRegTest = {
41 "OFF" : "-DTEST_S=OFF -DTEST_NS=OFF ",
42 "RegS" : "-DTEST_S=ON ",
Xinyu Zhang05bb77d2023-04-25 15:15:19 +080043 "RegNS" : "-DTEST_NS=ON -DTEST_NS_FLIH_IRQ=OFF ",
Xinyu Zhangb18ae742023-04-25 14:33:27 +080044}
45
Xinyu Zhang1fa7f982022-04-20 17:46:17 +080046# Map PSA Arch Tests to short format
47mapTestPsaApi = {
48 "IPC" : "FF",
49 "CRYPTO" : "CRYPTO",
50 "INITIAL_ATTESTATION": "ATTEST",
51 "STORAGE" : "STORAGE",
52}
53
54# Map Profile names to short format
55mapProfile = {
56 "profile_small" : "SMALL",
57 "profile_medium": "MEDIUM",
David Hu3d333762022-10-27 18:12:33 +080058 "profile_medium_arotless": "MEDIUM-AROT-LESS",
Xinyu Zhang1fa7f982022-04-20 17:46:17 +080059 "profile_large" : "LARGE",
60}
61
62# Map abbreviation of extra params to cmake build commands
63mapExtraParams = {
64 # Default
65 "" : "",
Xinyu Zhangfb80b5d2022-07-26 15:42:26 +080066 "NSOFF" : "-DNS=OFF ",
Xinyu Zhang1fa7f982022-04-20 17:46:17 +080067 # NSCE
68 "NSCE" : "-DTFM_NS_MANAGE_NSID=ON ",
69 # MMIO
70 "MMIO" : "-DPSA_FRAMEWORK_HAS_MM_IOVEC=ON ",
71 # FPU support
Mark Horvath93cb5fb2022-09-06 17:51:24 +020072 "FPOFF" : "-DCONFIG_TFM_ENABLE_FP=OFF ",
73 "FPON" : ("-DCONFIG_TFM_ENABLE_FP=ON "
Xinyu Zhang1fa7f982022-04-20 17:46:17 +080074 "-DTEST_S_FPU=ON -DTEST_NS_FPU=ON "),
Xinyu Zhangfc061dd2022-07-26 14:52:56 +080075 "LZOFF" : "-DCONFIG_TFM_LAZY_STACKING=OFF ",
Xinyu Zhangdf88e302022-09-19 11:27:57 +080076 # Partiton
77 "PSOFF" : "-DTFM_PARTITION_PROTECTED_STORAGE=OFF ",
Xinyu Zhang88b965c2022-11-21 17:50:33 +080078 # IPC
79 "IPC" : "-DCONFIG_TFM_SPM_BACKEND=IPC ",
Xinyu Zhang1fa7f982022-04-20 17:46:17 +080080 # CC Driver
81 "CC_DRIVER_PSA": "-DCC312_LEGACY_DRIVER_API_ENABLED=OFF ",
82 # ST support
83 "CRYPTO_OFF" : ("-DTEST_S_CRYPTO=OFF "
84 "-DTEST_NS_CRYPTO=OFF "),
85 "CRYPTO_ON" : ("-DTEST_S_CRYPTO=ON "
86 "-DTEST_NS_CRYPTO=ON "),
87 # Corstone1000 support
88 "FVP" : "-DPLATFORM_IS_FVP=True ",
Xinyu Zhang4fb2b5c2023-04-25 11:55:19 +080089 "FPGA" : "-DPLATFORM_IS_FVP=False -DTEST_S_PS=OFF -DTEST_S_PLATFORM=OFF ",
Xinyu Zhangb18ae742023-04-25 14:33:27 +080090 "CS1K_TEST" : ("-DTEST_S_IPC=OFF "
Xinyu Zhang4fb2b5c2023-04-25 11:55:19 +080091 "-DEXTRA_S_TEST_SUITE_PATH=%(codebase_root_dir)s/platform/ext/target/arm/corstone1000/ci_regression_tests/ "),
Bence Balogh79fda442022-10-14 18:01:37 +020092
David Vinczed78e2622022-11-24 15:04:00 +010093 # Extra test cases
94 "TEST_CBOR" : "-DTEST_NS_QCBOR=ON ",
95
Bence Balogh79fda442022-10-14 18:01:37 +020096 # tf-m-extras example support
97 "EXAMPLE_VAD" : ("-DNS_EVALUATION_APP_PATH=%(codebase_root_dir)s/../tf-m-extras/examples/vad_an552/ns_side "
98 "-DTFM_EXTRA_PARTITION_PATHS=%(codebase_root_dir)s/../tf-m-extras/partitions/vad_an552_sp/ "
99 "-DTFM_EXTRA_MANIFEST_LIST_FILES=%(codebase_root_dir)s/../tf-m-extras/partitions/vad_an552_sp/extra_manifest_list.yaml "
Bence Balogh62197092022-11-23 18:42:39 +0100100 "-DPROJECT_CONFIG_HEADER_FILE=%(codebase_root_dir)s/../tf-m-extras/examples/vad_an552/ns_side/project_config.h "
Bence Balogh79fda442022-10-14 18:01:37 +0200101 "-DTFM_PARTITION_FIRMWARE_UPDATE=ON -DMCUBOOT_DATA_SHARING=ON "
102 "-DMCUBOOT_UPGRADE_STRATEGY=SWAP_USING_SCRATCH "
103 "-DMCUBOOT_IMAGE_NUMBER=1 -DMCUBOOT_SIGNATURE_KEY_LEN=2048 "
Bence Balogh62197092022-11-23 18:42:39 +0100104 "-DCONFIG_TFM_ENABLE_MVE=ON -DCONFIG_TFM_SPM_BACKEND=IPC "
105 "-DPLATFORM_HAS_FIRMWARE_UPDATE_SUPPORT=ON -DTFM_PARTITION_PLATFORM=ON "
106 "-DTFM_PARTITION_CRYPTO=ON -DTFM_PARTITION_INTERNAL_TRUSTED_STORAGE=ON "
107 "-DTFM_PARTITION_PROTECTED_STORAGE=ON -DMCUBOOT_CONFIRM_IMAGE=ON "
Bence Balogh79fda442022-10-14 18:01:37 +0200108 "-DFREERTOS_KERNEL_SRC_PATH=%(codebase_root_dir)s/../freertos-kernel"),
109 "EXAMPLE_DMA350_TRIGGER" : ("-DNS_EVALUATION_APP_PATH=%(codebase_root_dir)s/../tf-m-extras/examples/corstone310_fvp_dma/triggering_example "
110 "-DFREERTOS_KERNEL_SRC_PATH=%(codebase_root_dir)s/../freertos-kernel"),
111 "EXAMPLE_DMA350_NS" : ("-DDEFAULT_NS_SCATTER=OFF -DPLATFORM_SVC_HANDLERS=ON "
112 "-DNS_EVALUATION_APP_PATH=%(codebase_root_dir)s/../tf-m-extras/examples/corstone310_fvp_dma/dma350_ns "
113 "-DFREERTOS_KERNEL_SRC_PATH=%(codebase_root_dir)s/../freertos-kernel"),
Bence Balogh62197092022-11-23 18:42:39 +0100114 "EXAMPLE_DMA350_S" : "-DEXTRA_S_TEST_SUITE_PATH=%(codebase_root_dir)s/../tf-m-extras/examples/corstone310_fvp_dma/dma350_s"
Bence Balogh79fda442022-10-14 18:01:37 +0200115
Xinyu Zhang1fa7f982022-04-20 17:46:17 +0800116}