boards: Convert stm32l562e_dk to HWM v2

Port the board to HWMv2.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
This commit is contained in:
Erwan Gouriou
2024-02-07 15:33:30 +01:00
committed by Jamie McCrae
parent e601d64344
commit 643aeac552
17 changed files with 36 additions and 33 deletions

View File

@@ -1,8 +0,0 @@
# STM32L562E-DK Discovery board configuration
# Copyright (c) 2020 Yestin Sun
# SPDX-License-Identifier: Apache-2.0
config BOARD_STM32L562E_DK
bool "STM32L562E-DK Discovery Development Board"
depends on SOC_STM32L562XX

View File

@@ -5,9 +5,6 @@
if BOARD_STM32L562E_DK
config BOARD
default "stm32l562e_dk"
if BT
config SPI
@@ -29,6 +26,10 @@ config BT_HCI_VS_EXT
endif # BT
endif # BOARD_STM32L562E_DK
if BOARD_STM32L562E_DK_STM32L562XX_NS
if TRUSTED_EXECUTION_NONSECURE
# Get flash configuration for NS image from dts flash partition
@@ -37,4 +38,4 @@ config USE_DT_CODE_PARTITION
endif # TRUSTED_EXECUTION_NONSECURE
endif # BOARD_STM32L562E_DK
endif # BOARD_STM32L562E_DK_STM32L562XX_NS

View File

@@ -0,0 +1,9 @@
# Copyright (c) 2020 Yestin Sun
# SPDX-License-Identifier: Apache-2.0
config BOARD_STM32L562E_DK
select SOC_STM32L562XX
config BOARD_STM32L562E_DK_STM32L562XX_NS
bool
select SOC_STM32L562XX

View File

@@ -0,0 +1,7 @@
board:
name: stm32l562e_dk
vendor: st
socs:
- name: stm32l562xx
variants:
- name: ns

View File

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 55 KiB

View File

@@ -194,17 +194,17 @@ The default configuration can be found in the defconfig and dts files:
- Common:
- :zephyr_file:`boards/arm/stm32l562e_dk/stm32l562e_dk_common.dtsi`
- :zephyr_file:`boards/st/stm32l562e_dk/stm32l562e_dk_common.dtsi`
- Secure target:
- :zephyr_file:`boards/arm/stm32l562e_dk/stm32l562e_dk_defconfig`
- :zephyr_file:`boards/st/stm32l562e_dk/stm32l562e_dk_defconfig`
- :zephyr_file:`boards/arm/stm32l562e_dk/stm32l562e_dk.dts`
- Non-Secure target:
- :zephyr_file:`boards/arm/stm32l562e_dk/stm32l562e_dk_ns_defconfig`
- :zephyr_file:`boards/arm/stm32l562e_dk/stm32l562e_dk_ns.dts`
- :zephyr_file:`boards/st/stm32l562e_dk/stm32l562e_dk_ns_defconfig`
- :zephyr_file:`boards/st/stm32l562e_dk/stm32l562e_dk_ns.dts`
Zephyr board options
====================
@@ -214,20 +214,20 @@ for building for both Secure and Non-Secure firmware.
The BOARD options are summarized below:
+----------------------+-----------------------------------------------+
| BOARD | Description |
+======================+===============================================+
| stm32l562e_dk | For building Secure (or Secure-only) firmware |
+----------------------+-----------------------------------------------+
| stm32l562e_dk_ns | For building Non-Secure firmware |
+----------------------+-----------------------------------------------+
+------------------------------+-------------------------------------------+
| BOARD | Description |
+==============================+===========================================+
| stm32l562e_dk | For building Trust Zone Disabled firmware |
+------------------------------+-------------------------------------------+
| stm32l562e_dk/stm32l562xx/ns | For building Non-Secure firmware |
+------------------------------+-------------------------------------------+
Here are the instructions to build Zephyr with a non-secure configuration,
using `tfm_ipc_` sample:
.. code-block:: bash
$ west build -b stm32l562e_dk_ns samples/tfm_integration/tfm_ipc/
$ west build -b stm32l562e_dk/stm32l562xx/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,
@@ -334,11 +334,11 @@ Building Secure/Non-Secure Zephyr applications with Arm |reg| TrustZone |reg|
The TF-M integration sample :ref:`tfm_ipc` can be run on a ST STM32L562E-DK Discovery.
In TF-M configuration, Zephyr is run on the non-secure domain. A non-secure image
can be generated using ``stm32l562e_dk_ns`` as build target.
can be generated using ``stm32l562e_dk/stm32l562xx/ns`` as build target.
.. code-block:: bash
$ west build -b stm32l562e_dk_ns path/to/source/directory
$ west build -b stm32l562e_dk/stm32l562xx/ns path/to/source/directory
Note: When building the ``*_ns`` image with TF-M, ``build/tfm/api_ns/postbuild.sh`` bash script
is run automatically in a post-build step to make some required flash layout changes.

View File

@@ -1,8 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
CONFIG_SOC_SERIES_STM32L5X=y
CONFIG_SOC_STM32L562XX=y
# enable uart driver
CONFIG_SERIAL=y

View File

@@ -1,4 +1,4 @@
identifier: stm32l562e_dk_ns
identifier: stm32l562e_dk/stm32l562xx/ns
name: ST STM32L562E-DK Discovery non secure
type: mcu
arch: arm

View File

@@ -1,8 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
CONFIG_SOC_SERIES_STM32L5X=y
CONFIG_SOC_STM32L562XX=y
# enable uart driver
CONFIG_SERIAL=y