aboutsummaryrefslogtreecommitdiff
path: root/src/target.c
diff options
context:
space:
mode:
authorPaul Fertser2013-05-05 00:46:47 +0400
committerGareth McMullin2013-05-14 12:32:44 +1200
commite0fc21a2a715893331f49d9d838bc0d4a69cf84c (patch)
treec22d81dcee5ef48f414fb1da8b038aba368948ee /src/target.c
parent510d1c0dc845f860ff953168e3ae12528036070e (diff)
adiv5_swdp: allow to connect to a sleeping target by pulling SRST
This patch introduces a new command, "connect_srst [enable|disable]" which allows to enable special mode in which SRST would be pulled low before the SWD scan till attaching to a target. Since on Cortex-Mx the SRST signal doesn't gate JTAG and SWD, it's possible to connect to a target while holding reset, ask it to stop at reset vector and only then deassert reset, thus allowing to attach to the kind of firmware that goes immediately to sleep or disables debugging by other means early on start. Tested on an STM32VLDiscovery board with STM32F100 configured to go to STOP mode and executing WFI in the very beginning of main(). Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Diffstat (limited to 'src/target.c')
-rw-r--r--src/target.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/target.c b/src/target.c
index b46f9e3..2a68f23 100644
--- a/src/target.c
+++ b/src/target.c
@@ -24,6 +24,7 @@
#include <stdlib.h>
target *target_list = NULL;
+bool connect_assert_srst;
target *target_new(unsigned size)
{