Hello, I'm running into an issue where my global and static variables are not initializing to the correct values.
For example, if I declare a variable at the top of a .c like :
unsigned long my_variable = 0x00000010UL;
when I view the variable from the debugger after performing one single step, so none of my other code has run, the variable has some random value. The same thing happens when I declare a static variable within a function. For example,
void MyFunction( void )
{
static unsigned long my_variable = 0x011F5C3UL;
.....
}
If I enter this function for the first time from the debugger, the variable has a random value. I'm using CCSv5 with the TI C/C++ compiler version 4.0.0. The target MCU is a MSP430F5529.
I urgently need help understanding this issue. Thanks in advance for your help.