Skip to content

Commit bab3ab2

Browse files
mathieuchopstmkartben
authored andcommitted
boards: st: nucleo_n657x0_q: 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 2fd7999 commit bab3ab2

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

boards/st/nucleo_n657x0_q/board.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,8 @@ else()
1212
board_runner_args(stm32cubeprogrammer "--download-address=0x70000000")
1313
endif()
1414

15+
board_runner_args(stlink_gdbserver "--apid=1")
16+
board_runner_args(stlink_gdbserver "--extload=MX25UM51245G_STM32N6570-NUCLEO.stldr")
17+
1518
include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
19+
include(${ZEPHYR_BASE}/boards/common/stlink_gdbserver.board.cmake)

boards/st/nucleo_n657x0_q/doc/index.rst

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -245,20 +245,28 @@ You should see the following message on the console:
245245
Debugging
246246
=========
247247

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

250-
* Go to File > Import and select C/C++ > STM32 Cortex-M Executable.
251-
* In Executable field, browse to your <ZEPHYR_PATH>/build/zephyr/zephyr.elf.
252-
* In MCU field, select STM32N657X0HxQ.
253-
* Click on Finish.
254-
* Finally, click on Debug to start the debugging session.
251+
.. zephyr-app-commands::
252+
:zephyr-app: samples/hello_world
253+
:board: nucleo_n657x0_q
254+
:maybe-skip-config:
255+
:goals: debug
255256

256257
.. note::
257-
For debugging, before powering on the board, set the boot pins in the following configuration:
258+
To enable debugging, before powering on the board, set the boot pins in the following configuration:
258259

259260
* BOOT0: 0
260261
* BOOT1: 1
261262

263+
Another solution for debugging is to use STM32CubeIDE:
264+
265+
* Go to :menuselection:`File --> Import` and select :menuselection:`C/C++ --> STM32 Cortex-M Executable`.
266+
* In the :guilabel:`Executable` field, browse to your ``<ZEPHYR_PATH>/build/zephyr/zephyr.elf``.
267+
* In :guilabel:`MCU` field, select ``STM32N657X0HxQ``.
268+
* Click on :guilabel:`Finish`.
269+
* Finally, click on :guilabel:`Debug` to start the debugging session.
262270

263271
Running tests with twister
264272
==========================

0 commit comments

Comments
 (0)