This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 59ee8560727f70d123d2be3c1d37741026931c76 Author: liwenxiang1 <[email protected]> AuthorDate: Wed May 7 11:05:34 2025 +0800 drivers/segger: do not switch the syslog RTT channel to blocking mode syslog_rtt_putc() and syslog_rtt_write() switched the up buffer of CONFIG_SYSLOG_RTT_CHANNEL to SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL as soon as a J-Link was connected. From then on every syslog write waits until the host has read enough of the buffer, so a host that reads slowly, or stops reading, stalls every task that logs. Leave the syslog channel in the mode it was configured with. Signed-off-by: liwenxiang1 <[email protected]> --- drivers/segger/syslog_rtt.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/segger/syslog_rtt.c b/drivers/segger/syslog_rtt.c index 684d210d3ca..8a33b0b37d8 100644 --- a/drivers/segger/syslog_rtt.c +++ b/drivers/segger/syslog_rtt.c @@ -34,7 +34,6 @@ int syslog_rtt_putc(FAR syslog_channel_t *channel, int ch) { - SEGGER_RTT_BLOCK_IF_FIFO_FULL(CONFIG_SYSLOG_RTT_CHANNEL); SEGGER_RTT_PutChar(CONFIG_SYSLOG_RTT_CHANNEL, ch); return ch; } @@ -42,6 +41,5 @@ int syslog_rtt_putc(FAR syslog_channel_t *channel, int ch) ssize_t syslog_rtt_write(FAR syslog_channel_t *channel, FAR const char *buffer, size_t buflen) { - SEGGER_RTT_BLOCK_IF_FIFO_FULL(CONFIG_SYSLOG_RTT_CHANNEL); return SEGGER_RTT_Write(CONFIG_SYSLOG_RTT_CHANNEL, buffer, buflen); }
