]> git.sur5r.net Git - openocd/commitdiff
armv7m: exit_point optional for armv7m_run_algorithm
authorSpencer Oliver <ntfreak@users.sourceforge.net>
Mon, 19 Jul 2010 19:28:30 +0000 (20:28 +0100)
committerSpencer Oliver <ntfreak@users.sourceforge.net>
Tue, 20 Jul 2010 08:02:27 +0000 (09:02 +0100)
As the armv7m uses instruction breakpoints for algorithms we do not really
need to check the pc on exit.

This now matches the behaviour of the arm4_5 codebase.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
src/target/armv7m.c

index bd5aa147afc2f5560d579df5f874d0dab02683ed..a73a9bb45b71c0d0207d0120ca88890c60b7c840 100644 (file)
@@ -313,7 +313,7 @@ static int armv7m_run_and_wait(struct target *target, uint32_t entry_point, int
        }
 
        armv7m->load_core_reg_u32(target, ARMV7M_REGISTER_CORE_GP, 15, &pc);
-       if (pc != exit_point)
+       if (exit_point && (pc != exit_point))
        {
                LOG_DEBUG("failed algoritm halted at 0x%" PRIx32 " ", pc);
                return ERROR_TARGET_TIMEOUT;