Skip to main content
Visitor II
September 20, 2014
Question

printf floating point numbers not working

  • September 20, 2014
  • 0 replies
  • 501 views
Posted on September 20, 2014 at 20:56

I bought the iNEMO-M1 Discovery and I'm compiling a program that reads magnetometer values.

If I do:

trace_printf(''test %f\r\n'', 40.678);

It prints ''test '', and no value (not even 0).

If I do:

trace_printf(''test %u\r\n'', 40.678);

It prints ''test 1''.

I'm using Eclipse with the GCC library, and the ST-Link/v2.

Edit: resolved, it was a problem with Newlib-nano library.

    This topic has been closed for replies.