Skip to content

Commit 4f7d982

Browse files
JarmouniAjhedberg
authored andcommitted
boards: stm32h750b-dk: add ST-Link GDB Server runner
Add support for the ST-Link GDB Server runner to be able to debug STM32H750B-DK apps, including those running from external flash. Update the board's documentation accordingly. Signed-off-by: Abderrahmane JARMOUNI <[email protected]>
1 parent 3cc9a84 commit 4f7d982

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

boards/st/stm32h750b_dk/board.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ if(CONFIG_STM32_MEMMAP OR CONFIG_BOOTLOADER_MCUBOOT)
77
board_runner_args(stm32cubeprogrammer "--extload=MT25TL01G_STM32H750B-DISCO.stldr")
88
endif()
99

10+
board_runner_args(stlink_gdbserver "--extload=MT25TL01G_STM32H750B-DISCO.stldr")
11+
1012
board_runner_args(jlink "--device=STM32H735IG" "--speed=4000")
1113
board_runner_args(openocd --target-handle=_CHIPNAME.cpu0)
1214

1315
# keep first
1416
include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
17+
include(${ZEPHYR_BASE}/boards/common/stlink_gdbserver.board.cmake)
1518
include(${ZEPHYR_BASE}/boards/common/openocd-stm32.board.cmake)
1619
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

boards/st/stm32h750b_dk/doc/index.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,22 @@ perform application upgrade, refer to `MCUboot design`_.
210210
To learn more about how to secure the application images stored in external Flash,
211211
refer to `MCUboot Encryption`_.
212212

213+
Debugging
214+
---------
215+
216+
You can debug the application in external flash using ``west`` and ``GDB``.
217+
218+
After flashing MCUboot and the app, execute the following command:
219+
220+
.. code-block:: console
221+
222+
$ west debugserver
223+
224+
Then, open another terminal (don't forget to activate Zephyr's environment) and execute:
225+
226+
.. code-block:: console
227+
228+
$ west attach
213229
214230
.. _STM32H750B-DK website:
215231
https://www.st.com/en/evaluation-tools/stm32h750b-dk.html

0 commit comments

Comments
 (0)