summaryrefslogtreecommitdiff
path: root/src/target/arm7_9_common.c
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-04-15 19:08:25 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-04-15 19:08:25 +0000
commit5295bb3121e535d25a4bdef0bd41a5675cb2f47d (patch)
tree882f211a967005cb370fb339f6bdfc488e672718 /src/target/arm7_9_common.c
parente18e23e1b6c7cdfd4294e1f05aeee2b841d3cca2 (diff)
downloadopenocd+libswd-5295bb3121e535d25a4bdef0bd41a5675cb2f47d.tar.gz
openocd+libswd-5295bb3121e535d25a4bdef0bd41a5675cb2f47d.tar.bz2
openocd+libswd-5295bb3121e535d25a4bdef0bd41a5675cb2f47d.tar.xz
openocd+libswd-5295bb3121e535d25a4bdef0bd41a5675cb2f47d.zip
- sw_bkpts fails if the target is not halted. The side effect is
that sw_bkpts also fails if the target is an unknown state(i.e. not examined yet). - feroceon embedded ICE registers are now set up after TRST has been deasserted(not tested, but it was broken as is anyway). git-svn-id: svn://svn.berlios.de/openocd/trunk@582 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/target/arm7_9_common.c')
-rw-r--r--src/target/arm7_9_common.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c
index d3445257..191e91c5 100644
--- a/src/target/arm7_9_common.c
+++ b/src/target/arm7_9_common.c
@@ -2434,6 +2434,12 @@ int handle_arm7_9_sw_bkpts_command(struct command_context_s *cmd_ctx, char *cmd,
armv4_5_common_t *armv4_5;
arm7_9_common_t *arm7_9;
+ if (target->state != TARGET_HALTED)
+ {
+ LOG_ERROR("target not halted");
+ return ERROR_TARGET_NOT_HALTED;
+ }
+
if (arm7_9_get_arch_pointers(target, &armv4_5, &arm7_9) != ERROR_OK)
{
command_print(cmd_ctx, "current target isn't an ARM7/ARM9 target");