1------- 2STM32U5 3------- 4 5TF-M is supported on STM32U5 family 6 7https://www.st.com/en/microcontrollers-microprocessors/stm32u5-series.html 8 9 10Directory content 11^^^^^^^^^^^^^^^^^ 12 13- stm/common/stm32u5xx/stm32u5xx_hal: 14 Content from https://github.com/STMicroelectronics/stm32u5xx_hal_driver.git 15 16- stm/common/stm32u5xx/Device: 17 Content from https://github.com/STMicroelectronics/cmsis_device_u5.git 18 19- stm/common/stm32u5xx/bl2: 20 stm32l5xx bl2 code specific from https://github.com/STMicroelectronics/STM32CubeU5.git (Projects/B-U585I-IOT02A/Applications/TFM) 21 22- stm/common/stm32u5xx/secure: 23 stm32l5xx Secure porting adaptation from https://github.com/STMicroelectronics/STM32CubeU5.git (Projects/B-U585I-IOT02A/Applications/TFM) 24 25- stm/common/stm32u5xx/boards: 26 Adaptation for stm32 board using stm32l5xx soc from https://github.com/STMicroelectronics/STM32CubeU5.git (Projects/B-U585I-IOT02A/Applications/TFM) 27 28 29Specific Software Requirements 30^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 31 32STM32_Programmer_CLI is required.(see https://www.st.com/en/development-tools/stm32cubeprog.html) 33 34 35 36B_U585I_IOT02A 37^^^^^^^^^^^^^^^ 38 39Discovery kit for IoT node with STM32U5 series 40https://www.st.com/en/evaluation-tools/B-U585I-IOT02A.html 41 42Configuration and Build 43""""""""""""""""""""""" 44 45GNUARM/ARMCLANG/IARARM compilation is available for this target. 46and build the selected configuration as follow. 47 48The build configuration for TF-M is provided to the build system using command 49line arguments. Required arguments are noted below. 50 51The following instructions build multi-core TF-M with regression test suites 52in Isolation Level 1. 53 54In common STM (``platform\ext\target\stm\common\build_stm``) 55There are scripts that help users to build the TF-M project on all STM platforms 56 57.. code-block:: bash 58 59 60 cd <TF-M base folder> 61 cd <trusted-firmware-m folder> 62 63 git clone https://git.trustedfirmware.org/TF-M/tf-m-tests.git 64 git checkout <recommended tf-m-tests commit> (..\trusted-firmware-m\lib\ext\tf-m-tests\version.txt) 65 66 mkdir build_s && cd build_s 67 68 cmake -S /../tf-m-tests/tests_reg/spe -B . -GNinja -DTFM_PLATFORM=stm/b_u585i_iot02a 69 -DTFM_TOOLCHAIN_FILE= /../toolchain_ARMCLANG.cmake 70 -DCONFIG_TFM_SOURCE_PATH= /../trusted-firmware-m 71 -DTFM_PSA_API=ON -DTFM_ISOLATION_LEVEL=1 72 -DTEST_S=ON -DTEST_NS=ON 73 74 ninja -C . install -j 8 75 76 cd <trusted-firmware-m folder> 77 mkdir build_ns && cd build_ns 78 cmake -S /../trusted-firmware-m /../tf-m-tests/tests_reg -B . -GNinja 79 -DCONFIG_SPE_PATH= /../build_s/api_ns -DTFM_TOOLCHAIN_FILE= /../build_s/api_ns/cmake/toolchain_ns_ARMCLANG.cmake 80 81 ninja -C . -j 8 82 83The following instructions build multi-core TF-M with PSA API test suite for 84the attestation service in Isolation Level 1 on Linux. 85 86.. code-block:: bash 87 88 89 cd <TF-M base folder> 90 cd <trusted-firmware-m folder> 91 92 git clone https://git.trustedfirmware.org/TF-M/tf-m-tests.git 93 git checkout <recommended tf-m-tests commit> (..\trusted-firmware-m\lib\ext\tf-m-tests\version.txt) 94 95 mkdir build_s && cd build_s 96 97 cmake -S /../tf-m-tests/tests_psa_arch/spe -B . -GNinja -DTFM_PLATFORM=stm/b_u585i_iot02a 98 -DTFM_TOOLCHAIN_FILE= /../toolchain_ARMCLANG.cmake 99 -DCONFIG_TFM_SOURCE_PATH= /../trusted-firmware-m 100 -DTFM_PSA_API=ON -DTFM_ISOLATION_LEVEL=1 101 -DTEST_PSA_API=INITIAL_ATTESTATION 102 103 ninja -C . install -j 8 104 105 cd <trusted-firmware-m folder> 106 mkdir build_ns && cd build_ns 107 cmake -S /../trusted-firmware-m /../tf-m-tests/tests_psa_arch -B . -GNinja 108 -DCONFIG_SPE_PATH= /../build_s/api_ns -DTFM_TOOLCHAIN_FILE= /../build_s/api_ns/cmake/toolchain_ns_ARMCLANG.cmake 109 110 ninja -C . -j 8 111 112 113Write software on target 114^^^^^^^^^^^^^^^^^^^^^^^^ 115In secure build folder directory api_ns: 116 117 - ``postbuild.sh``: Updates regression.sh and TFM_UPDATE.sh scripts according to flash_layout.h 118 - ``regression.sh``: Sets platform option bytes config and erase platform 119 - ``TFM_UPDATE.sh``: Writes bl2, secure, and non secure image in target 120 121 122Connect board to USB and Execute the 3 scripts in following order to update platform: 123postbuild.sh, regression.sh, TFM_UPDATE.sh 124 125The virtual com port from STLINK is used for TFM log and serial port configuration should be: 126 127 - Baud rate = 115200 128 - Data = 8 bits 129 - Parity = none 130 - Stop = 1 bit 131 - Flow control = none 132 133------------- 134 135*Copyright (c) 2021, STMicroelectronics. All rights reserved.* 136*SPDX-License-Identifier: BSD-3-Clause* 137