Forum: System Workbench for STM32

Not displaying variables in the Expressions

Not displaying variables in the Expressions.
When you add a variable (eg, “period”) appears in the Expressions error - Error: Multiple errors reported \ Failed to execute MI command: -var-create - * period Error message from debugger back end:. -var-Create: unable to create variable object \ Unable to create variable object
How to see the value of a variable(“period”)?

Hi,
No way to reproduce this issue.
Are you using Windows7?
What is the SW4STM32 version?
Are you using a custom/ST board?
Are you using debug/compiler optimizations?



Hi,
Right-click on the project >> Properties >> C/C++ Build >> Settings >> Tools Settings tab >> MCU GCC Compiler >> Optimization or Debugging
Anyway, I faced the same issue.
To get the variable displayed in the Expression tab, I must remove the variable that is failing and then I add it again with the following procedure :
- Double-click on the variable in the C code to get it highlighted;
- Right-click on this highlighted variable and select “Add to Watch Expression ...”
How did you add the period variable?


Thank you, after optimizing it worked !!cool