Tracing unusable with MCF54418?

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

Tracing unusable with MCF54418?

876 Views
michaelmeier
Contributor II

(I have already asked this question over in the Coldfire community. It has been pointed out to me that this might be a better place to ask)

 

I have recently received a PE Tracelink Debugger for use in a project which employs an MCF54418 Coldfire processor.

 

I have been able to set up a CodeWarrior Download connection for use with my Tracelink debugger. In the settings dialogue, I am presented with very little options with respect to tracing in the "Trace and Profile" tab. I am able to turn tracing on globally, via a Setting called "Enable Trace and Profile". I'm also able to select two user options and select whether I want a data trace or not. I am able to use the Tracelink debugger to download my program to my processor and to use it for normal debugging.

 

Collection of trace data seems to be unconditional. Whenever I run some code, say from one breakpoint to the next, a trace is collected. This is not necessarily what I want. My processor is connected to an industrial bus and I need to collect traces without disturbing the processor, so breaking is not an option.

 

Upload of trace data from the Tracelink to my PC works in reasonable time. If I use larger buffer size with the Tracelink debugger, currently I'm using 32 MBytes, Codewarrior takes about 15 minutes to analyse my trace. In this time I'm not able to continue debugging.

 

Even though I turned off data tracing, my trace contains "data" trace points, the value of which is always 0xffffffff.

 

Clearly, in this state of affairs tracing is not helpful at all.

 

This leads me to two questions:

- Is it possible to collect trace data conditionally? (Say by starting when code execution reaches some point A, stopping when it reaches point B)

- Is it possible to speed up the horribly slow trace analysis?

Labels (1)
0 Kudos
7 Replies

467 Views
michaelmeier
Contributor II

Hi Pascal

My board ist custom made. The BDM and trace signals are connected to a standard layout 0.1" BDM header on a helper board via board-to-board connectors. Trace length from processor to BDM connector is about 20 mm.

Software info is below:

Detail information for product "MCU Wizard and Tools Plugins" version "10.3.0.FSL_b04030-A3"

status: "Activated"

License model: "class com.freescale.core.ide.license.flexlm.FlexlmActivate11"

Contact Email: licensing@freescale.com

Register URL: http://www.freescale.com/cwregister

Purchase URL: http://www.freescale.com/cwmcu10

FlexLM Eval Period: 15 day(s)

GTL Server: gtlsrvr.metrowerks.com

GTL Port: 80 (8,080)

Wants Host ID: true

License file path: C:\Freescale\CW MCU v10.3\MCU\license.dat

flexlmFileLocator: null

flexlmFile: ${MCU_TOOLS_HOME}/license.dat

License file URL: file:/C:/Freescale/CW MCU v10.3/eclipse/../MCU/license.dat

Error String:

Feature Keys:

FEATURE ProfessionalEditionMCU 10.3, status : LASTS_PERMANENT

Alternate Keys:

(no keys)

LM_PATH=null

License file Content (C:\Freescale\CW MCU v10.3\MCU\license.dat):

INCREMENT ProfessionalEditionMCU metrowks 10.300 permanent uncounted \

  FBE43188480A VENDOR_STRING="Professional Edition MCU 10.3" \

  HOSTID=FLEXID=9-717fde0f ISSUER="Freescale Semiconductor" \

  ISSUED=5-apr-2013 NOTICE=Distributor \

  SN=FSL-326d-7d28-13d1-daa3-d576-f01 START=4-apr-2013 TS_OK

Cheers,

Michael

0 Kudos

467 Views
trytohelp
NXP Employee
NXP Employee

Hi Michael,

I don't have the Tracelink interface.

We released the MCU V10.4 in Q2 and the MCU V10.5 is planned for end of September.

I will check with debugger team to have their comments regarding this problem.

Keep you informed.

Pascal

0 Kudos

467 Views
michaelmeier
Contributor II

Thank you for keeping me posted. I have already invested $1000 and about 2 man-days into this issue and not found any satisfactory solution.

0 Kudos

467 Views
trytohelp
NXP Employee
NXP Employee

Hi Michael,

Sorry for the delay - yesterday was bank holiday -
I got feedback from debugger team regarding this Trace issue.

See below their comments:

++++++++++++++++++++++++++++

