This is an automated email from Gerrit.

"Tormod Volden <[email protected]>" just uploaded a new patch set to 
Gerrit, which you can find at https://review.openocd.org/c/openocd/+/9193

-- gerrit

commit e2bd10b1abbab6475e75f1f095ddfa2f8cf0014f
Author: Tormod Volden <[email protected]>
Date:   Sat Nov 1 13:27:27 2025 +0100

    RTT: Implement start retry
    
    Change-Id: I3d7520647115a7f253b680e1db12695ffe4c5cbf
    Signed-off-by: Tormod Volden <[email protected]>

diff --git a/src/rtt/rtt.c b/src/rtt/rtt.c
index c019a180e0..774e1343dc 100644
--- a/src/rtt/rtt.c
+++ b/src/rtt/rtt.c
@@ -123,6 +123,13 @@ int rtt_register_source(const struct rtt_source source,
        return ERROR_OK;
 }
 
+static int rtt_start_retry_callback (void *user_data)
+{
+       rtt_start();
+
+       return ERROR_OK;
+}
+
 int rtt_start(void)
 {
        int ret;
@@ -142,6 +149,11 @@ int rtt_start(void)
                                addr);
                        rtt.ctrl.address = addr;
                } else {
+                       if (rtt.start_retry_interval) {
+                               
target_register_timer_callback(&rtt_start_retry_callback,
+                                       rtt.start_retry_interval, 
TARGET_TIMER_TYPE_ONESHOT, NULL);
+                               return ERROR_OK;
+                       }
                        LOG_ERROR("rtt: No control block found");
                        return ERROR_FAIL;
                }
@@ -174,6 +186,7 @@ int rtt_stop(void)
        }
 
        target_unregister_timer_callback(&read_channel_callback, NULL);
+       target_unregister_timer_callback(&rtt_start_retry_callback, NULL);
        rtt.started = false;
 
        ret = rtt.source.stop(rtt.target, NULL);

-- 

Reply via email to