MQX Tools best way to post mortem dying task?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MQX Tools best way to post mortem dying task?

888 Views
Cdn_aye
Senior Contributor I

Hi

In the past I have used TAD to look at the memory pools, stack and so forth. The plugin is installed and working. This yields some information but I am getting a stoppage at some point in a task, and I can't determine why. Is there a recommended way to check this, perhaps using the MQX Tools? I have never used MQX Tools before so any advice would be appreciated.

As I understand this, I just enable Kernal logging in the user_config.h file and rebuild the mqx libraries. Is this correct or is there more to this, or would you suggest another method?

Thanks

Robert

0 Kudos
4 Replies

417 Views
DavidS
NXP Employee
NXP Employee

Hi Robert,

A good starting point would be the FSL_MQX_PerTool_getting_started.pdf in C:\Freescale\Freescale_MQX_4_0\doc\tools\cw folder assuming you are using CW10.

Regards,

David

417 Views
Cdn_aye
Senior Contributor I

Hi David

That was a great help; thank you.

Regards

Robert

0 Kudos

417 Views
Cdn_aye
Senior Contributor I

Hi David

I did as outlined in the manual wrt the bsp and can see this is exactly what I need. But there is a missing component. How to set up the my app to use/qcquire the data; this is not automatic?

There is a partial example and a reference to some fields that should be used in the refer manual. But I have not found any complete examples of how to use the fields or even where doc is for the performance fields in the structure. From what I can see in the screen capture in the refer manual, I need to add some MQX _klog_** calls, but which ones are not given.

Can you point me to an example please, or do I create a temp example using the wizard and extract the code from there?

Thanks again

Robert

0 Kudos

417 Views
DavidS
NXP Employee
NXP Employee

Hi Robert,

The best place to start messing with the KLOG is in the MQX4.0/mqx/examples/klog .

It is very simplistic but demonstrates the things should be working.

I then cut-n-pasted the view lines of code (don't forget the #includes too) into a gpio example.

I'm not expert with KLOG (yet...) but it seems that it is a one time buffer so you need to turn it on and off around the area of code you want to evaluate.  It kind of is a high level task trace (note I didn't say function....so it doesn't show the stack trace of a printf() call).  Honestly I'm not certain it is the tool to help with your issue.

I think you need more of a real instruction trace tool that lets you turn on and off where you want to trace and be able to post process it.

I'll play some more with this tool and report successes and failures.

For fun Erich Styger has good stuff on trace amoungst other topics on a blog:

trace | Search Results | MCU on Eclipse

Regards,

David

0 Kudos