HI, some variables i cant add them to the watch in debug mode. i get : error 34: undefined identifier. e.g.
for (n=0;n<N_Sample;n++) { code.......... }
i want to add n to watch..??????
i) Before the debugger run to initialize the "n", uVision3 can't add this variable to watch window.
ii) If the debugger run in other funtion that not in your this one function, also cant add this variable. If you succesful add this one variable in watch window, after you run in other funtion, this one variable will become "out of scope".
iii) If you initial "n" as global varaible, yes you can add this variable after the debugger had initial this variable in any place (function, file).
Well that seems fine.
A local var only has scope in the function that defined it.
If it is a local var do you not have a locals window in your watch window.
A static var will not be added to the watch window unless you are in the module that it is defined in.
You cant watch a var that has not been declared yet.
All is good.
HI,, i have done all what u mentioned even before i put the thread,, i still could not add the var to watch..!!!
???
It may be an optimisation issue.
Depending on the level of optimisation (and the subsequent usage of the variable), the compiler may have assigned it to a register rather than a memory location.
Have you tried with no optimisation ?