The customer would like to collect trace data conditionally. This could be done with tracepoints, but unfortunately, these are not supported on ColdFire V2-V4 (as seen in the “Profiling and Analysis Users Guide”, tracepoints can be set on ColdFire V1, Kinetis and HCS08 processors). Also, the time needed for analysis depends on the size of the trace collected, so if the customer used 32 Mbytes as buffer size and the buffer is full, the process duration increases (by default, the buffer size is 128 KB, and for a full buffer this size, the analysis takes a few seconds). A recommended size for the buffer would be 2 MB, which would take less than 15 minutes, but otherwise there is no way to improve the analysis time.

There is also a bug in CW regarding ColdFire V2-V4: if trace is enabled and the user deselects “Enable Trace and Profile”, nothing happens and the trace is still enabled. A workaround would be to manually disable trace collection.  I don’t have the customer’s processor to test this, but this should be done through the debugger shell, by giving the following command:

reg CSR2 =40

++++++++++++++++++++++++++++

Regards

Pascal

0 Kudos

467 Views
michaelmeier
Contributor II

Hi Pascal

Thank you for checking back with the debugger team.

It is a shame that the more recent CF V4 processors do not support a feature so necessary for real time work.

I have not yet experienced the bug you mentioned. Maybe this is because I have to debugger configurations. One is the regular configuration which I use for non-tracing regular program operation. It uses a USB TAP. The other configuration is the one with the Tracelink. In this configuration I always have tracing enabled.

I would still like to get the most interesting possible results out of my Tracelink debugger. The long analysis time is very annoying, especially with large buffer sizes. This issue is exacerbated by the fact that I might need to step through multiple breakpoints until I reach the bit of code I want to profile. I need to wait the full analysis time for every breakpoint, otherwise I can't continue. I also can't cancel the analysis as after cancelling, proceeding is often not possible.

I have two questions regarding using the Tracelink Debugger:

a.) Can I instruct CodeWarrior to collect or not collect trace data? I need to step through multiple breakpoints to reach the point from which I want to start my analysis. Ideally, I would be able to load the program, switch of tracing, step through these breakpoints, enable tracing again and then run the code segment I want to trace. Please note that the start and stop trace buttons (very close to the start, stop, step, etc. buttons) are grayed out.

b.) How much memory does the Tracelink debugger use while tracing? I believe that our core running at 250 MHz is outputting 4 bit data @ 125 Mhz. If the Tracelink stores this data verbatim, without any meta information, I would expect a 128 kbyte buffer to last 128 kbyte / (0.5 byte / (1 / 125 MHz)) ~ 2 milliseconds. However, I have no information how Tracelink actually stores the values, if they are further compressed or if meta information such as timestamps is added.

Cheers,

Michael

0 Kudos

467 Views
trytohelp
NXP Employee
NXP Employee

Hi Michael,

I've shared your last comments with the debugger team.

See below their feedbacks.

++++++++++++++++++++++++++++

I don’t understand what the customer means about the second configuration. As far as I know, when creating a project, the default configuration for trace is for it to be disabled. That means that he could run the project with the trace disabled from start, and then enable it after reaching the breakpoint from which he wants to collect trace. The start/stop buttons are indeed disabled, but the user can still open the debug configurations and disable (or enable, as wanted) the Trace and Profile, and then click Apply. If he can’t disable the trace collection (as I mentioned before, he might encounter the bug where deselecting the Trace and Profile in the configuration has no effect) he could try the manual bypass I gave in the previous message.

Tracelink uses the buffer size given by the user to store trace data from the processor. I don’t think any other information is added by the tracelink, but the analysis time includes the trace data decoding, so even though you might get the raw data in the amount of time you computed, the decoding  will still need to take place and take a while.

++++++++++++++++++++++++++++

Regards

Pascal

0 Kudos

467 Views
trytohelp
NXP Employee
NXP Employee

Hi Michael,

Before to investigate the problem can you provide me more details regarding the software and hardware used.

I need to know the tool version you're using and the board/interface.

To do that you must:

  Under CodeWarrior IDE (classic)

      Start the IDE and click on Help | About Freescale CodeWarrior.

      Click on Installed Products 

      Provide us all info displayed.

      Or you can save them in a txt file.

  Under Eclipse IDE

    1-      Start Eclipse and click on Help ¦ Freescale Licenses

      The Status column gives the status of the license.

      Under Product, select it and click on details.

      A new dialog show up giving license details.

      Provide us all info displayed

    2-      Start Eclipse and click on Help ¦ About CodeWarrior Development Studio

      Under Installed Products, you will see the version used.

On my side I've a TWR-MCF5441x board with a MCf54418 device.

This board is running fine under OSBDM Jatg and USBTap interfaces.

I think I could test/reproduce the problem on my side.

Regards

Pascal

0 Kudos