cancel
Showing results for 
Search instead for 
Did you mean: 

ModusToolbox PSoC 6 SDK

psoc6_beginner
Employee

Hi,

I am using modustoolbox with eclipse environment. I want to view some global variables live. Do you have such option in modustoolbox? Or some oscilloscope to view variables in real time?

 

Thanks, 

0 Likes
1 Solution
Rakshith
Moderator
Moderator

Hi @psoc6_beginner

You could add a watchpoint for the global variable. The global variable should show up in the Outline window as shown - 

Rakshith_0-1620024765370.png

Right-click on the variable and select Toggle Watchpoint. You can select if you want to break on variable read or write based on your preference and select Apply and Close. Now when you debug the project the debugger stops whenever the variable is read/written.

Thanks and Regards,
Rakshith M B

View solution in original post

0 Likes
3 Replies
Rakshith
Moderator
Moderator

Hi @psoc6_beginner

You could add a watchpoint for the global variable. The global variable should show up in the Outline window as shown - 

Rakshith_0-1620024765370.png

Right-click on the variable and select Toggle Watchpoint. You can select if you want to break on variable read or write based on your preference and select Apply and Close. Now when you debug the project the debugger stops whenever the variable is read/written.

Thanks and Regards,
Rakshith M B

View solution in original post

0 Likes
psoc6_beginner
Employee

Thanks!

I am looking for live watch not the breakpoint. For an example, while my code is running I want to view global variables, how they are changing? Even if the  update rate is 1-10msec, that is good. Do Cypress MCU supports such utility?

 

Thankyou.

0 Likes
Rakshith
Moderator
Moderator

Hi @psoc6_beginner

I do not think this feature is available in ModusToolbox. ModusToolbox uses GDB under the hood. As far as I understand, GDB requires the target to be halted to read the variable. 

Can you please let me know the reason for this request? You could print the variable onto a serial terminal at regular intervals or scale the variable appropriately and direct it to a GPIO which can then be traced using an oscilloscope or an analyzer. 

Thanks and Regards,
Rakshith M B
0 Likes