I use ST Visual Develop with Cosmic compiler. If I declare the local variable (in main.c), the returned value never correct, if it is declared as global variable, the returned value is correct, why?
Posted on May 17, 2011 at 15:04if you don't *see* the value you expect in a local variable is probably just an optimization. If the value is actually not correct (for example in a subsequent use of the local variable) than it is another issue. Please post an example to clarify. Regards, Luca (Cosmic)