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>
This commit is contained in:
Georgij Cernysiov 2019-04-11 18:30:24 +02:00 committed by Kumar Gala
commit c41320eb82

View file

@ -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 (Zephyrs 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: