Closed awatt196 closed 3 years ago
ARM Internal Ref: IOTSFW-1075
Currently our standard library is configured to disable floating point printf (since it adds several kB of code, even if it's not used). We're working on making this configurable.
@autopulated The commit for c++11 flags might have defined the wrong issue number. This issue was automatically closed by the merge. Please have a look and reopen if this issue is still valid.
@0xc0170 thanks – This was caused by some commits from mbed-armcc accidentally being pushed to this repository, instead of the experimental https://github.com/armmbed/target-mbed
I still see the issue with mbed os 6 and it drove me crazy, any updates or what are the alternatives to print float numbers.
I literally hard coded a simple test in my code and still see the issue.
printf("peakVoltage: %f \n", 2.2);
In the serial console, it prints :
peakVoltage: %f
and it would be great if you add note in this doc https://os.mbed.com/docs/mbed-os/v6.13/program-setup/serial-communication.html highlithing this limitaiton becuase it litterlly wasted a lot of my time.
@Shrif88 This is Mbed 3 target, I'll archive this repository now as deprecated.
Depending on your target and components config (Mbed 6 has small c lib option that has some limitations but full std should not).
I'm trying to print a float using printf, but it just appears as a blank space.