Debugger architecture and troubleshooting resources

Showing results for 
Search instead for 
Did you mean: 

Debugger architecture and troubleshooting resources

Senior Contributor I

I've had trouble with debugging under MCUX (and CodeWarrior before that) for years, particularly with P&E hardware -  my main debug interface for Kinetis is a P&E Cyclone ACP.

The problems only seem to crop up with complex projects that are hard to share with NXP and P&E support, and rather than constantly asking for help, I'm hoping to learn more about the whole debugger system so I can do more troubleshooting on my own.

My most common problems involve the IDE failing to display variables and getting progressively slower as I try to step through anything. Very often I'll see the global variable view start to populate - I can even expand the hierarchy by clicking on arrows - but the names and values won't actually ever display. Sometimes I can mouse over the fields and see their contents, but usually not.

Is MCUX's debug architecture documented somewhere? What other resources should I be looking at? The documentation I've found for gdb isn't great, and it's hard to find out how MCUX interacts with gdb and where P&E's drivers come in.

Where would I find information on how to interpret logs like this?

Number of threads 9 qfThreadInfoIterator: 0
Number of threads 9 qfThreadInfoIterator: 9
rsp_qThreadExtraInfo - Thread extra info grabbed - result: 4E6574776F726B
Number of threads 9 qfThreadInfoIterator: 0
Number of threads 9 qfThreadInfoIterator: 9
rsp_qThreadExtraInfo - Thread extra info grabbed - result: 417564696F

Or this?

553,177 (gdb) 
553,177 21981-data-evaluate-expression --thread 1 --frame 0 &((dma_tcd[0][0]).BITER)
553,177 21974^done,value="0x1fff3b08 <dma_tcd+8>"
553,177 (gdb) 
553,177 21982-var-delete var3455
553,177 21975^done,value="0x1fff3b0c <dma_tcd+12>"
553,177 (gdb) 
553,178 21976^done,value="0x1fff3b10 <dma_tcd+16>"

Where do these come from, and where do I find relevant configuration settings? There are "GDB Client Settings" in the debug configuration "Debugger" pane, there's the GDB command file in the "GDB Debugger" pane, and GDB run commands in the "Startup" pane at the very least. Are there more? What sequence are those run in? Do they all work the same way?

What's the difference between "MCUXpresso IDE PEMicro Interface Hardware Debugging (DSF) Launcher" and "GDB PEMicro Interface Hardware Debuggin (DSF) Launcher" and why would I choose one over the other? What debugger components are standard to Eclipse, which ones are NXP-specific, and which are independent open source tools? What APIs and protocols are used between them?

And before anyone says it, reinstalling MCUX or creating a new workspace is not a solution. It might clear things up for a few days or even a few weeks, but the problems always come back.



Labels (1)
Tags (2)
0 Kudos
1 Reply

Senior Contributor IV

Both GDB and Eclipse are really only described by their sources... But they are both open source...

Something on Eclipse (DSF): 

Your 'gdb' list from above - this is GDB 'MI' (machine interface) which can be found here:

GDB/MI (Debugging with GDB) 

0 Kudos