This is an automated email from Gerrit.

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

-- gerrit

commit 9fa09a7a30984cad4925a8eb273fa2a9fd44aefd
Author: Paul Fertser <[email protected]>
Date:   Wed Jul 17 09:47:43 2013 +0400

    target: clear running_alg flag after reset
    
    After the target was reset we can be sure it's not running any
    algorithm.
    
    This fixes the following failure scenario:
    
    On my STM32F103 board after I start the firmware and then stop and try
    to "load" in gdb (before doing mon reset halt), I get
    
    Error: timeout waiting for algorithm, a target reset is recommended
    
    However, target reset doesn't help as the flag is still there ("Error:
    Target is already running an algorithm"), so I have no choice but to
    restart the OpenOCD process.
    
    I'm not sure yet what exactly prevents load from working after my
    firmware is initialised, most probably some interrupt is firing and my
    handler produces a fault due to garbled RAM.
    
    Change-Id: Idd977f2780a64d84800e3abd412cffc1ab6801b0
    Signed-off-by: Paul Fertser <[email protected]>

diff --git a/src/target/target.c b/src/target/target.c
index 60a8a77..6d96e01 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -578,8 +578,10 @@ static int target_process_reset(struct command_context 
*cmd_ctx, enum target_res
        retval = target_call_timer_callbacks_now();
 
        struct target *target;
-       for (target = all_targets; target; target = target->next)
+       for (target = all_targets; target; target = target->next) {
                target->type->check_reset(target);
+               target->running_alg = false;
+       }
 
        return retval;
 }

-- 

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to