Xinyu Zhang | 1fa7f98 | 2022-04-20 17:46:17 +0800 | [diff] [blame^] | 1 | #!/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 |
| 16 | mapPlatform = { |
| 17 | "arm/mps2/an519" : "AN519", |
| 18 | "arm/mps2/an521" : "AN521", |
| 19 | "arm/mps3/an524" : "AN524", |
| 20 | "arm/mps2/an539" : "AN539", |
| 21 | "arm/mps3/an547" : "AN547", |
| 22 | "arm/mps3/an552" : "AN552", |
| 23 | "arm/mps2/sse-200_aws" : "SSE-200_AWS", |
| 24 | "arm/musca_b1/sse_200" : "MUSCA_B1", |
| 25 | "arm/musca_b1/secure_enclave" : "MUSCA_B1_SE", |
| 26 | "arm/musca_s1" : "MUSCA_S1", |
| 27 | "arm/corstone1000" : "corstone1000", |
| 28 | "arm/mps3/corstone310_fvp" : "corstone310", |
| 29 | "cypress/psoc64" : "psoc64", |
| 30 | "lairdconnectivity/bl5340_dvk_cpuapp": "BL5340", |
| 31 | "nordic_nrf/nrf5340dk_nrf5340_cpuapp": "nrf5340dk", |
| 32 | "nordic_nrf/nrf9160dk_nrf9160" : "nrf9160dk", |
| 33 | "nuvoton/m2351" : "M2351", |
| 34 | "nuvoton/m2354" : "M2354", |
| 35 | "nxp/lpcxpresso55s69" : "lpcxpresso55s69", |
| 36 | "stm/stm32l562e_dk" : "stm32l562e_dk", |
| 37 | "stm/b_u585i_iot02a" : "b_u585i_iot02a", |
| 38 | "stm/nucleo_l552ze_q" : "nucleo_l552ze_q", |
| 39 | } |
| 40 | |
| 41 | # Map PSA Arch Tests to short format |
| 42 | mapTestPsaApi = { |
| 43 | "IPC" : "FF", |
| 44 | "CRYPTO" : "CRYPTO", |
| 45 | "INITIAL_ATTESTATION": "ATTEST", |
| 46 | "STORAGE" : "STORAGE", |
| 47 | } |
| 48 | |
| 49 | # Map Profile names to short format |
| 50 | mapProfile = { |
| 51 | "profile_small" : "SMALL", |
| 52 | "profile_medium": "MEDIUM", |
| 53 | "profile_large" : "LARGE", |
| 54 | } |
| 55 | |
| 56 | # Map abbreviation of extra params to cmake build commands |
| 57 | mapExtraParams = { |
| 58 | # Default |
| 59 | "" : "", |
| 60 | # NSCE |
| 61 | "NSCE" : "-DTFM_NS_MANAGE_NSID=ON ", |
| 62 | # MMIO |
| 63 | "MMIO" : "-DPSA_FRAMEWORK_HAS_MM_IOVEC=ON ", |
| 64 | # FPU support |
| 65 | "FPSOFT" : "-DCONFIG_TFM_FP=soft ", |
| 66 | "FPHARD" : ("-DCONFIG_TFM_FP=hard " |
| 67 | "-DTEST_S_FPU=ON -DTEST_NS_FPU=ON "), |
| 68 | "FPHARD_LOFF" : ("-DCONFIG_TFM_FP=hard " |
| 69 | "-DCONFIG_TFM_LAZY_STACKING=OFF " |
| 70 | "-DTEST_S_FPU=ON -DTEST_NS_FPU=ON "), |
| 71 | # SFN |
| 72 | "SFN" : "-DCONFIG_TFM_SPM_BACKEND=SFN ", |
| 73 | # 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 ", |
| 83 | } |