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