AnsweredAssumed Answered

Floating Point I/O in SDK MQX

Question asked by Randy Hermes on Nov 6, 2015
Latest reply on Nov 11, 2015 by Randy Hermes

I'm trying to enable floating point I/O for printf and scanf in MQX that comes with SDK 1.3.

 

First I set MQX_INCLUDE_FLOATING_POINT_IO 1 in mqx_cnfg.h.  Didn't seem to have any affect.

 

Dig some digging around and found that STD_FP_IO is used to control inclusion of FP code in print_prv.c and scan_prv.c.

This is hard coded as 0 in std_prv.c used by print_prv.c.

I copied std_prv.c, changed STD_FP_IO to 1, and added it as a preprocessor definition to all of the project settings for my libraries and application.

 

First time I tried to run it crashed.  Looked like a stack size issue so I doubled the stack for all tasks but still had problems.

Looks like their may be an issue with the FP IO code.

 

Am I missing something, some other define I need to set?

 

Succinct question - how can I enable FP IO?

 

Thanks,

 

Randy

Outcomes