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

Cant get J-Link RTT Viewer to show log information

Hello again Nordic Pros,

I am trying to get some debug logging going using the 52DK running ble uart central under SDK 12.3 and RTT Viewer v6.4.

I have setup config.h as such:

and added this line to test getting a log with each RX event:

Fullscreen
1
2
3
4
...
case BLE_NUS_C_EVT_NUS_RX_EVT:
NRF_LOG_DEBUG ("TEST!\r\n");
...
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Yet there are no logs in any RTT Viewer Window when characters are sent via BLE.

What am I missing here?

Robin @ TL

I now have RTT-Viewer showing logs.  However, there are 2 problems:

1.) If I turn on timestamping, my board hangs,

2.) When logging is enabled, I cannot command the board via the terminal.

Any suggestions on how to remedy this issues is greatly appreciated!

Thanks 

Robin @ TL

  • If you use NRF_LOG_DEFERRED, log will be processed only when NRF_LOG_PROCESS() or NRF_LOG_FLUSH() is called. They're typically executed in the last loop part in main() as part of idle task. See SDK examples for this.

    Otherwise, the simplest solution is turn NRF_LOG_DEFERRED off. This makes log processed in-place.

  • Hello Xavier,

    I have tied both options for deferred logging,  Neither results in any messages in RTT Viewer.  Any other ideas would be greatly appreciated.  I am having the same problem with our custom board.  I get connected from RTT Viewer, but no messages.

    Thank you

    Robin @ TL

  • Xavier,

    One more thing regarding deferred logging, Most the time my app wont even connect to a central, if I turn deferred off.  Seem very unstable.

  • Have you tried any stock example provided by SDK that enables RTT by default?

  • Besides, is there any good reason to stick to SDK 12.3?

1 2