@@ -188,22 +188,28 @@ Using Segger J-Link
188188Once STLink is flashed with SEGGER FW and J-Link GDB server is installed on your
189189host 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
208214If you configured your Zephyr application to use `Segger RTT `_ console instead,
209215open telnet:
0 commit comments