Skip to content
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

Activate JLink's Zephyr-aware debugging #145

Closed
wants to merge 1 commit into from
Closed

Activate JLink's Zephyr-aware debugging #145

wants to merge 1 commit into from

Conversation

maxgerhardt
Copy link
Contributor

@maxgerhardt maxgerhardt commented Apr 3, 2022

Per https://community.platformio.org/t/is-platformio-nrf52-debugger-zephyr-rtos-aware/26965.

Having this flag there will cause the JLinkGDBSever to load GDBServer/RTOSPlugin_Zephyr.dll (or .so) and discover Zephyr-RTOS threads and communicate that to GDB. I.e, Zephyr thread-aware debugging can be done.

A precondition to this though is that

CONFIG_THREAD_MONITOR=y
CONFIG_DEBUG_THREAD_INFO=y

is activated in the zephyr/prj.conf, otherwise the necessary symbols won't be there for the JLink tool to find (ERROR: Mandatory symbol _kernel_openocd_offsets not found). This should be documented somewhere.

grafik

@maxgerhardt
Copy link
Contributor Author

Note: For debug servers / probes using OpenOCD, a separate modification needs to be made: https://community.platformio.org/t/is-platformio-nrf52-debugger-zephyr-rtos-aware/26965/3?u=maxgerhardt. This is however untested and not touched on in this PR. I don't even know if we can just add this -rtos auto flag externally in the OpenOCD invocation or if .cfg files really need to be touched.

@ivankravets
Copy link
Member

Does it make sense to check if framework = zephyr is set in the config?

@maxgerhardt
Copy link
Contributor Author

maxgerhardt commented Apr 4, 2022

Oh actually yes. Especially if mbed-os etc. is possible and the JLink software has other plugs for that too. By default it has ChibiOS, embOS, FreeRTOS and NuttX, so not the Keil RTX5 used in mbed-os, but there are extensions for that..

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants