Skip to content

printf does not handle floating point #278

Open
@paulvha

Description

@paulvha

Reproduce:

float value = 21.5;
char symbol = 'C';
Serial.printf(" Temp: %2.2f%c ", ret, symbol);

will display : Temp: %2.2f Not Temp: 21.5C. Both the value and the symbol are not printed

Root cause
In the different board variants, the file mbed_config.h, MBED_CONF_PLATFORM_MINIMAL_PRINTF_ENABLE_FLOATING_POINT is defined as zero. It is then excluded in mbed_printf_implementation.c.

regards,
Paul

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions