Skip to content

Commit c41320e

Browse files
Georgij Cernysiovgalak
authored andcommitted
doc: guides: debugging: probes: correct J-Link usage
Corrects information regarding J-Link usage with ST-Link. Signed-off-by: Georgij Cernysiov <[email protected]>
1 parent 27b9c6a commit c41320e

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

doc/guides/debugging/probes.rst

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -188,22 +188,28 @@ Using Segger J-Link
188188
Once STLink is flashed with SEGGER FW and J-Link GDB server is installed on your
189189
host computer, you can flash and debug as follows:
190190

191-
Use the CMake ``flash`` target with the argument ``STLINK_FW=jlink`` to
192-
build your Zephyr application.
191+
Use CMake with ``-DZEPHYR_BOARD_FLASH_RUNNER=jlink`` to change the default OpenOCD
192+
runner to J-Link. Alternatively, you might add the following line to your
193+
application ``CMakeList.txt`` file.
193194

194-
.. zephyr-app-commands::
195-
:zephyr-app: samples/hello_world
196-
:gen-args: -DSTLINK_FW=jlink
197-
:goals: flash
195+
.. code-block:: cmake
198196
199-
Use the CMake ``debug`` target with the argument ``STLINK_FW=jlink`` to build
200-
your Zephyr application, invoke the J-Link GDB server, attach a GDB client, and
201-
program your Zephyr application to flash. It will leave you at a GDB prompt.
197+
set(ZEPHYR_BOARD_FLASH_RUNNER jlink)
202198
203-
.. zephyr-app-commands::
204-
:zephyr-app: samples/hello_world
205-
:gen-args: -DSTLINK_FW=jlink
206-
:goals: debug
199+
If you use West (Zephyr’s meta-tool) you can modify the default runner using
200+
the ``--runner`` (or ``-r``) option.
201+
202+
.. code-block:: console
203+
204+
west flash --runner jlink
205+
206+
To attach a debugger to your board and open up a debug console with ``jlink``.
207+
208+
.. code-block:: console
209+
210+
west debug --runner jlink
211+
212+
For more information about West and available options, see :ref:`west`.
207213

208214
If you configured your Zephyr application to use `Segger RTT`_ console instead,
209215
open telnet:

0 commit comments

Comments
 (0)