summaryrefslogtreecommitdiff
path: root/src/target/embeddedice.c
diff options
context:
space:
mode:
authordrath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2007-04-16 14:58:16 +0000
committerdrath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2007-04-16 14:58:16 +0000
commit04dc98916d9acb57e0f5595534151a24ba4dc684 (patch)
tree3b351f19237f6d15916e392f0304506b48e74b4c /src/target/embeddedice.c
parentc62e5b4c233d5ee0bc2066728a5b432f481ad7fe (diff)
downloadopenocd_libswd-04dc98916d9acb57e0f5595534151a24ba4dc684.tar.gz
openocd_libswd-04dc98916d9acb57e0f5595534151a24ba4dc684.tar.bz2
openocd_libswd-04dc98916d9acb57e0f5595534151a24ba4dc684.tar.xz
openocd_libswd-04dc98916d9acb57e0f5595534151a24ba4dc684.zip
- explicitly disable monitor mode on ARM7/9 targets
- added "prepare_reset_halt()" to target_type_t, which allows reset_halt to be prepared before a reset is asserted, possibly preventing communication with the target - arm7/9 devices now use a breakpoint at 0x0 or reset vector catching for debug out of reset git-svn-id: svn://svn.berlios.de/openocd/trunk@141 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/target/embeddedice.c')
-rw-r--r--src/target/embeddedice.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/target/embeddedice.c b/src/target/embeddedice.c
index 699aa96f..76f87410 100644
--- a/src/target/embeddedice.c
+++ b/src/target/embeddedice.c
@@ -181,6 +181,15 @@ reg_cache_t* embeddedice_build_reg_cache(target_t *target, arm7_9_common_t *arm7
ERROR("unknown EmbeddedICE version (comms ctrl: 0x%8.8x)", buf_get_u32(reg_list[EICE_COMMS_CTRL].value, 0, 32));
}
+ /* explicitly disable monitor mode */
+ if (arm7_9->has_monitor_mode)
+ {
+ embeddedice_read_reg(&reg_list[EICE_DBG_CTRL]);
+ jtag_execute_queue();
+ buf_set_u32(reg_list[EICE_DBG_CTRL].value, 4, 1, 0);
+ embeddedice_set_reg_w_exec(&reg_list[EICE_DBG_CTRL], reg_list[EICE_DBG_CTRL].value);
+ }
+
return reg_cache;
}