Skip to content

Conversation

@etienne-lms
Copy link
Contributor

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
@github-actions
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
psa-arch-tests zephyrproject-rtos/psa-arch-tests@2cadb02 (main) zephyrproject-rtos/psa-arch-tests#13 zephyrproject-rtos/psa-arch-tests#13/files
trusted-firmware-m zephyrproject-rtos/trusted-firmware-m@c150f48 (main) zephyrproject-rtos/trusted-firmware-m#133 zephyrproject-rtos/trusted-firmware-m#133/files

DNM label due to: 2 projects 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
@etienne-lms
Copy link
Contributor 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.

Copy link
Contributor

@JarmouniA JarmouniA left a comment

Choose a reason for hiding this comment

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

Some additional typos

@etienne-lms
Copy link
Contributor Author

Rebased.

@anangl anangl assigned erwango and unassigned anangl May 21, 2025
JarmouniA
JarmouniA previously approved these changes May 21, 2025
@etienne-lms
Copy link
Contributor Author

Thanks again @JarmouniA for the reviews, fixes and cleanings.

@etienne-lms
Copy link
Contributor Author

etienne-lms commented May 28, 2025

@JarmouniA, I've updated this P-R to sync with related Zephyr/TF-M P-R 133. Changes are an update of the flash layout and addition of a TF-M CMake directive. You can find the diff between the series you reviewed and the latest state of this P-R here:
https://github.com/etienne-lms/zephyr/compare/wba65i-tfm-v1..wba65i-tfm-v2 (ephemeral link).

@etienne-lms
Copy link
Contributor Author

Rebased.
I've also appended a commit to be able to run PSA-Arch-Tests (P-R zephyrproject-rtos/psa-arch-tests#13), on STM32WBA65I devices (and also STM32U5).

@etienne-lms
Copy link
Contributor Author

The 2 CI twister-build failures are related to #90988.

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 TF-M directive STM32_FLASH_LAYOUT_BEGIN_OFFSET needed to specify
the gap needed by external boot stage resources at flash beginning.
The offset tells STM32 TF-M firmware the base offset in the flash
where the several TF-M and non-secure image areas shall be located.

The CMake directive was introduced mainline TF-M commit [1] and merged
in Zephyr TF-M repository [2].

Link: TrustedFirmware-M/trusted-firmware-m@fc035b8 [1]
Link: https://github.com/zephyrproject-rtos/trusted-firmware-m/commit/<TO-BE-FILLED> [2]
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_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)

There is currently a build issue that prevents to build (and run)
samples/tfm_integration/tfm_regression_test when using GCC 11.x or 12.x.
The issue needs should be addressed in TF-M with a change like the
one applied on STM32U5 platforms, see [1] and [2].

Support for PSA Arch Tests (samples/tfm_integration/tfm_psa_test) in
not yet merged but is in under review [3].

Link: zephyrproject-rtos/trusted-firmware-m@edbb015 [1]
Link: TrustedFirmware-M/trusted-firmware-m@578a6f4 [2]
Link: ARM-software/psa-arch-tests#406 [3]
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_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)

There is currently a build issue that prevents to build (and run)
samples/tfm_integration/tfm_regression_test when using GCC 11.x or 12.x.
The issue needs should be addressed in TF-M with a change like the
one applied on STM32U5 platforms, see [1] and [2].

Support for PSA Arch Tests (samples/tfm_integration/tfm_psa_test) in
not yet merged but is in under review [3].

Link: zephyrproject-rtos/trusted-firmware-m@edbb015 [1]
Link: TrustedFirmware-M/trusted-firmware-m@578a6f4 [2]
Link: ARM-software/psa-arch-tests#406 [3]
Signed-off-by: Etienne Carriere <[email protected]>
Support the ns variant of nucleo_wba65ri board in ADC API tests.

Signed-off-by: Etienne Carriere <[email protected]>
Update PSA-Arch-Tests for support of STM32U5 and STM32WBA65I SoCs.

Signed-off-by: Etienne Carriere <[email protected]>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 5, 2025

@etienne-lms
Copy link
Contributor Author

Rebased to fix CI build failures.

@etienne-lms
Copy link
Contributor Author

Deprecated changes since Zephyr already bumped to TF-M 2.2.
I'm closing this P-R and will create a new one once Zephyr tag 4.2.0 is created.

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-psa-arch-tests manifest-trusted-firmware-m platform: STM32 ST Micro STM32

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants