NCS 3.4.0 - missing cbprintf

NCS 3.4.0, (Ubuntu, nRF9160-DK)

Using cbprintf results in a linker error:

   undefined reference to `cbprintf'

But I didn't find, how to enable it.

The zephyr samples doesn't contain it.

The nrf samples only use "vsnprintfcb", adding a few lines to use cbprintf just to test, if it links, fails with the same error message.

I tried to check the migration guides for nrf and zephyr, but I fail to see the guidance. 

It's pretty easy to reproduce, e.g. "nrf/samples/cellular/udp":

src/main.c:

------------------------------------- 

...

#include <nrf_modem_at.h>
#include <zephyr/sys/cbprintf.h>

...

static int out_func(int c, void *ctx)
{
   ARG_UNUSED(ctx);
   printk("%c", c);
   return 0;
}

int main(void)
{
    int err;

    printk("UDP sample has started\n");

        cbprintf(out_func, NULL, "cbprintf\n");

...

}

Build with:

west build -b nrf9160dk/nrf9160/ns

...

So, what is missing?

Parents Reply Children
Related