boards: Convert stm32h747i_disco 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-05 17:55:14 +01:00
committed by Carles Cufi
parent 00314155df
commit a2f56bdcd5
24 changed files with 29 additions and 45 deletions

View File

@@ -1,14 +0,0 @@
# STM32H747I Discovery board configuration
# Copyright (c) 2019 Linaro Limited
# SPDX-License-Identifier: Apache-2.0
config BOARD_STM32H747I_DISCO_M7
bool "STM32H747I Discovery Development Board"
depends on SOC_STM32H747XX
select CPU_CORTEX_M7
config BOARD_STM32H747I_DISCO_M4
bool "STM32H747I Discovery Development Board"
depends on SOC_STM32H747XX
select CPU_CORTEX_M4

View File

@@ -3,11 +3,7 @@
# Copyright (c) 2019 Linaro Limited
# SPDX-License-Identifier: Apache-2.0
if BOARD_STM32H747I_DISCO_M7 || BOARD_STM32H747I_DISCO_M4
config BOARD
default "stm32h747i_disco_m7" if BOARD_STM32H747I_DISCO_M7
default "stm32h747i_disco_m4" if BOARD_STM32H747I_DISCO_M4
if BOARD_STM32H747I_DISCO
if NETWORKING
@@ -19,4 +15,4 @@ endif # NETWORKING
config DISK_DRIVER_SDMMC
default y if DISK_DRIVERS
endif # BOARD_STM32H747I_DISCO_M7
endif # BOARD_STM32H747I_DISCO

View File

@@ -0,0 +1,8 @@
# STM32H747I DISCOVERY board configuration
# Copyright (c) 2019 Linaro Limited
# SPDX-License-Identifier: Apache-2.0
config BOARD_STM32H747I_DISCO
select SOC_STM32H747XX_M7 if BOARD_STM32H747I_DISCO_STM32H747XX_M7
select SOC_STM32H747XX_M4 if BOARD_STM32H747I_DISCO_STM32H747XX_M4

View File

@@ -1,10 +1,10 @@
# SPDX-License-Identifier: Apache-2.0
if(CONFIG_BOARD_STM32H747I_DISCO_M7)
if(CONFIG_BOARD_STM32H747I_DISCO_STM32H747XX_M7)
board_runner_args(jlink "--device=STM32H747ZI_M7")
board_runner_args(openocd "--config=${BOARD_DIR}/support/openocd_stm32h747i_disco_m7.cfg")
board_runner_args(openocd --target-handle=_CHIPNAME.cpu0)
elseif(CONFIG_BOARD_STM32H747I_DISCO_M4)
elseif(CONFIG_BOARD_STM32H747I_DISCO_STM32H747XX_M4)
board_runner_args(jlink "--device=STM32H747ZI_M4")
board_runner_args(openocd "--config=${BOARD_DIR}/support/openocd_stm32h747i_disco_m4.cfg")
board_runner_args(openocd --target-handle=_CHIPNAME.cpu1)

View File

@@ -0,0 +1,5 @@
board:
name: stm32h747i_disco
vendor: st
socs:
- name: stm32h747xx

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

@@ -90,8 +90,8 @@ The current Zephyr stm32h747i_disco board configuration supports the following h
Other hardware features are not yet supported on Zephyr porting.
The default configuration per core can be found in the defconfig files:
``boards/arm/stm32h747i_disco/stm32h747i_disco_defconfig_m7`` and
``boards/arm/stm32h747i_disco/stm32h747i_disco_defconfig_m4``
:zephyr_file:`boards/st/stm32h747i_disco/stm32h747i_disco_stm32h747xx_m7_defconfig` and
:zephyr_file:`boards/st/stm32h747i_disco/stm32h747i_disco_stm32h747xx_m4_defconfig`
Pin Mapping
===========
@@ -168,7 +168,7 @@ command, for example:
.. zephyr-app-commands::
:zephyr-app: samples/drivers/display
:board: stm32h747i_disco_m7
:board: stm32h747i_disco/stm32h747xx/m7
:shield: st_b_lcd40_dsi1_mb1166
:goals: build flash
@@ -195,7 +195,7 @@ Programming and Debugging
*************************
Applications for the ``stm32h747i_disco`` board should be built per core target,
using either ``stm32h747i_disco_m7`` or ```stm32h747i_disco_m4`` as the target.
using either ``stm32h747i_disco/stm32h747xx/m7`` or ```stm32h747i_disco/stm32h747xx/m4`` as the target.
See :ref:`build_an_application` for more information about application builds.
.. note::
@@ -214,7 +214,8 @@ Flashing
Flashing operation will depend on the target to be flashed and the SoC
option bytes configuration.
It is advised to use `STM32CubeProgrammer`_ to check and update option bytes
configuration and flash ``stm32h747i_disco_m7`` and ``stm32h747i_disco_m4`` targets.
configuration and flash ``stm32h747i_disco/stm32h747xx/m7`` and
``stm32h747i_disco/stm32h747xx/m7`` targets.
By default:
@@ -247,7 +248,7 @@ Here is an example for the :ref:`hello_world` application.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: stm32h747i_disco_m7
:board: stm32h747i_disco/stm32h747xx/m7
:goals: build flash
Run a serial host program to connect with your board:
@@ -260,7 +261,7 @@ You should see the following message on the console:
.. code-block:: console
Hello World! stm32h747i_disco_m7
Hello World! stm32h747i_disco
.. note::
Sometimes, flashing is not working. It is necessary to erase the flash
@@ -273,7 +274,7 @@ Here is an example for the :zephyr:code-sample:`blinky` application on M4 core.
.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: stm32h747i_disco_m4
:board: stm32h747i_disco/stm32h747xx/m7
:goals: build flash
Debugging
@@ -284,7 +285,7 @@ You can debug an application in the usual way. Here is an example for the
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: stm32h747i_disco_m7
:board: stm32h747i_disco/stm32h747xx/m7
:goals: debug
Debugging with west is currently not available on Cortex M4 side.

View File

@@ -1,4 +1,4 @@
identifier: stm32h747i_disco_m4
identifier: stm32h747i_disco/stm32h747xx/m4
name: ST STM32H747I Discovery (M4)
type: mcu
arch: arm

View File

@@ -1,11 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
CONFIG_SOC_SERIES_STM32H7X=y
CONFIG_SOC_STM32H747XX=y
# Board config should be specified since there are 2 possible targets
CONFIG_BOARD_STM32H747I_DISCO_M4=y
# enable GPIO
CONFIG_GPIO=y

View File

@@ -1,4 +1,4 @@
identifier: stm32h747i_disco_m7
identifier: stm32h747i_disco/stm32h747xx/m7
name: ST STM32H747I Discovery (M7)
type: mcu
arch: arm

View File

@@ -1,11 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
CONFIG_SOC_SERIES_STM32H7X=y
CONFIG_SOC_STM32H747XX=y
# Board config should be specified since there are 2 possible targets
CONFIG_BOARD_STM32H747I_DISCO_M7=y
# Enable the internal SMPS regulator
CONFIG_POWER_SUPPLY_DIRECT_SMPS=y