HC12X, CW5.1 very slow while debugging

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

HC12X, CW5.1 very slow while debugging

2,598 Views
Eric_t
Contributor III

Hi,

I am using CW5.1, mc9s12xdt512 with 16MHz crystal and pemicro multilink universal rev.D.

My PC is i5 with windows 10 and 8GB RAM.

I have install the latest windows driver for multilink (12.7) and the latest firmware (10.17)

I have severe problem with step debugging speed.

Step over is too slow and sometimes needs 3 to 5 second.

The follow links show the debugging speed of CW5.1. and NoICE12 debugger

for CW5.1:      https://youtu.be/poiE5IUyAhE
for NoICE12 : https://youtu.be/B1dM2948bxM

As you can see, for the same code, CW5.1 needs 45 seconds while NoICE12 needs only 17 seconds.

Unfortunately, CW5.2 has the same speed as CW5.1.  

Please note that CW5.1 and NoICE12 run on the same PC, the same target board and they use the same multilink universal.

Does anyone know how can I improve the debugging speed of CW5.1?

Thank you. 

0 Kudos
10 Replies

2,340 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

HI Eric

This is a P&E debug interface issue, this is answered by P&E already

PEmicro | Experts in Embedded tools for Flash Programming and Development 

Besides, some customer feed back their slow debug speed was caused by some certain virus defenders. once they disabled the virus defender, the debug speed got back to normal. Please also check this point.


Have a great day,
Jun Zhang

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

2,340 Views
Eric_t
Contributor III
Hi Jun Zhang
Pemicro response is the follow:
Which means the issue is HiWave within CW5.1 as the issue. That is made by NXP/Freescale. 
We only provide the interface to the multilink so that IDEs can communicate to the chip. 
But we do not control what commands are being sent and how that data is being displayed

I have uninstall mcafee antivirus, and I also I have disabled the windows on line defender.

Unfortunately no improve on debug speed. 

 
I have made an other test.
The same project, build for mc9s12xdt512 and large model, the debug speed is too slow, it need 40 seconds.
The same project, build for mc9s12dg256 and bank model, the debug speed is much faster, for the same code needs 25 seconds, but it is still slow compare it with NOICE IDE.
The same project, build for mc9s12xdt512 and large model, the debug speed of NOICE is 17 seconds.
The same project, build for mc9s12xdt512 and large model, and large amount of variables on watch window, the debug speed of NOICE is 22 seconds (almost twice of speed of CW without watch window).
 
The conclusion is that the memory model has severe impact on debugging speed.
 
Also I have noticed that watch windows with large variable structures, have minimum effect on debugging speed of CW. Probably the bottleneck of delay is somewhere else.
 
Tomorrow I will attach a project that demonstrates the problem, so you can test the debug speed for your side
Thank you
0 Kudos

2,340 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Eric,

You said  you would attach a project to show problem, but I haven't heard from you for some time. Have you solved your problem already?

If not yet, please send me your project, and please let me know how to reproduce your debug slow issue? for example how did you measure the 40s debug speed?

Thanks.

Jun Zhang

0 Kudos

2,340 Views
Eric_t
Contributor III

Hi Zhang,

Unfortunately I have not solved the problem.

I have attached a project "mc9s12xdt512.zip" that demonstrates the problem.

Also I have upload two videos:

for CW5.1:      CW5 1 65 seconds - YouTube 
for NoICE12 :  NoICE12 31 seconds - YouTube 

As you can see, in the routine "main_Loop();", for one loop, CW needs 50 seconds while NOICE needs only 27 seconds.

Please note how much faster is NOICE when RUN, hit to breakpoint occurs. It look like as if NOICE is 10 times faster to CW.

One different between CW and NOICE is that CW for some code lines, step-over is very fast and for other code lines is extremely slow.

On the other hand, NOICE has much more stable step-over speed, the differences in code lines have minimal effect on step-over speed.

What can I do to improve the debugging speed of CW?

Thank you

0 Kudos

2,340 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Eric,

I checked your project and video, for CW5.1, the debug speed you experienced is normal.

If full chip simulation mode (without connecting board), the speed is faster. but with connecting board, it's slower.  I will escalate it as a "improvement"  to PM. but there is no option to improve it so far.


Have a great day,
Jun Zhang

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

2,340 Views
Eric_t
Contributor III

Hi Zhang

For the signed long comparition comparison:

if (Global_Meter_Auxiliary < - (signed long) Device_Config.K)

and the signed long subtraction

Global_Meter_Auxiliary -= (signed long) Device_Config.K;

CW5.1 needs almost 3 seconds.

Is this the expected speed?

I have tested the same code with vey old 8bits micros such as NEC, AVR with an old IAR that dates from 2008.

The debug speed is  much faster.

I was using CW3.1 & mc9s12dg256 controller between 2006 and 2014 with a windows XP PC

As far as I remember there was no issue with the debugging speed.

I will try to find a windows XP PC to test the debugging speed.

Thank you

0 Kudos

2,340 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

On my side I try this code with win10, the speed is same as yours.

0 Kudos

2,340 Views
Eric_t
Contributor III

Hi Zhang

It is really difficult to find a Windows XP PC that works properly.

I was thinking that the problem may related with the BDM clock, so I made the following test:

Target board: mc9s12xdt512, Crystal 16MHz, PLL circuit mounted but firmware does not use it. 

I have burned mc9s12xdt512 controller with NOICE.

Then I close NOICE and I open HiWave of CW.

I have load symbols and test the debugging speed.

The debugging speed improved. Instead of 47 seconds for one loop, now it needs 28 seconds.  

I have change the 16MHz crystal with another at 29MHz and I repeat the tests.

When I burned the controller with CW5.1, the debug speed for one loop with crystal 16MHz it needs 50 seconds while with crystal 29MHz it needs 47 seconds

When I burned controller with NOICE and load symbols with CW5.1, the debug speed for one loop with crystal 16MHz it needs 28 seconds while with crystal 29MHz it needs 25 seconds.

Probably the problem related with BDM clock. 

If you need I can upload a video.

Thank you

0 Kudos

2,340 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Eric_t d

I believe your testing result. increasing BDM clock can increase debug speed.

I currently don't have xp computer.

8 years ago when I used my XP computer with hiwave, the debug speed is similar as I use win7.

Jun Zhang

0 Kudos

2,340 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Thanks. I got your project. I will find a demo board tomorrow and test your issue.

0 Kudos