2007-01-24 07:17 PM
Problem with the initialization of variables in RealView RVDK 2.1
2007-01-24 03:15 AM
With the RealView tools, we have a problem with the initialization of some variables.
In a function, a variable m is declared locally and is initialized to 0. If we launch the program in mode step by step, we notice that the compiler does not take into account the order of initialization of the variable at the time of its declaration (u8 m = 0). Later in the function, before it is used, this variable is again initialized to 0 (m=0). Again, the compiler does not take into account the order m = 0, the value of the variable m does not change. We have the software RealView RVDK 2.1 (Build 380). Are there updates for this product? Is it possible that it is the compiler which is badly configured? Did you already encounter problems with the initialization of variables in the RealView RVDK software? Thank you for your answers, have a nice day.2007-01-24 07:17 PM
Hello,
We tried the two compiler optimizations (reduce image size, execution time) in (Project Properties -> Compile = ARM -> Optimization), but that didn't have an effect. Do you know another optimization for this compiler? There is no error with a globals variables, this error appears only with some local variables. We already tried your suggestion (volatile u8 m = 0;), but the value of the variable doesn't change. We noticed that the erroneous value of the variable is stored in a register, if we use volatile or not. Are there updates for this compiler? Thank you for your attention.