How do I make certain that all NRF_LOG messages makes it to RTT viewer?

Sometimes, the output of the NRF_LOG commands does not make it to the RTT viewer.

The output of such commands as NRF_LOG_INFO() and NRF_LOG_DEBUG() and NRF_LOG_HEXDUMP_DEBUG()

are cut short on the RTT viewer and are not complete. Sometimes, for example upon a fresh connection of RTT Viewer, full messages will be seen and then as the program runs, those same outputs which were complete become no longer complete as viewed on the J-Link RTT Viewer.

How can I setup my system to **guarantee** that all NRF_LOG() commands get to the RTT viewer.

I am using NRF5 SDK 17.02. I use the J-Link RTT Viewer V6.88a. I am attached to an NRF52840 DK board over USB.

Another related debug question I have is:

Is there a way to command line view the RTT output and integrate it more tightly with command line building as done with MAKE and VSCODE? My current pathway is issuing a "make flash" and then going to my RTT Viewr GUI.....and hitting the connect/disconnection File option until I start seeing debug messages, most likely missing plenty of debug.

Is there a way to ensure that after building and flashing, that an RTT viewer logger is spawned and captures all debug output as the device boots?

The RTT viewer is a great tool, but our team has had trouble with missing debug messages for the entirety of development. I'd like to fix this once and for all.

I know there are a multitude of NRF_LOG settings in the SDK_CONFIG.H. We still haven't found the magic combination.

NRF_LOG_DEFERRED 0 has fixed other problems, including printing old data but not the problem of missing debug data.

Kind Regards,
Chris

Related