-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JLink Thread-Aware Debugging (RTOS Plugin) #23520
Comments
I definitely look at this. J-Link is industry standard debug probe - it's no-brainer. Quick examination of existing plugins (embOS, FreeRTOS, ChibiOS) shows simple API to implements:
Regarding licencing, it would be better to ask SEGGER for their PoV. |
And of course, in meantime, there is also possible of using gdb python API to examine thread structures. |
@pkral78 - could you provide a link to that gdb python information? |
@richey-v You have to define new gdb command that examine kernel structures. There are many references on internet, search for python gdb scripting. Also setting |
I have a couple of commands in my .gdbinit to help when debugging with JLink. They are not polished (i.e. PC/LR/PSP is wrong for the currently running thread), but maybe this can be useful to others. I posted them here: https://gist.github.com/vaussard/581d62032670f118947edb2b503a18c4 Compile with The JLink plugin is also on my list, but I never managed to find some time to do it. So I am highly interested if someone manages to do it. |
@JordanYates and @pkral78 if you were willing to write an implementation and test it with Zephyr, then I could send a request to Segger to include this in the J-Link Software and Documentation Pack download. |
According to Segger, they are working on it: |
Any news when it will available? |
As of version 3.22d, Ozone is able to deal with Zephyr threads! To activate it, type |
As of JLink 7.20, Zephyr is supported: |
Anyone having any success running the JLink Zephyr RTOS Plugin? I tried the following, and failed:
|
Make sure to set |
SEGGER J-Link is supported as a flash runner for a substantial portion of boards supported by Zephyr (131 across nrfjprog and jlink). However there is currently no support for thread-aware debugging using the suite of debug tools that use JLink as a backend (arm-none-eabi-gdbserver, J-Link GDB Server).
Those using external SEGGER jlink based flash tools are forced to choose between using JLink as their backend (and not having thread-aware debugging) or using openocd, which requires overwriting drivers on windows and appears to have been largely superceded by pyocd (Unfortunately pyocd does not support SEGGER J-Link Probes).
This is a long way of saying that Zephyr should support thread-aware debugging using the J-Link suite of tools.
RTOS-Awareness is added to J-Link through writing a custom plugin using a proprietary SDK (https://www.segger.com/products/debug-probes/j-link/tools/j-link-gdb-server/thread-aware-debugging/)
Writing a custom plugin appears to be relatively simple from the example provided with the SDK, but the licensing terms are not great. In short, publishing the source of the plugin is prohibited without the express consent of SEGGER. Only the compiled .dll or .so files are allowed to be distributed. (I am unsure as to whether the license file is included in this agreement, otherwise I would attach it).
Assuming a plugin is written, by myself or others, what would be the appropriate method to distribute it such that it can be used? There doesn't appear to have been any resolution to #7516
The text was updated successfully, but these errors were encountered: