From 5ac99428ea6486929f49c6ed1dd321851be1f004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Wed, 7 Aug 2024 09:58:52 +0200 Subject: [PATCH] shell: backends: rtt: Set panic_mode flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A bug was introduced when fb17d0e365 introduced host presence detection. Panic_mode flag was added which indicates that RTT should work in synchronous, blocking mode but it was not set when backend was switched to panic mode. Signed-off-by: Krzysztof Chruściński --- subsys/shell/backends/shell_rtt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/subsys/shell/backends/shell_rtt.c b/subsys/shell/backends/shell_rtt.c index c8b10cb2567..a27963987b4 100644 --- a/subsys/shell/backends/shell_rtt.c +++ b/subsys/shell/backends/shell_rtt.c @@ -85,6 +85,9 @@ static int enable(const struct shell_transport *transport, bool blocking) struct shell_rtt *sh_rtt = (struct shell_rtt *)transport->ctx; if (blocking) { + if (IS_ENABLED(CONFIG_LOG_MODE_DEFERRED) && IS_ENABLED(CONFIG_SHELL_LOG_BACKEND)) { + panic_mode = true; + } k_timer_stop(&sh_rtt->timer); }