Hello
This pretty much depends on the context of the function.
Depending how often the local variable is accessed and on the whole context of the function, local variables might be kept into register, thus they will appear as undefined in the debugger.
CrasyCat
Hello Alex,
unfortunately is not only a problem on debugging variables and viewing their values, but the application takes the wrong values!
For the standard local variables, I can initialize them in the code, but it is not possible for the static ones: I must initialize them only one time!
I use MC9S08GT32 (BDM Interface) in combination with CW5.0
Andrew
Hello
Are you using the standard startup code delivered by CodeWarrior or did you modify it or comment something out?
static local variables are handled like global variables and need to be initialized at startup.
CasyCat
I'm using the standard Start08.c file located in the SRC directory inside the CW Lib. The problem is not only in the static variables, but in the local non static, too!
I'm thinking it is a bug of the compiler/debugger!
Do you have other tips?
Regard
Hallo Sebastián,
Yes, I've tried and it resolves the problem for the non static variables, but the problem remaines for the static ones!
thanks
Eureka,
I've solved the problem, but I don't know how! The only way to solve the problem was to rebuild the project from scratch, using the files proposed from the wizard.
The project was build with CW 3.1 and ported to CW5.0: peraphs the problem was in the porting procedure, but I'm not sure!
Thanks to everyone