I am working on a STM32f4 board and I have a problem with passing pointer as input in a function. I have my main :
float32_t var;
function(&var);
And my function :
void function(float32_t* x){
*x = 1.;
}
But, oddly, when I debug this code, the x address doesn't fit the var address (x address is 0x00000000 pointer in function) and the value of var is not 1 after function calling. Why do I have this problem ? Moreover, this kind of function worked efficiently...
In fact, I found a new bug, once I launched the debugger a error occurs
No source available for ""
I never had this message...
I use the GCC GNU ARM compiler with these options :
-mcpu=cortex-m4; -mthumb; -Wall; -ffunction-sections; -g; -O0; -fno-builtin; -DSTM32F407VG; -DSTM32F4XX; -I.;
1.
I've always used1.0
which might be worth a try. It might also be worth adding complete compilable code along with details on the compiler you're using. – PeterJ Jul 16 '13 at 7:40= 1.
Looks odd to me too.. – m.Alin Jul 16 '13 at 7:45