When a variable satisfies some condition

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

When a variable satisfies some condition

4,110 Views
smecolive
Contributor I

When a variable satisfies some condition, I want pause or break,it is like a trace function on a variable,are there any way?thanks a lot

0 Kudos
Reply
4 Replies

4,098 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi smecolive 

You can use condition breakpoint. 

see attached video. program stops when variable i equals 100.

Hope this helps,

Jun Zhang

 

0 Kudos
Reply

4,094 Views
smecolive
Contributor I
感谢回复。对于条件断点的相关使用我已经弄清楚了,但是我想知道的是对于单一变量(或者信号)如何设置这种类似条件断点的监测,当变量(或者信号)达到某种条件时中断或者输出特定信息。另外,类似这种的CW的功能的使用视频还有更多吗,我以及身边的同事想更多地学习Code Warrior的使用,十分感谢!
0 Kudos
Reply

4,085 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

If you want to monitor variable or memory, I suggest you using watchpoints.

You can set a watchpoint from the:
• Breakpoints view
• Memory view
• Registers view
• Variables view


For more information, see attached doc.  3.36 Watchpoints.

The video I sent you is made myself for your question. So no additional existing videos.

Have a nice day,

Jun Zhang

0 Kudos
Reply

4,082 Views
smecolive
Contributor I

thanks for your reply,I will read the file you sent me.

Best regards.

0 Kudos
Reply