Variables in IAR¶
To view Global Variables, do either of the following.
Right-click on the variable.
Select Add to Watch: varName.
Select
View→WatchEnter the name of the variable.
Variable watch window. Note that you can cast values, get address and sizeof, etc.¶
View –> Locals show the local variables in IAR.
Local variables. This screenshot is taken during execution of the Simple Peripheral init function.¶
Note
IAR may remove the variable during optimization and inline the usage of the
value. If so, add the __root directive in front.