This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Using f_printf with FATFS

I'm having problems using f_printf function with nRF52 SDK v16

undefined reference to `f_printf'

Makefile is the same of FATFS example and already includes:

$(SDK_ROOT)/external/fatfs/port/diskio_blkdev.c \
$(SDK_ROOT)/external/fatfs/src/ff.c \

Parents Reply Children
  • Yes,

    #if _USE_STRFUNC

    (line 5737 in ff.c)

    _USE_STRFUNC is defined to 0 on line ff_conf.h.

    What is _USE_STRFUNC in your project?

    The reason I said that it wasn't used is that _USE_STRFUNC is 0 in the projects in our SDK, so f_printf isn't used anywhere, as far as I can tell, but it may be used in an example I am not aware of.

    In addition, the fatfs example has the implementation of f_printf() (if _USE_STRFUNC is set to 1), but there are no calls to it. 

Related