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

RTT viewer sometimes works, sometimes does not. No determinism?

I am using RTT to debug my application and it's fine when it's working. The problem is that it seems to be flaky as hell. Sometimes it just stops working without any apparent reason, I can't see a single print in the SEGGER J-Link RTT Viewer.

By testing random combinations of reseting the target, power cycling it, reprogramming the firmware etc the RTT sometimes starts working again. Whenever I do small change in my app and need to reprogram the fw, there is about 50/50 chance that the RTT will go mute. 

This makes development and debugging really, really painful. Does anybody have any tips how to make sure that RTT is not screwed? Is there some known order how things need to be started to make it more stable?

My J-Link RTT Viewer is version V5.12f. Sometimes hitting F2 / F3 to connect / disconnect repeatedly seems to help, but currently I can't get anything out of the RTT no matter what I try.

I have also tried debugging in Segger Embedded Studio (V4.18). Debugging and flashing seems to work quite OK, so I don't think there's anything wrong in my debugger connection. The cabling and J-Link drivers etc should be ok (I'm working with a custom board based on nRF52832).

There does not seem to be any usable RTT viewer integrated into SES. If you open J-Link Control Panel inside SES then there is the RTT tab that seems completely useless. See screenshot below:

 

The RTT viewer in SES has a tiny textbox that can barely fit one line of text. And it cannot be resized?! Seems like completely useless tool for any real work.

I hope I am just missing some trick in my build/program/debug cycle that is preventing the RTT to work properly. The error should not be in the firmware itself, because sometimes the RTT prints are working and sometimes not. 

Any help appreciated!

Related