cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with the initialization of variables in RealView RVDK 2.1

michellod
Associate II
Posted on January 25, 2007 at 04:17

Problem with the initialization of variables in RealView RVDK 2.1

2 REPLIES 2
michellod
Associate II
Posted on January 24, 2007 at 12:15

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.

michellod
Associate II
Posted on January 25, 2007 at 04:17

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.