This is an automated email from the ASF dual-hosted git repository.

GUIDINGLI pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 136779ec70abbe3716e7b9857bf5207e6c6d2c77
Author: liaoao <[email protected]>
AuthorDate: Mon Jun 8 17:17:11 2026 +0800

    drivers/rptun: add RPTUN_TRACE_DUMP to choose the peer syslog dump
    
    On halt, and on RPTUNIOC_DUMP, rptun printed the peer's syslog buffer.
    A peer that keeps its syslog buffer across a reboot sends its old log
    again after the next boot, so dumping it at halt as well prints the
    same crash log twice, and the dump can push the early part of the local
    crash log out of a ramlog. Add CONFIG_RPTUN_TRACE_DUMP so that such a
    board can turn the dump off. It defaults to y, so the dump stays on
    wherever SYSLOG_RPMSG_SERVER is enabled, as before.
    
    Signed-off-by: liaoao <[email protected]>
    Signed-off-by: Bowen Wang <[email protected]>
---
 drivers/rptun/Kconfig | 8 ++++++++
 drivers/rptun/rptun.c | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/rptun/Kconfig b/drivers/rptun/Kconfig
index 0aa8730f6ff..6e93820703d 100644
--- a/drivers/rptun/Kconfig
+++ b/drivers/rptun/Kconfig
@@ -151,4 +151,12 @@ config RPTUN_LOADER
        bool "rptun loader support"
        default n
 
+config RPTUN_TRACE_DUMP
+       bool "rptun dump remote core's syslog"
+       default y
+       depends on SYSLOG_RPMSG_SERVER
+       ---help---
+               Print the remote core's syslog buffer (its RSC_TRACE entry) on
+               halt and on RPTUNIOC_DUMP.
+
 endif # RPTUN
diff --git a/drivers/rptun/rptun.c b/drivers/rptun/rptun.c
index f9ff8a2db69..9eafe56f0b4 100644
--- a/drivers/rptun/rptun.c
+++ b/drivers/rptun/rptun.c
@@ -1371,7 +1371,7 @@ static int rptun_dev_reset(FAR struct rptun_priv_s *priv, 
unsigned long val)
 
 static void rptun_dev_dump(FAR struct rptun_priv_s *priv)
 {
-#ifdef CONFIG_SYSLOG_RPMSG_SERVER
+#if defined(CONFIG_SYSLOG_RPMSG_SERVER) && defined(CONFIG_RPTUN_TRACE_DUMP)
   if (priv->trace_va != NULL)
     {
       _emerg("Dump %s's trace\n", RPTUN_GET_CPUNAME(priv->dev));

Reply via email to