Is there a step by step tutorial for setting up nrf_log for eclipse? Or something equivalent for one of the other supported IDE's?
Is there a step by step tutorial for setting up nrf_log for eclipse? Or something equivalent for one of the other supported IDE's?
Hi,
Unfortunately we don't have any step-by-step tutorials, but the Logger module documentation is relatively thorough.
Thanks Martin, however it just seems excessively complex just to get some output. If I cannot get it working I'll adopt some DIY method. I just want something easy to understand that I can get working fast.
I agree that the documentation is a little daunting. However, if you just want to print some debug strings here and there, then this is all the code you need to initialize the logger:
NRF_LOG_INIT(NULL);
NRF_LOG_DEFAULT_BACKENDS_INIT();
Then you can use e.g. NRF_LOG_INFO("String") to print your messages. You also need to tweak some settings in the sdk_config.h file and you can have a look at other examples in the SDK to get a sense of what is needed there.
Thanks Martin, that's unfortunate. I see that to use NRF_LOG_DEFAULT_BACKENDS_INIT
I need to include nrf_log_default_backends.h
which was introduced in sdk14. I am using sdk13 :O(
Is there anyway around this? and still use sdk13 or would I need to jump to sdk14?
If you are using SDK 13.x it should be enough with NRF_LOG_INIT(NULL);
actually. Not need for the backend init macro. You can have a look at a basic peripheral example, like the SAADC example for example, to see how easy it can be done.