Skip to content

Add stm32wba65i_dk1 board and TF-M support on stm32wba65i_dk and nucleo_wba65ri #90162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

etienne-lms
Copy link
Collaborator

Add support for board stm32wba65i_dk1. This board is quite similar to nucleo_wba65ri.
Add support of TF-M on both stm32wba65i_dk1 and nucleo_wba65ri boards.

@github-actions github-actions bot added platform: STM32 ST Micro STM32 area: ADC Analog-to-Digital Converter (ADC) area: TF-M ARM Trusted Firmware-M (TF-M) labels May 19, 2025
Copy link

github-actions bot commented May 19, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
trusted-firmware-m zephyrproject-rtos/trusted-firmware-m@6473899 zephyrproject-rtos/trusted-firmware-m#133 zephyrproject-rtos/trusted-firmware-m#133/files

DNM label due to: 1 project with PR revision

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@github-actions github-actions bot added manifest manifest-trusted-firmware-m DNM (manifest) This PR should not be merged (controlled by action-manifest) labels May 19, 2025
Zephyr board options
====================

Nucleo WBA65RI board integrates an SoC with Cortex-M33 architecture. Zephyr
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Nucleo WBA65RI board integrates an SoC with Cortex-M33 architecture. Zephyr
Nucleo WBA65RI board integrates a SoC with a Cortex-M33 core. Zephyr

$ west build -b nucleo_wba65ri/stm32wba65xx/ns samples/tfm_integration/tfm_ipc/
Once done, before flashing, you need to first run a generated script that
will set platform option bytes config and erase platform (among others,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
will set platform option bytes config and erase platform (among others,
will set platform Option Bytes config and erase internal Flash (among others,

$ west flash
Please note that, after having programmed the board for a TrustZone enabled system
(e.g. with ``./build/tfm/api_ns/regression.sh``), the SoC TZEN option byte is enabled
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(e.g. with ``./build/tfm/api_ns/regression.sh``), the SoC TZEN option byte is enabled
(e.g. with ``./build/tfm/api_ns/regression.sh``), the SoC TZEN Option Byte is enabled

to be applied everywhere.

and you will need to operate specific sequence to disable this TZEN Option Byte
configuration to get your board back in normal state for booting with a TrustZone
disabled system (e.g. without TF-M support).
You can still use STM32CubeProgrammer_ to disable the SoC TZEN Option Byte config.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You can still use STM32CubeProgrammer_ to disable the SoC TZEN Option Byte config.
You can use STM32CubeProgrammer_ to disable the SoC TZEN Option Byte config.

@@ -0,0 +1,19 @@
identifier: nucleo_wba65ri/stm32wba65xx/ns
name: ST STM32WBA65I Discovery kit with TF-M and non-secure
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non-secure firmware?

# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2025 STMicroelectronics

# enable uart driver
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# enable uart driver
# Enable UART driver

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please convert to webp

Overview
********

STM32WBA65I-DK1 is a Bluetooth® Low Energy, 802.15.4 and Zigbee® wireless
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
STM32WBA65I-DK1 is a Bluetooth® Low Energy, 802.15.4 and Zigbee® wireless
STM32WBA65I-DK1 is a Bluetooth |reg| Low Energy, 802.15.4 and Zigbee |reg| wireless

to be applied everywhere

- TBD µA Standby mode with 64 KB SRAM
- TBD µA Stop 2 mode with 64 KB SRAM
- TBD µA/MHz Run mode at 3.3 V
- Radio: Rx TBD mA / Tx at 0 dBm TBD mA
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBD info should be removed.

Zephyr board options
====================

STM32WBA65I-DK1 board integrates an SoC with Cortex-M33 architecture. Zephyr
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
STM32WBA65I-DK1 board integrates an SoC with Cortex-M33 architecture. Zephyr
STM32WBA65I-DK1 board integrates a SoC with a Cortex-M33 core. Zephyr

@etienne-lms
Copy link
Collaborator Author

Thanks @JarmouniA for the review comments. I've addressed them (I hope in the right way).
I've added a DTS overlay for stm32wba65i-dk1 in the ADC API test to address a test build failure reported by CI tests.

Add stm32wba65i-dk1 board support with UART console, LEDs, joystick keys
using ADC channel 6.

Signed-off-by: Etienne Carriere <[email protected]>
Add stl32wba65i_dk1 support for ADC tests.

Signed-off-by: Etienne Carriere <[email protected]>
Declare stm32wba65i-dk1 and nucleo_wba65ri boards support in TF-M.
Both comply with TF-M integration of platform stm/stm32wba65i-dk.

Signed-off-by: Etienne Carriere <[email protected]>
Add variant ns to stm32wba65i_dk1 board to embed TF-M in the SoC
secure world. The flash layout is synced with the layout defined
in Zephyr TF-M integration of platform STM32WBA65I.

Successfully tested against a few samples and test samples:
- samples/tfm_integration/psa_crypto
- samples/tfm_integration/psa_protected_storage
- samples/tfm_integration/tfm_ipc
- samples/tfm_integration/tfm_regression_test
- samples/tfm_integration/tfm_secure_partition
- tests/subsys/secure_storage/psa/crypto
- tests/subsys/secure_storage/psa/its
  (with CONFIG_TFM_ITS_MAX_ASSET_SIZE_OVERRIDE=y
  and CONFIG_TFM_ITS_MAX_ASSET_SIZE=256)

The platforms do not yet support samples/tfm_integration/tfm_psa_test.

Signed-off-by: Etienne Carriere <[email protected]>
Support the ns variant of stl32wba65i_dk1 board in ADC API tests.

Signed-off-by: Etienne Carriere <[email protected]>
Add variant ns to nucleo_wba65ri board to embed TF-M in the SoC
secure world.

The flash layout is synced with the layout defined in Zephyr TF-M
integration of platform STM32WBA65I.

- samples/tfm_integration/psa_crypto
- samples/tfm_integration/psa_protected_storage
- samples/tfm_integration/tfm_ipc
- samples/tfm_integration/tfm_regression_test
- samples/tfm_integration/tfm_secure_partition
- tests/subsys/secure_storage/psa/crypto
- tests/subsys/secure_storage/psa/its
  (with CONFIG_TFM_ITS_MAX_ASSET_SIZE_OVERRIDE=y
  and CONFIG_TFM_ITS_MAX_ASSET_SIZE=256)

Signed-off-by: Etienne Carriere <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ADC Analog-to-Digital Converter (ADC) area: TF-M ARM Trusted Firmware-M (TF-M) DNM (manifest) This PR should not be merged (controlled by action-manifest) manifest manifest-trusted-firmware-m platform: STM32 ST Micro STM32
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants