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