Debugging Zephyr applications with JLink

Answered

Debugging an Zephyr application involves using the Embedded GDB Server as shown in the example (Section 14, Debugging). But I see some shortcomings when I try following this method. For one, the hex or the elf file isn't loaded into the flash memory. Typically when this were done with the west tool, the following arguments are passed onto the gdb executable `-ex 'target remote :2331' -ex 'monitor halt' -ex 'monitor reset' -ex load`. I can do this manually on after the GDB executable starts, but I can provide this when prior to calling the debug. Is there any possibility to provide these arguments in the Embedded GDB Server?

 

 

1 comment
Comment actions Permalink

Hello!

In the Embedded GDB Server configuration you can provide these arguments using the following fields:

  1. The 'target remote' args field.
  2. The Reset command field under the Advanced GDB Server Options section.

Also there is the Download executable option which controls when to download the executable binary to the target device (the target-download command).

And you can always specify such arguments in the .gdbinit file - https://www.jetbrains.com/help/clion/configuring-debugger-options.html#gdbinit-lldbinit

0

Please sign in to leave a comment.