summaryrefslogtreecommitdiff
path: root/src/target
diff options
context:
space:
mode:
authordrath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2006-07-30 11:25:43 +0000
committerdrath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2006-07-30 11:25:43 +0000
commit1341eb3b0aea74b939a5d7702f696b175d032647 (patch)
tree66aec1f947ef1b464b2f1e9028e8e4846499ad31 /src/target
parent82d2633b5f550115e9e7c7d0520babb6680aa38f (diff)
downloadopenocd_libswd-1341eb3b0aea74b939a5d7702f696b175d032647.tar.gz
openocd_libswd-1341eb3b0aea74b939a5d7702f696b175d032647.tar.bz2
openocd_libswd-1341eb3b0aea74b939a5d7702f696b175d032647.tar.xz
openocd_libswd-1341eb3b0aea74b939a5d7702f696b175d032647.zip
- 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
Diffstat (limited to 'src/target')
-rw-r--r--src/target/arm7_9_common.c12
1 files changed, 10 insertions, 2 deletions
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)
{