Hello everyone,
I just came up with some strange behaviour of my MSP430 or rather the CCS.
GLOBAEL or EXTERN:
unsigned long ulong_zahler = 0;
extern unsigned long ulong_ergl;
bla_test ( void ) {
LOCAL:
unsigned long Temp_longint = 0;
unsigned long ulong_test = 0;
unsigned long ulong_temp=0;
for(i=U_MIN;i<U_MAX;i++)
{
Temp_longint = Temp_longint + (unsigned long)Result[i];
ulong_ergl = ulong_ergl + (unsigned long)Result[i];
ulong_test = ulong_test + (unsigned long)Result[i];
ulong_zahler = ulong_zahler + (unsigned long)Result[i];
ulong_temp = ulong_temp + (unsigned long)Result[i];
}
so i only have 32 bit long variables in this cases.
First the really strange thing:
all extern or global variables DO count to 32 bit, so they wont roll over when hitting 2^16=65536.
the local 32 long variables test and temp_longint behave just like 16 bit variables.
Has anyone an explanatio for this, or has experienced something similar???
Or am i yet again missnig some C fundamelntals i just didnt or couldtn know???
Another thig to wonder about is the fact that in my debugging mode at first i couldnt reach some of the local variables, now , 1 or 2 hours simply passed without programming, i can see all variables in debugging except one local.
Which directly brings me to another question, wheather the MSP430 UIF FET Debugger deletes all code when uploading a new one.
Thanks for reading.
Seb