This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to print less than 4 digits after the decimal point when printing a float value using System_printf() ?

Guru 24520 points

Hi TI Experts,

I am working on a SYS/BIOS project which needs to print float values to the console.

I figured out that the following statement has to be a part of the application .cfg file to enable the System_printf() to support printing of float values.

System.extendedFormats = '%$L%$S%$F%f';

But the System_printf() only prints 4 digits after the decimal point for the float values. I also used a precision specifier like "%.1f" or ""%0.2f"" in the format string of the System_printf(). That doesn't seem to work either.

Please let me know what more to be done to make the function print less than 4 digits after the decimal point.

Best regards.

Kaka