variable not shown in debugger

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

variable not shown in debugger

ソリューションへジャンプ
2,031件の閲覧回数
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,724件の閲覧回数
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,725件の閲覧回数
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,724件の閲覧回数
lunminliang
NXP Employee
NXP Employee

What's the optimization level?

0 件の賞賛
返信
1,724件の閲覧回数
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,724件の閲覧回数
d_li
Contributor III

Just wanted to fix something,

should be saying

volatile i = 1;

0 件の賞賛
返信