When I open J-Link RTT Viewer application to see logs of a program with set CONFIG_LOG_BACKEND_RTT
, then I see logs' output with some delay, comparing to logs of the same program with set CONFIG_LOG_BACKEND_UART
.
As I understand RTT, there's an allocated memory area in microcontroller's RAM and its address is known to J-Link Interface MCU. My program writes logs' strings to this memory area in RAM rather than to UART, and J-Link Interface MCU reads these logs' strings directly from RAM and writes them to virtual terminals on a connected PC. Probably, there's some frequency of reading this memory area in microcontroller RAM. I want to know whether there's an opportunity to decrease the latency of receiving logs from a microcontroller using some configuration variables of J-Link RTT? In the case of CONFIG_LOG_BACKEND_UART
I receive logs' output almost immediately to UART, but in the case of CONFIG_LOG_BACKEND_RTT
I receive them after some delay. Does someone know a way how to force receiving logs' using J-Link RTT with low latency? If I intensely write logs, then many of them are dropped and some of them are silently lost at all. I don't think that merely increasing CONFIG_SEGGER_RTT_BUFFER_SIZE_UP
too much is a fine option.