[SOLVED] print float with RTT viewer

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] print float with RTT viewer

    I try to print 'float' number using RTT Viewer.
    But I know that SEGGER_RTT_printf only accept 'int'

    So what's the solution to print the float numbers?

    Thank you
  • Hi,


    SEGGER_RTT_printf() is a minimal implementation of printf() and only supports the most basic format modifiers.
    If advanced functionality is required, use sprintf() into a buffer and output it via SEGGER_RTT_WriteString().

    Best regards,
    Niklas
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi,

    sorry, it is actually called SEGGER_RTT_WriteString() .

    Best regards,
    Niklas
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.