Skip to content

Commit f1452f2

Browse files
Mathieu Choplainkartben
authored andcommitted
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 <[email protected]>
1 parent 87b8074 commit f1452f2

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# SPDX-License-Identifier: Apache-2.0
22
# keep first
33
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=sw" "--start-address=0x10000000")
4+
board_runner_args(pyocd "--target=stm32wb09kevx")
45

56
# keep first
67
include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
7-
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
8+
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)

boards/st/nucleo_wb09ke/doc/index.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,15 @@ You can debug an application in the usual way. Here is an example for the
121121
:maybe-skip-config:
122122
:goals: debug
123123

124+
.. warning::
125+
Application debugging on this board uses the pyOCD runner, which requires an additional pack
126+
to be installed beforehand. This can be performed using the following commands:
127+
128+
.. code-block:: console
129+
130+
$ pyocd pack update
131+
$ pyocd pack install stm32wb0
132+
124133
.. _`Nucleo WB09KE webpage`:
125134
https://www.st.com/en/evaluation-tools/nucleo-wb09ke.html
126135

boards/st/nucleo_wb09ke/support/openocd.cfg

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)