variable not shown in debugger

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

variable not shown in debugger

Jump to solution
1,992 Views
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.

Labels (1)
0 Kudos
Reply
1 Solution
1,685 Views
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.

View solution in original post

0 Kudos
Reply
4 Replies
1,686 Views
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 Kudos
Reply
1,685 Views
lunminliang
NXP Employee
NXP Employee

What's the optimization level?

0 Kudos
Reply
1,685 Views
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 Kudos
Reply
1,685 Views
d_li
Contributor III

Just wanted to fix something,

should be saying

volatile i = 1;

0 Kudos
Reply