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

NRF_LOG preprocessor code created incorrectly

I've been having problems trying to get any of your example project to use NLOG to a uart port that we have made available for production test on our new product.

I've chosen the temperature example as one of the simplest so less likely to have other issues.

I've been searching through the many technical question/answers other users have had on similar topics and changed the following definitions to swap from RTT to UART

#ifndef NRF_LOG_BACKEND_RTT_ENABLED
#define NRF_LOG_BACKEND_RTT_ENABLED 0
#endif

#ifndef NRF_LOG_BACKEND_UART_ENABLED
#define NRF_LOG_BACKEND_UART_ENABLED 1
#endif

But as you can see from the images below when I step through nrf_log_default_backends.c, even though the definitions are correct when I hover over these two #defines, the wrong arm of code is being included into the project by the preprocessor.

Any ideas what is going wrong with the Segger Embedded Studio / libraries?

  

Related