So I finally decided to improve my debugging facilities to obtain at least some info on the state of the system. I'll document my findings as I figure things out. This one will be about threads.
I'm definitely not the first person to want to do that. A brief search revealed a nice source of info: DZone, as usual. Most of the info sources deal with specific manufacturer ICs, but I wanted something more general. But DZone article at least taught me the keywords what to search for. Which led me to this article on MCUonEclipse. It deals with NXP Design Studio, but under the hood it's good old Eclipse. All we need from there is:
-rtos GDBServer/RTOSPlugin_FreeRTOSWhich we have to add to "Other options" in our JLink debug configuration. And voila:
This is JLinkGDBServer specific, for OpenOCD there are other solutions out there.
Thread numbering is somewhat weird, but it's ok for now. For each thread debugger is able to show state, priority and load variables. Great success!
Next we should figure out tracing stacks and heaps. Basically, memory status
No comments:
Post a Comment