Skip to content
Permalink
Browse files

doc: guides: debugging: probes: correct J-Link usage

Corrects information regarding J-Link usage with ST-Link.

Signed-off-by: Georgij Cernysiov <g.cernysiov@elco-automation.de>
  • Loading branch information...
Georgij Cernysiov authored and galak committed Apr 11, 2019
1 parent 27b9c6a commit c41320eb82a210e054dc731e122f1fba1850b14d
Showing with 19 additions and 13 deletions.
  1. +19 −13 doc/guides/debugging/probes.rst
@@ -188,22 +188,28 @@ Using Segger J-Link
Once STLink is flashed with SEGGER FW and J-Link GDB server is installed on your
host computer, you can flash and debug as follows:

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

.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:gen-args: -DSTLINK_FW=jlink
:goals: flash
.. code-block:: cmake

Use the CMake ``debug`` target with the argument ``STLINK_FW=jlink`` to build
your Zephyr application, invoke the J-Link GDB server, attach a GDB client, and
program your Zephyr application to flash. It will leave you at a GDB prompt.
set(ZEPHYR_BOARD_FLASH_RUNNER jlink)

.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:gen-args: -DSTLINK_FW=jlink
:goals: debug
If you use West (Zephyr’s meta-tool) you can modify the default runner using
the ``--runner`` (or ``-r``) option.

.. code-block:: console

west flash --runner jlink

To attach a debugger to your board and open up a debug console with ``jlink``.

.. code-block:: console

west debug --runner jlink

For more information about West and available options, see :ref:`west`.

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

0 comments on commit c41320e

Please sign in to comment.
You can’t perform that action at this time.