Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52 printf float in SES

What's the trick for printing floats in Segger Embedded Studio (SES) on the nRF52?

  • I figured it out:  Open project options, select Common configuration.  Type "float" in the options search.  Change "PrintF Floating Point Supported from "No" to "Float".

    printf() and sprintf() then seem to work

    NRF_LOG works too, but have to remember to use NRF_LOG_FLOAT_MARKER and NRF_LOG_FLOAT(), and is limited to 2 digits right of the decimal.

Related