Content originally posted in LPCWare by IntStarFoo on Sat Dec 08 17:34:04 MST 2012
I got it working, but I'm still not exactly sure what the problem was. Here are my steps for getting it working...
1. Create a new project, add code, compile and run. (Works great.)
2. Compare project settings between my existing project and the new project and noticed a few things...
a. #include "stdio.h" in my was different than #include <stdio.h> so I changed that.
b. Define order in the new project is:
__REDLIB__
DEBUG
__CODE_RED
__USE_CMSIS=CMSISv2p00_LPC17xx
Define order in old project was:
DEBUG
__CODE_RED
__USE_CMSIS=CMSISv2p00_LPC17xx
__REDLIB__
So I changed that to match
3. Make changes to old project, compile and run. (Works Great. - results below)
Using %d: doubleA:0, doubleB:0, doubleC:0
Using %f: doubleA:0.000000, doubleB:0.000000, doubleC:0.000000
Using %d: doubleA:0, doubleB:1081073664, doubleC:0
Using %f: doubleA:255.000000, doubleB:510.000000, doubleC:65025.000000
I'm guessing that somehow I was using some other version of some library that was giving unexpected results. Either changing the define order or only looking in the C lib folders (via <stdio.h>) caught the right one.
Thanks,
IntStarFoo