AnsweredAssumed Answered

CFV1 with CW6.1 floating point support for printf

Question asked by KEVIN ROSENBAUM on Jan 3, 2008
Latest reply on Jan 5, 2008 by kef

I've looked at several posts talking about shrinking the footprint of printf-like functions by setting #define switches in header files.  There is also a "Tips & Tricks" segment about this discussed here.  I wish to do the opposite.  I want full floating point support for printf and scanf, but I'm running into problems making it happen.

First of all, here is what I have:
CodeWarrior 6.1 Special Eddition (Under "Help->About" it states the version is 5.9.0, Build 2404)
MCF51QE64 for my target MPU

Some other related threads that I have found useful are:
CW 6.3 for ColdFire and floating point
Simple Printf on CF question

As it stands by default, I can compile printf functions with the "%f" term, but nothing will be displayed.  (I'm actually using sprintf and whatever putchar function I choose.)  Also, printf works fine for printing integer values (%d, etc.).

I have tried adding print.c from "C:\Program Files\Freescale\CodeWarrior for Microcontrollers V6.1\lib\hc08c\src" and modifying libdefs.h from "C:\Program Files\Freescale\CodeWarrior for Microcontrollers V6.1\lib\hc08c\include", but I getting a lot of errors.  Specifically in libdefs.h I include the switch "#define LIBDEF_PRINTF_FLOATING   1".

I think others have had success with this process before, but maybe there is a quirk for the Coldfire V1 that I am not aware of.  I also wonder if I should be grabing printf.c from the HC08 source directory.

Thank you in advance for any guidance you can provide.