« Return to Thread: Doubt : Default value of Variables which are kept in NO_INIT location

Doubt : Default value of Variables which are kept in NO_INIT location

by yadunandan kasu :: Rate this Message:

Reply to Author | View in Thread

hi everyone,
 
       can any one tell me the initial default value for the varibles
which are placed in the NO_INIT location by modifying the .prm file. I
am using Codewarrior for this.

       I modifed my project .prm file, like below using NO_INIT, so
that the variables which are declared in the RAM area from 0x2000 to
2005 will not be initialized to zero by default.

       when I download the code and debugging, I found it carries a max
value by default initially. (i.e if I declare a char variable, it
carries a value of 254).
       That means, all the variables which are declared in this RAM
area will carry their max values...? or is that 254 is any garbage
value..?

      please provide me the answer..
 
/* non-paged RAM */

My_Ram_Non_Init  = NO_INIT 0x2000 TO 0x2005; /* vairbles in this  
                                                location will not be
                                                initialized to zero */
My_Ram           = READ_WRITE    0x2006 TO   0x3FFF;


Thanks & Regards
Kasu


 « Return to Thread: Doubt : Default value of Variables which are kept in NO_INIT location