FRDM-Kl25Z printf float question.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FRDM-Kl25Z printf float question.

Jump to solution
1,509 Views
larryo
Contributor II

I am working on a project using the FRDM-KL25Z  board and CW 10.6. I have the console I/O defined in PE but I cannot get printf() to work properly for a float. It works ok for an int, int a = 123; printf("%d\n",a); but not a double, double a = 1.234;  printf("%f\n",a); The result I get for the double is that %f is sent out the serial port.

 

If I set a break point the contents of the double is shown as the correct floating point result but it seems like the float specifier is handled as a string.

Labels (1)
0 Kudos
Reply
1 Solution
1,071 Views
larryo
Contributor II

I found my problem. I did not have FP enabled in the Librarian

View solution in original post

0 Kudos
Reply
1 Reply
1,072 Views
larryo
Contributor II

I found my problem. I did not have FP enabled in the Librarian

0 Kudos
Reply