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 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: host computer, you can flash and debug as follows:
Use the CMake ``flash`` target with the argument ``STLINK_FW=jlink`` to Use CMake with ``-DZEPHYR_BOARD_FLASH_RUNNER=jlink`` to change the default OpenOCD
build your Zephyr application. runner to J-Link. Alternatively, you might add the following line to your
application ``CMakeList.txt`` file.
.. zephyr-app-commands:: .. code-block:: cmake
:zephyr-app: samples/hello_world
:gen-args: -DSTLINK_FW=jlink
:goals: flash
Use the CMake ``debug`` target with the argument ``STLINK_FW=jlink`` to build set(ZEPHYR_BOARD_FLASH_RUNNER jlink)
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.
.. zephyr-app-commands:: If you use West (Zephyrs meta-tool) you can modify the default runner using
:zephyr-app: samples/hello_world the ``--runner`` (or ``-r``) option.
:gen-args: -DSTLINK_FW=jlink
:goals: debug .. 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, If you configured your Zephyr application to use `Segger RTT`_ console instead,
open telnet: open telnet: