variable not shown in debugger

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

variable not shown in debugger

跳至解决方案
2,028 次查看
d_li
Contributor III

Below is the function in question.

INLINE void osErrorDebug(){ 
    volatile i = 0; 
    DEBUG(); 
    while(i){ //modify i to 0 with to continue
        NOP() 
    } 
} 

 

Using the debugger shell, there are no variables listed for this function. Similarly in the variable window in the debug perspective, there is nothing either. The optimization level under StarCore C/C++ Compiler is set to 0.

This function can also be found in ${CW_Install}\SC\StarCore_Support\SmartDSP\include\arch\starcore\common\starcore_macros.h

Any insight into how to make this variable available to manipulate would be helpful.

标签 (1)
0 项奖励
回复
1 解答
1,721 次查看
d_li
Contributor III

For anyone who might read this in the future, the board that was running this code had hardware issues which were causing a lot of unexpected/explainable behavior including this.

在原帖中查看解决方案

0 项奖励
回复
4 回复数
1,722 次查看
d_li
Contributor III

For anyone who might read this in the future, the board that was running this code had hardware issues which were causing a lot of unexpected/explainable behavior including this.

0 项奖励
回复
1,721 次查看
lunminliang
NXP Employee
NXP Employee

What's the optimization level?

0 项奖励
回复
1,721 次查看
Daniel_Popa
NXP Employee
NXP Employee

Hi David Li,

I'm not sure which CW version and StarCore target you're using. I tried on a B4860 target and just copy paste this function into a small stationary project created via wizard and run on the SC3900 ISS flavour of the CW simulator. Furthermore, I'm assuming you have compiled your project with debug information ON.

Here's what i get:

DS_evaluate.png

As can be seen, the debugger works ok. It's able to show the local i variable and via the Debugger Shell I'm able to display its content or to modify it.

As a primary suggestion, try to create a small project without SmartDSP OS and see if that works in your case. It should :-)

If that is the case, then we investigate further.

Best regards,
Daniel

0 项奖励
回复
1,721 次查看
d_li
Contributor III

Just wanted to fix something,

should be saying

volatile i = 1;

0 项奖励
回复