Skip to content

Commit

Permalink
boards: Convert stm32l562e_dk to HWM v2
Browse files Browse the repository at this point in the history
Port the board to HWMv2.

Signed-off-by: Erwan Gouriou <[email protected]>
  • Loading branch information
erwango committed Feb 7, 2024
1 parent 2c29827 commit 18259d9
Show file tree
Hide file tree
Showing 17 changed files with 32 additions and 29 deletions.
8 changes: 0 additions & 8 deletions boards/boards_legacy/arm/stm32l562e_dk/Kconfig.board

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

if BOARD_STM32L562E_DK

config BOARD
default "stm32l562e_dk"

if BT

config SPI
Expand All @@ -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
Expand All @@ -37,4 +38,4 @@ config USE_DT_CODE_PARTITION

endif # TRUSTED_EXECUTION_NONSECURE

endif # BOARD_STM32L562E_DK
endif # BOARD_STM32L562E_DK_STM32L562XX_NS
9 changes: 9 additions & 0 deletions boards/st/stm32l562e_dk/Kconfig.stm32l562e_dk
Original file line number Diff line number Diff line change
@@ -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
File renamed without changes.
7 changes: 7 additions & 0 deletions boards/st/stm32l562e_dk/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
board:
name: stm32l562e_dk
vendor: st
socs:
- name: stm32l562xx
variants:
- name: ns
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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.
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
identifier: stm32l562e_dk_ns
identifier: stm32l562e_dk/stm32l562xx/ns
name: ST STM32L562E-DK Discovery non secure
type: mcu
arch: arm
Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
File renamed without changes.

0 comments on commit 18259d9

Please sign in to comment.