Skip to content

Commit d41716f

Browse files
mathieuchopstmkartben
authored andcommitted
boards: st: stm32n6570_dk: add stlink_gdbserver runner
Add support for the stlink_gdbserver runner to the aforementionned board. Update the "Debugging" section of the board documentation accordingly, along with cleaning up the existing text. Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
1 parent bab3ab2 commit d41716f

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

boards/st/stm32n6570_dk/board.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,9 @@ else()
1919
board_runner_args(stm32cubeprogrammer "--download-address=${app_base_addr}")
2020
endif()
2121

22+
board_runner_args(stlink_gdbserver "--apid=1")
23+
board_runner_args(stlink_gdbserver "--extload=MX66UW1G45G_STM32N6570-DK.stldr")
24+
2225

2326
include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
27+
include(${ZEPHYR_BASE}/boards/common/stlink_gdbserver.board.cmake)

boards/st/stm32n6570_dk/doc/index.rst

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -301,20 +301,28 @@ You should see the following message on the console:
301301
Debugging
302302
=========
303303

304-
For now debugging is only available through STM32CubeIDE:
304+
You can debug an application in the usual way using the :ref:`ST-LINK GDB Server <runner_stlink_gdbserver>`.
305+
Here is an example for the :zephyr:code-sample:`hello_world` application.
305306

306-
* Go to File > Import and select C/C++ > STM32 Cortex-M Executable.
307-
* In Executable field, browse to your <ZEPHYR_PATH>/build/zephyr/zephyr.elf.
308-
* In MCU field, select STM32N657X0HxQ.
309-
* Click on Finish.
310-
* Finally, click on Debug to start the debugging session.
307+
.. zephyr-app-commands::
308+
:zephyr-app: samples/hello_world
309+
:board: stm32n6570_dk
310+
:maybe-skip-config:
311+
:goals: debug
311312

312313
.. note::
313-
For debugging, before powering on the board, set the boot pins in the following configuration:
314+
To enable debugging, before powering on the board, set the boot pins in the following configuration:
314315

315316
* BOOT0: 0
316317
* BOOT1: 1
317318

319+
Another solution for debugging is to use STM32CubeIDE:
320+
321+
* Go to :menuselection:`File --> Import` and select :menuselection:`C/C++ --> STM32 Cortex-M Executable`.
322+
* In the :guilabel:`Executable` field, browse to your ``<ZEPHYR_PATH>/build/zephyr/zephyr.elf``.
323+
* In :guilabel:`MCU` field, select ``STM32N657X0HxQ``.
324+
* Click on :guilabel:`Finish`.
325+
* Finally, click on :guilabel:`Debug` to start the debugging session.
318326

319327
Running tests with twister
320328
==========================

0 commit comments

Comments
 (0)