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

Enabling NRF_LOG in Segger for the Zigbee examples

Following multiple articles on logging for enabling log output using Segger Embedded Studio and the Zigbee library I find they all seem to be missing something. Fundamentally, the 

NRF_LOG_BACKEND_RTT_ENABLED

section is missing from the sdk_config.h files so the use of the configuration wizard does not allow you to turn on this backen. Adding the relevant section to the sdk_config.h file manually exposes the settings in the configuration wizard. A search through other sdk_config.h files in other projects reveals the basic section which can be copied. In addition, there is a section for
segger_rtt - SEGGER RTT

that must be added to the end of the sdk_config.h file. Once this is done, you need to add a couple of include paths to the project to find the missing headers and you need to add SEGGER_RTT.c to the list of source files for the project.

Only then can you see the output of the NRF_LOG_... statements in the debugger window.

I would like to see this all being added to the sample projects for the Nrf52840 ZIGBEE API so they work 'out of the box' or at least being properly documented. This is a major issue which makes the learning curve for getting into development of Zigbee applications unnecessarily steep.

Related