From 1341eb3b0aea74b939a5d7702f696b175d032647 Mon Sep 17 00:00:00 2001 From: drath Date: Sun, 30 Jul 2006 11:25:43 +0000 Subject: - added configurable delays after reset lines get deasserted. useful if reset circuitry keeps lines asserted for too long. - additional debug output when opening the parallel port - fixed counting of available arm7/9 watchpoint units - 'flash write' now displays elapsed time git-svn-id: svn://svn.berlios.de/openocd/trunk@79 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/target/arm7_9_common.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/target') diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c index 62fc3b5b..6bb80125 100644 --- a/src/target/arm7_9_common.c +++ b/src/target/arm7_9_common.c @@ -304,7 +304,8 @@ int arm7_9_remove_breakpoint(struct target_s *target, breakpoint_t *breakpoint) arm7_9_unset_breakpoint(target, breakpoint); } - arm7_9->wp_available++; + if (breakpoint->type == BKPT_HARD) + arm7_9->wp_available++; return ERROR_OK; } @@ -456,11 +457,12 @@ int arm7_9_enable_sw_bkpts(struct target_s *target) if (arm7_9->sw_bkpts_enabled) return ERROR_OK; - if (arm7_9->wp_available-- < 1) + if (arm7_9->wp_available < 1) { WARNING("can't enable sw breakpoints with no watchpoint unit available"); return ERROR_TARGET_RESOURCE_NOT_AVAILABLE; } + arm7_9->wp_available--; if (!arm7_9->wp0_used) { @@ -784,6 +786,12 @@ int arm7_9_halt(target_t *target) { WARNING("target was in unknown state when halt was requested"); } + + if ((target->state == TARGET_RESET) && (jtag_reset_config & RESET_SRST_PULLS_TRST) && (jtag_srst)) + { + ERROR("can't request a halt while in reset if nSRST pulls nTRST"); + return ERROR_TARGET_FAILURE; + } if (arm7_9->use_dbgrq) { -- cgit v1.2.3