boards: st: stm32h5 boards has openOCD runner from upstream

Define the support /openocd.cfg and the board.cmake to add the openOCD
as runner for the stm32h5x boards.
Note that the openOCD is hack downloaded and build from
from https://github.com/STMicroelectronics/OpenOCD

Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
Francois Ramu 2024-06-19 17:18:21 +02:00 committed by Fabio Baltieri
commit a4400dbe6c
9 changed files with 186 additions and 2 deletions

View file

@ -247,6 +247,25 @@ Applications for the ``nucleo_h563zi`` board can be built and
flashed in the usual way (see :ref:`build_an_application` and
:ref:`application_run` for more details).
OpenOCD Support
===============
For now, openocd support for stm32h5 is not available on upstream OpenOCD.
You can check `OpenOCD official Github mirror`_.
In order to use it though, you should clone from the cutomized
`STMicroelectronics OpenOCD Github`_ and compile it following usual README guidelines.
Once it is done, you can set the OPENOCD and OPENOCD_DEFAULT_PATH variables in
:zephyr_file:`boards/st/nucleo_h563zi/board.cmake` to point the build
to the paths of the OpenOCD binary and its scripts, before
including the common openocd.board.cmake file:
.. code-block:: none
set(OPENOCD "<path_to_openocd_repo>/src/openocd" CACHE FILEPATH "" FORCE)
set(OPENOCD_DEFAULT_PATH <path_to_opneocd_repo>/tcl)
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
Flashing
========
@ -269,6 +288,10 @@ This can be done by executing the following commands.
$ pyocd pack --install stm32h5
Alternatively, the openocd interface will be supported by a next openocd version.
When available, OpenOCD could be used in the same way as other tools.
Flashing an application to Nucleo H563ZI
------------------------------------------
@ -320,3 +343,9 @@ You can debug an application in the usual way. Here is an example for the
.. _STM32CubeProgrammer:
https://www.st.com/en/development-tools/stm32cubeprog.html
.. _OpenOCD official Github mirror:
https://github.com/openocd-org/openocd/
.. _STMicroelectronics OpenOCD Github:
https://github.com/STMicroelectronics/OpenOCD/tree/openocd-cubeide-r6