boards: Convert arduino_portenta_h7 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:53:28 +01:00
committed by Carles Cufi
parent 4c86af7eae
commit 44bcfe57c7
16 changed files with 20 additions and 45 deletions

View File

@@ -1,7 +1,7 @@
# Copyright (c) 2022 Benjamin Björnsson <benjamin.bjornsson@gmail.com>.
# SPDX-License-Identifier: Apache-2.0
if(CONFIG_BOARD_ARDUINO_PORTENTA_H7_M7)
if(CONFIG_BOARD_ARDUINO_PORTENTA_H7_STM32H747XX_M7)
zephyr_library()
zephyr_library_sources(board.c)

View File

@@ -0,0 +1,8 @@
# Arduino Portenta H7 board configuration
# Copyright (c) 2022 Benjamin Björnsson <benjamin.bjornsson@gmail.com>.
# SPDX-License-Identifier: Apache-2.0
config BOARD_ARDUINO_PORTENTA_H7
select SOC_STM32H747XX_M7 if BOARD_ARDUINO_PORTENTA_H7_STM32H747XX_M7
select SOC_STM32H747XX_M4 if BOARD_ARDUINO_PORTENTA_H7_STM32H747XX_M4

View File

@@ -1,4 +1,4 @@
identifier: arduino_portenta_h7_m4
identifier: arduino_portenta_h7/stm32h747xx/m4
name: Arduino Portenta H7 (M4)
type: mcu
arch: arm

View File

@@ -1,12 +1,6 @@
# Copyright (c) 2022 Benjamin Björnsson <benjamin.bjornsson@gmail.com>.
# 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_ARDUINO_PORTENTA_H7_M4=y
# Enable GPIO
CONFIG_GPIO=y

View File

@@ -1,4 +1,4 @@
identifier: arduino_portenta_h7_m7
identifier: arduino_portenta_h7/stm32h747xx/m7
name: Arduino Portenta H7 (M7)
type: mcu
arch: arm

View File

@@ -1,12 +1,6 @@
# Copyright (c) 2022 Benjamin Björnsson <benjamin.bjornsson@gmail.com>.
# 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_ARDUINO_PORTENTA_H7_M7=y
# Enable the internal SMPS regulator
CONFIG_POWER_SUPPLY_DIRECT_SMPS=y

View File

@@ -0,0 +1,5 @@
board:
name: arduino_portenta_h7
vendor: arduino
socs:
- name: stm32h747xx

View File

@@ -1,7 +1,7 @@
.. _arduino_portenta_h7_board:
Arduino Portenta H7
#######################
###################
Overview
********
@@ -103,7 +103,7 @@ Here is an example for the :ref:`hello_world` application.
.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: arduino_portenta_h7_m7
:board: arduino_portenta_h7/stm32h747xx/m7
:goals: build flash
Run a serial host program to connect with your board:
@@ -116,7 +116,7 @@ You should see the following message on the console:
.. code-block:: console
Hello World! arduino_portenta_m7
Hello World! arduino_portenta_h7
Similarly, you can build and flash samples on the M4 target. For this, please
take care of the resource sharing (UART port used for console for instance).
@@ -125,7 +125,7 @@ Here is an example for the :zephyr:code-sample:`blinky` application on M4 core.
.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: arduino_portenta_h7_m4
:board: arduino_portenta_h7/stm32h747xx/m4
:goals: build flash
.. _ARDUINO_PORTENTA_H7 website:

View File

@@ -1,14 +0,0 @@
# Arduino Portenta H7 board configuration
# Copyright (c) 2022 Benjamin Björnsson <benjamin.bjornsson@gmail.com>.
# SPDX-License-Identifier: Apache-2.0
config BOARD_ARDUINO_PORTENTA_H7_M7
bool "Arduino Portenta H7 Board"
depends on SOC_STM32H747XX
select CPU_CORTEX_M7
config BOARD_ARDUINO_PORTENTA_H7_M4
bool "Arduino Portenta H7 Board"
depends on SOC_STM32H747XX
select CPU_CORTEX_M4

View File

@@ -1,12 +0,0 @@
# Arduino Portenta H7 board configuration
# Copyright (c) 2022 Benjamin Björnsson <benjamin.bjornsson@gmail.com>.
# SPDX-License-Identifier: Apache-2.0
if BOARD_ARDUINO_PORTENTA_H7_M7 || BOARD_ARDUINO_PORTENTA_H7_M4
config BOARD
default "arduino_portenta_h7_m7" if BOARD_ARDUINO_PORTENTA_H7_M7
default "arduino_portenta_h7_m4" if BOARD_ARDUINO_PORTENTA_H7_M4
endif # BOARD_ARDUINO_PORTENTA_H7_M7 || BOARD_ARDUINO_PORTENTA_H7_M4