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.

OMAP-L138: Not able to printf 'float' values via the UARTprintf() function in OMAPL138_StarterWare

Part Number: OMAP-L138
Other Parts Discussed in Thread: OMAPL138

Hello,

I've been trying to print floating point values through UARTprintf() function, and i've been using the OMAPL138_StarterWare. I'm using the arm-2009q1-161-arm-none-eabi toolchain. When I print float values via UART currently it displays ERROR instead of printing the correct value. It seems that the UARTprintf isn't using full floating point capabilities (i.e. turned off in the toolchain itself). Could you give me the proper settings to add to my makefile in order to compile my code with full float printing capability? Thanks in advance. Please let me know if you need any further details.

Regards,

Imon

  • Starterware is no longer supported by TI. Their official line is that you must move to their supported SDK or PDK.

    The source for UARTprintf() is here:
    OMAPL138_StarterWare_1_10_04_01\utils\uartStdio.c
    By design it does not support floating point formats, eg %e, %f, %g. No amount of settings will mkae it support those formats.

    You can work around it by using sprintf() to a buffer then pass the buffer to UARTprintf() or UARTPuts(). You can control the format support of sprintf() via the toolchain or IDE.
  • Many thanks for your reply :)