Hello All,
I am using nRF52840 DK and Segger with nRF5SDK 17.0.2 version. There are many examples that prints a NRF_LOG_INFO(). But I want to understand how to configure by myself. So I was trying to implement.
So I have added a below header:
#include "nrf_log.h"
#include "nrf_log_ctrl.h"
#include "nrf_log_default_backends.h"
static void log_init(void)
{
ret_code_t err_code = NRF_LOG_INIT(NULL);
APP_ERROR_CHECK(err_code);
NRF_LOG_DEFAULT_BACKENDS_INIT();
}
and called it in main function
int main(void)
{
log_init();
NRF_LOG_INFO(" Hello ");
}
Added nrf_log_backend_rtt.c file in nRF_Log folder Also defined below in sdk_config.h file
#define NRF_LOG_BACKEND_RTT_ENABLED 1
#define NRF_LOG_ENABLED 1
But still I am getting below error:
SEGGER_RTT_Conf.h: No such file or directory
Also I was checking on forum about the same error and people asked to add ../../../../../../external/segger_rtt; In user include directory but I have also tried to do the same. But got another error
undefined reference to `nrf_log_default_backends_init'
I am not sure what I am missing to do?
I am attaching the screenshot for reference.

Please help me.
Thanks in advance.
Thanks and regards,
Neeraj Dhekale