AnsweredAssumed Answered

Debug questions: Peripheral registers, stepping through context switches

Question asked by SCOTT MILLER on Nov 6, 2017
Latest reply on Nov 13, 2017 by SCOTT MILLER

I want to start by saying that the FreeRTOS task-aware debugger is a huge step up from CodeWarrior.  It's the main reason I switched.  The download behavior is also more intelligent and it's already saving me time by not having to download the same code over and over again for repeated debug sessions.

 

I'm running into some new headaches with MCUX, though.  What's the deal with the peripherals view?  Registers only shows CPU internal registers now.  The Peripherals+ view lets me bring up a peripheral in the memory view (it's slow, though, and takes 5 seconds to react to a click) and it doesn't show as much detail as the CW registers view, but it's something.  But you can't use it to watch anything - as soon as you step to the next instruction, the view clears.  You have to click on the view again and then it resets and you have to scroll back through everything to find your place.

 

Is this the right view to be using?  I can't imagine that it's regressed that far backwards in functionality since CW 10.  It also clears all of the memory views every time the debug session is restarted.  I find that I can follow specific registers in the expressions view, which is something that didn't seem to work reliably in CW 10, but of course that doesn't give me any decoding of fields.

 

The other thing I'm having trouble with is that I haven't found a way to step continuously across context switches.  This morning I'm troubleshooting a DMA problem where the transfer somehow continues when it should finish and clear ERQ, and I just want to step one instruction at a time while I watch the registers.  As soon as it hits a context switch, the system resumes running and I miss the critical events I'm watching for.  Surely there must be a way to follow execution through interrupts.  How do I do this?

 

Thanks,

 

Scott

Outcomes