Symbols in the Watch window may not be updated while the application is running due to a disabled Real-time update.
Most often the reason for the incorrect symbol value displayed in the Watch
window is, that the symbol's debug information (address, size, format,...) is
loaded from the wrong Symbol File when more than one symbol file is
specified for one application.
1. Step through the disassembly of your code.
2. Make sure that the code is executed.
3. If that is not the case, you can use the volatile function.
It's recommended to add variables to the Watch window via Add new watch | Symbol browser. This way the syntax is correct and you do not have to edit it manually.
You can also manually fix the syntax. Variables should be specified with fully qualified names to reduce ambiguity during symbol evaluation.
winIDEA resolves the syntax in the following manner.
Syntax to access a variable that is static on a file scope:
"<module name>"#<var name>
For example, to access gs_byCount variable in the TestfileA.c module, use the following syntax in the Watch window:
"TestfileA.c#"gs_byCount
Syntax to access a variable that is static on a function scope:
<function name>##<var name>
For example, to access s_byCount variable in the main function, use the following syntax:
main##s_byCount
If the application (winIDEA workspace) only has one download file, the
download file will not be added to the symbol expression. If there are
multiple download files, then the download file will be listed for all
symbols even if there are no collisions.
Syntax to access a variable that is defined in a non-default download file (secondOutput.elf)
Use the following syntax (two commas) with or example iCounter:
iCounter,,secondOutput.elf