I have a quick (and probably dumb) question on sprintf for the kinetis MCU. I am trying to use sprintf on a floating point number and have had trouble (yes I realize sprintf is huge when used on floats). It works fine with integers but not floats. What is the trick to get it to work? Here is an example of how I am formatting the string:
float test = 10.123;
sprintf(tempString, "%2.1f", test);
When I have used sprintf with other MCU's (microchip) this would spit out "10.1" to my display. This prints out "%2.1f" when I use it with CodeWarrior / kinetis. What am I missing? I am using CodeWarrior 10.1 with all the latest updates/patches.