Hi!
Thank you for the post, it has helped me verry much.
Now I am stuck with floating point operations.
I have a Cortex M3 board from Futurlec(http://www.futurlec.com/ET-STM32_Stamp.shtml).
I have tried some tests:
float x;
float y;
y = 12.0f;
x = 123.5f + y;
printf("%d\r\n", (int)x);
This is working and the result is 135, as it should.
The problem is that if I am passing to a function a pointer to a float and set it in the function, the program stops at the assignment point.
This code is not working:
float x;
void func(float *var){
int z=50;
*var = (float)z;
}
func(&x);
This code is working:
float x;
void func(float *var){
int z=50;
*var = (float)50; // modified line
}
func(&x);
Can you please help me if you have any idea..
Regards,
Andrei