AnsweredAssumed Answered

Trouble using Double variables

Question asked by Kaveh Firouzi on May 6, 2015
Latest reply on May 7, 2015 by Kaveh Firouzi

Hi,

 

I recently ported my codes from Keil uVision to Kinetis Design Studio and I ran into a strange problem, It looks like as if the Kinetis compiler doesn't know how to handle double variables properly.

So I have a static array of double variables in one of my functions. Compiler sets the memory location of the last element of this static array to 0x1fff6868. I realized one of my other static variables somewhere else in the code is getting corrupted and when I investigated I noticed it is located at the address 0x1fff686c, which means it overlaps with the double variable located at 0x1fff6868 because they're only 4 bytes apart instead of 8!

Why is this happening? Is there some sort of compiler settings I should change?

 

Regards,

K

Outcomes