Hi,
I'm debugging a FreeRTOS sample project on i.MX1024EVK using MCUXpresso version 11.7.1. Using JLink SWD, the 'Select RTOS plugin' is set to 'GDBServer/RTOSPlugin_FreeRTOS'. Optimization is set to none (-O0). When debugger is stopped, the 'Debug' view in MCUXpresso is populated with the correct number of tasks, but they all have the same backtrace. This seems like it would be a frequently reported issue, since I have a fairly default setup, using the EVK with a sample project, but I can't find a similar reported issue anywhere. The GDB command line in 'Debugger Console' reports the same results. This issue is observed with multiple sample and custom projects.
Any help appreciated.
lemk
Hi Edwin,
Thanks for your reply. I'm using JLink, not LinkServer. The all-stop/non-stop option is not available from what I can tell. Per the 'IDE FreeRTOS Debug Guide', the only configuration I've changed in the 'JLink Debugger' configuration is selecting 'GDBServer/RTOSPlugin_FreeRTOS' for 'Select RTOS Plugin'
Thanks,
lemk
Hi @lemk34,
I'm not able to reproduce this issue. As you can see on the following screenshot, I am able to see the proper backtrace for each one of the tasks from the hello_world_freertos example:
It is worth noting that I am using an RT1020EVK with the onboard debugger, but this goes to show that there is no limitation about the backtraces not displaying properly. I am also using MCUXpresso IDE version 11.9.0. Please try with the newest version of the IDE, as bugfixes and improvements are constantly being applied to newer versions of our IDE.
BR,
Edwin.
Hi Edwin,
Because of your last email, I switched to the onboard debugger and was able to view each task's backtrace successfully. Unfortunately that isn't an option for our custom board. But I shifted focus to the JLink RTOS plugin, and upgraded the JLink software and am now successful. A couple of recent comments in the release notes might have resolved the issue (RTOSPlugin for FreeRTOS did not report correct task registers. Fixed.). ¯\_(ツ)_/¯
Thanks for your responses.
lemk
Hi again @lemk34,
I'm glad to hear that you were able to solve this problem! Interesting that the issue was present because of the JLink drivers. Anyhow, thanks for reporting this, as I am sure it can prove useful for other clients in the future that might get similar issues with the backtrace on Jlink RTOS Plugin.
Have a nice day. c:
Edwin.
Hi @lemk34,
Quick question. Are you certain you are debugging on All-Stop mode (rather than the default Non-Stop mode)?
This is one of the steps needed to do thread-aware debugging for FreeRTOS applications, for example. I got this from the MCUXpresso IDE FreeRTOS Debug Guide, which if you haven't read, I highly recommend you do so. You can find this guide on your MCUXpresso IDE installation path, by default it should look like this: <C:\nxp\MCUXpressoIDE_11.9.0_2144>.
BR,
Edwin.