boards: st: nucleo_wb09ke: replace OpenOCD with pyOCD for debugging

pyOCD is installed along with Zephyr, and can debug apps on STM32WB09 once
the appropriate pack (already publicly available) is installed.

On the other hand, OpenOCD comes with the Zephyr SDK but only on Linux, and
both Zephyr's fork and upstream lack support for STM32WB09, which was added
by commit 89b053b660bcef803e19c89584de933158c59299 in ST's OpenOCD fork[1].
While pre-builts for this OpenOCD fork are provided by ST as part of other
software packages (e.g., STM32CubeIDE), it is less convenient to use and
the exact support script to use varies depending on which tool OpenOCD is
borrowed from.

Remove OpenOCD support for STM32WB09 entirely, replacing it with pyOCD, and
add instructions about pack installation in the board documentation.

While this also applies to flashing, STM32CubeProgrammer is the default
runner for this, and already supports STM32WB09 without any shenanigans
(i.e., a bare "west flash" will work with CubeProg) - as such, place the
notice only in the debugging section, which is the only operation CubeProg
does not support.

[1] https://github.com/STMicroelectronics/OpenOCD

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
This commit is contained in:
Mathieu Choplain 2025-04-02 14:45:12 +02:00 committed by Benjamin Cabé
parent 87b8074241
commit f1452f2caa
3 changed files with 11 additions and 6 deletions

View File

@ -1,7 +1,8 @@
# SPDX-License-Identifier: Apache-2.0
# keep first
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=sw" "--start-address=0x10000000")
board_runner_args(pyocd "--target=stm32wb09kevx")
# keep first
include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)

View File

@ -121,6 +121,15 @@ You can debug an application in the usual way. Here is an example for the
:maybe-skip-config:
:goals: debug
.. warning::
Application debugging on this board uses the pyOCD runner, which requires an additional pack
to be installed beforehand. This can be performed using the following commands:
.. code-block:: console
$ pyocd pack update
$ pyocd pack install stm32wb0
.. _`Nucleo WB09KE webpage`:
https://www.st.com/en/evaluation-tools/nucleo-wb09ke.html

View File

@ -1,5 +0,0 @@
source [find interface/stlink-dap.cfg]
transport select "dapdirect_swd"
source [find target/stm32wb0x.cfg]