AnsweredAssumed Answered

printf() with float values

Question asked by matthias on Feb 17, 2015
Latest reply on Nov 23, 2016 by Eyeow Lee



I am using KSDK 1.1.0 with MQX and Processor Expert. Using printf() usually works fine, but I cannot make printf to print float/double values. For the code


float val = 1.234;

printf("Value = %f unit\n", val);

the output is


Value = f

I guess the reason is because printf() does not support float with the default KSDK settings for MQX, so I added  "#define MQX_INCLUDE_FLOATING_POINT_IO 1" to mqx_sdk_config.h but the behavior is still the same.

Any hints what I am doing wrong?