This is an automated email from Gerrit.

Tomas Vanek ([email protected]) just uploaded a new patch set to Gerrit, which you 
can find at http://openocd.zylin.com/4840

-- gerrit

commit 6f7325422d68ba597c3b37511459817f1e34b8fd
Author: Tomas Vanek <[email protected]>
Date:   Wed Jan 9 11:59:35 2019 +0100

    target/cortex_m: inform if an external reset occurs
    
    Change-Id: I873e73012c44aac7af3b21b633bd096d8e299d07
    Signed-off-by: Tomas Vanek <[email protected]>

diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c
index e8ad770..133383e 100644
--- a/src/target/cortex_m.c
+++ b/src/target/cortex_m.c
@@ -510,7 +510,10 @@ static int cortex_m_poll(struct target *target)
        }
 
        if (cortex_m->dcb_dhcsr & S_RESET_ST) {
-               target->state = TARGET_RESET;
+               if (target->state != TARGET_RESET) {
+                       target->state = TARGET_RESET;
+                       LOG_INFO("target external reset detected");
+               }
                return ERROR_OK;
        }
 

-- 


_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to