Elco Elettronica

Using float variable with mqx 3.5.1

Discussion created by Elco Elettronica on May 10, 2010
Latest reply on Feb 29, 2012 by Maya Weidberg



I'm using the mcf52259 with the mqx 3.5.1.


I'm developing a function that print numbers,and characters, on the display of my board.


I've create a function declared as: void MyPrint(char_ptr Format, ... );


The function works correctly with all type of data exept with the float variables.


When I write "MyPrint("%f",Float_Variable); the micro is blocking on this instruction.

If I try to debug this problem the debugger jumps into an assembler routine called
".debug_macinfo + 0x0000000A (0x00006D56) (0x00006D56)"; and will never return from that routine.


In way to use float variables I've set to 1 the "MQX_INCLUDE_FLOATING_POINT_IO" define, and then I've recompiled all libraries.


I've also tried to call the printf macro declared in the bsp, but the effect it's the same.


Someone has ideas on how to fix it?

am I missing something? or am I doing something wrong?


Thanks in advace.



P.s. I was forgetting to say that I'm calling that function into a task declared as:

{MAIN_TASK,    main_task,    2000,  9,       "MAIN", (MQX_AUTO_START_TASK | MQX_FLOATING_POINT_TASK),0,0}