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

Is that bad to call RTT functions if there is no SEGGER connected?

Is that bad to call RTT functions if there is no SEGGER connected?

I mean, if there is no RTT viewer connected, what the RTT library does with the message to transmit? Does it put the message in queue? Does it use some RAM? If I forgot to remove this RTT calls in production mode, is that possible that my application crash due to RTT calls?

Here is an example of RTT function I call every seconds for debug purpose :

SEGGER_RTT_SetTerminal(terminal);
SEGGER_RTT_printf(0,"%s %d\n",prefix,number);
Parents
  • It depends on what you configured.. You can configure it for trim, skip or block. In trim an skip mode it is no problem, it will continue. But in in block mode it wait until there is room, which is never... By default it is configured for trim I believe where as much data gets put into buffer as fits and skips the rest.

    And yes it does use ram, rtt initialises itself the first time it is called.

Reply
  • It depends on what you configured.. You can configure it for trim, skip or block. In trim an skip mode it is no problem, it will continue. But in in block mode it wait until there is room, which is never... By default it is configured for trim I believe where as much data gets put into buffer as fits and skips the rest.

    And yes it does use ram, rtt initialises itself the first time it is called.

Children
Related