How does profiler for MPC5566 dump data?

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

How does profiler for MPC5566 dump data?

878 Views
meowcat
Contributor I

I have a question regarding the profiler for the MPC5566. I am running CodeWarrior development studio IDE version 5.9.0 and am targeting the MPC5566. Looking at the documentation for the profiler provided by the help, it says:

 

  • Dump the profile results

 

Obviously, if you profile source code you want to see the results. The profiler dumps the results to a data file. The data is in a proprietary format understood by the profiler.

and the function declaration is:

long ProfilerDump(char* filename);

I'm unsure as to how the data dump takes place. Is profiling supported through the JTAG interface? Is the filename a location on the PC where the data will be dumped to? What interface does the dump take place over?

Labels (1)
0 Kudos
5 Replies

534 Views
TICS_Fiona
NXP Employee
NXP Employee

Hello Audrew

I checked in Classic CodeWarrior and Eclipse CodeWarrior, the latter supports profile, but it does not support MPC5566, it only supports MPC56xx series.

The compiler can generate profile information, but the debugger in Classic CodeWarrior is using external "pemicro\CW_ICDPPCNEXUS.exe". The profiler will work when you use CodeWarrior debugger only. The CodeWarrior debugger is not available for all targets but looks like profiler works when you debug on CodeWarrior IDE. If you debug/run on CE IDE using CodeWarrior software debugger (like e500) the profiler will work correctly.

So our tool does not support the feature you requests, please enable a hardware timer to get the function execution time.

Best Regards

Fiona Kuang

Technical Information & Commercial Support

0 Kudos

534 Views
trytohelp
NXP Employee
NXP Employee

Hi Andrew,

I've never played with the profiler feature.

Unfortunately we don't have an example dedicated to CW for MPC55xx/56xx V2.xx.

However I've found an example under CW for PA V8.8 which is in fact the same tool PPC but for another PPC family (Netcom).

The build tool chain is exactly the same.

Attached you will find the example delivered on this version.

The Readme.txt provides some information.

If you need more help, let me know.


Have a great day,
Pascal
NXP Technical Support

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

534 Views
meowcat
Contributor I

Hi Pascal,

Thanks for the response. I downloaded the example you attached. Next I created a project for the 5566 using the default settings. I am using the Profiler.Dwarf2.BE.UC.a library. I used the main.cpp file from the example project as a baseline in terms of using the profiler. I have attached my main.c file for reference. I am encountering a problem with the profiler. The code doing the profiling appears to call a library function old_getTBTime(). However this function contains the "Move From Time Base" instruction (0x7C8D42E6). Looking at the e200z6 core manual​, the supported mnemonics are listed in section 3.9. The manual states:

Instructions not listed here are not supported by the e200z6 core and signal an illegal, unimplemented, or floating-point unavailable exception.

The MFTB mnemonic is not listed among the supported instructions and according to the Section 6.2.1 of the PowerISA​, it appears to be deprecated. In the debugger, the instruction is listed as illegal and an exception is thrown. Is there another library I can use without this function?

0 Kudos

534 Views
stanish
NXP Employee
NXP Employee

Hello Andrew,

I'm afraid the profiler was intended to run on different architecture rather then e200.

(Profiler Library Notes for CodeWarrior(R) for PowerQUICC III(R), Release 1.0)

As far as I know this feature wasn't officially supported for CW for MPC55xx/56xx v2.x.

Anyway when I disassembled the library I can see there is DetectTimeMethod__Fv() which distinguishes

between:

old_getTBTime__FPUx    

and:

bookE_getTBTime__FPUx

based on Processor Version Register (PVR).

bookE_getTBTime__FPUx() uses TBU/TBL register for time stamps so assume this should work on e200 anyway.

I'd suggest you set breakpoint into DetectTimeMethod__Fv() routine at line:

cmplwi   r0,0x0000

and skip the bne *-16 instruction.

This way you set bookE_getTBTime__FPUx to be used for time-stamping instead.

You can at least try if profiling generates any useful date on your board.

Other option is to use a 3rd party debug solution which is capable of non-intrusive tracing (e.g. TRACE32 by Lauterbach)

Hope it helps.

Stan

0 Kudos

534 Views
trytohelp
NXP Employee
NXP Employee

Hi Andrew,

May be there is a problem with debugger too.

MPC55xx/56xx is using a Third Party Debugger (P&E StandAlone tool).

I will move the question to a colleague.

Regards

Have a great day,
Pascal
NXP Technical Support

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos