1-------- 2STM32WBA 3-------- 4 5TF-M is supported on STM32WBA series 6 7https://www.st.com/en/microcontrollers-microprocessors/stm32wba-series.html 8 9Directory content 10^^^^^^^^^^^^^^^^^ 11 12- stm/common/stm32wbaxx/stm32wbaxx_hal: 13 Content from https://github.com/STMicroelectronics/stm32wbaxx_hal_driver (HAL version - Tags V1.6.0 ) 14 15- stm/common/stm32wbaxx/Device: 16 Content from https://github.com/STMicroelectronics/cmsis_device_wba 17 18- stm/common/stm32wbaxx/secure: 19 stm32wbaxx Secure porting adaptation from https://github.com/STMicroelectronics/STM32CubeWBA.git 20 21- stm/common/stm32wbaxx/boards: 22 Adaptation and tools specific to stm32 board using stm32wbaxx device from https://github.com/STMicroelectronics/STM32CubeWBA.git 23 24- stm/common/stm32wbaxx/CMSIS_Driver: 25 Flash and uart driver for stm32wbaxx platform 26 27- stm/common/stm32wbaxx/Native_Driver: 28 Random generator and tickless implementation 29 30Specific Software Requirements 31^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 32 33STM32CubeProgrammer is required.(see https://www.st.com/en/development-tools/stm32cubeprog.html) 34 35 36Limitations to Consider When Using the Platform 37^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 38 39TF-M Supported without BL1/BL2. 40 41By default, TFM_OTP_DEFAULT_PROVISIONING and DEFAULT_SHARED_DATA switches are enabled in TF-M, 42to use dummy data in OTP and SRAM shared_data areas as BL2 not supported. 43 44 45STM32WBA65_DK 46^^^^^^^^^^^^^^^ 47 48Discovery kit for IoT node with STM32WBA series 49https://www.st.com/en/evaluation-tools/stm32wba65i-dk1.html 50 51Configuration and Build 52""""""""""""""""""""""" 53 54GNUARM/ARMCLANG/IARARM compilation is available for this target. 55and build the selected configuration as follow. 56 57The build configuration for TF-M is provided to the build system using command 58line arguments. Required arguments are noted below. 59 60The following instructions build multi-core TF-M with regression test suites 61in Isolation Level 1. 62 63.. code-block:: bash 64 65 66 cd <TF-M base folder> 67 cd <trusted-firmware-m folder> 68 69 git clone https://git.trustedfirmware.org/TF-M/tf-m-tests.git 70 git checkout <recommended tf-m-tests commit> 71 72 mkdir build_s && cd build_s 73 74 cmake -S /../tf-m-tests/tests_reg/spe -B . -GNinja -DTFM_PLATFORM=stm/stm32wba65i-dk 75 -DTFM_TOOLCHAIN_FILE= /../toolchain_ARMCLANG.cmake 76 -DCONFIG_TFM_SOURCE_PATH= /../trusted-firmware-m 77 -DTFM_PSA_API=ON -DTFM_ISOLATION_LEVEL=1 78 -DTEST_S=ON -DTEST_NS=ON 79 80 cmake --build -C . install -j 8 81 82 cd <trusted-firmware-m folder> 83 mkdir build_ns && cd build_ns 84 cmake -S /../trusted-firmware-m /../tf-m-tests/tests_reg -B . -GNinja 85 -DCONFIG_SPE_PATH= /../build_s/api_ns -DTFM_TOOLCHAIN_FILE= /../build_s/api_ns/cmake/toolchain_ns_ARMCLANG.cmake 86 87 cmake --build -C . -j 8 88 89The following instructions build multi-core TF-M with PSA API test suite for 90the attestation service in Isolation Level 1 on Linux. 91 92.. code-block:: bash 93 94 95 cd <TF-M base folder> 96 cd <trusted-firmware-m folder> 97 98 git clone https://git.trustedfirmware.org/TF-M/tf-m-tests.git 99 git checkout <recommended tf-m-tests commit> 100 101 mkdir build_s && cd build_s 102 103 cmake -S /../tf-m-tests/tests_psa_arch/spe -B . -GNinja -DTFM_PLATFORM=stm/stm32wba65i-dk 104 -DTFM_TOOLCHAIN_FILE= /../toolchain_ARMCLANG.cmake 105 -DCONFIG_TFM_SOURCE_PATH= /../trusted-firmware-m 106 -DTFM_PSA_API=ON -DTFM_ISOLATION_LEVEL=1 107 -DTEST_PSA_API=INITIAL_ATTESTATION 108 109 cmake --build -C . install -j 8 110 111 cd <trusted-firmware-m folder> 112 mkdir build_ns && cd build_ns 113 cmake -S /../trusted-firmware-m /../tf-m-tests/tests_psa_arch -B . -GNinja 114 -DCONFIG_SPE_PATH= /../build_s/api_ns -DTFM_TOOLCHAIN_FILE= /../build_s/api_ns/cmake/toolchain_ns_ARMCLANG.cmake 115 116 cmake --build -C . -j 8 117 118 119Write software on target 120^^^^^^^^^^^^^^^^^^^^^^^^ 121In build folder (api_ns): 122 123 - ``postbuild.sh``: Updates regression.sh and TFM_UPDATE.sh scripts according to flash_layout.h 124 - ``regression.sh``: Erases flash and configures option bytes on target 125 - ``TFM_UPDATE.sh``: Programs TFM secure and non-secure appli, and provisions target 126 127Connects board to ST-Link USB, then executes the 3 scripts in following order, to program the target: 128postbuild.sh, regression.sh, TFM_UPDATE.sh 129 130The virtual com port from STLINK is used for TFM Applications log and serial port configuration should be: 131 132 - Baud rate = 115200 133 - Data = 8 bits 134 - Parity = none 135 - Stop = 1 bit 136 - Flow control = none 137 138In case of target power-off, the TFM_UPDATE.sh script must be run to program bl2_shared_data RAM area again. 139 140------------- 141 142*Copyright (c) 2021, Arm Limited. All rights reserved.* 143*Copyright (c) 2019, STMicroelectronics. All rights reserved.* 144*SPDX-License-Identifier: BSD-3-Clause* 145