aboutsummaryrefslogtreecommitdiff
path: root/src/target/hla_target.c
diff options
context:
space:
mode:
authorSpencer Oliver <spen@spen-soft.co.uk>2013-01-02 17:25:51 +0000
committerPeter Stuge <peter@stuge.se>2013-01-02 18:13:18 +0000
commit48e01a49694aa00341cfa1079c2bbc7f6ffa4686 (patch)
treea01e4793a3c850deb8433461e686d89a9ea994d7 /src/target/hla_target.c
parent6bd9e3b94f6c8b00ff171c1be241d8aa4bd83e9a (diff)
downloadriscv-openocd-48e01a49694aa00341cfa1079c2bbc7f6ffa4686.zip
riscv-openocd-48e01a49694aa00341cfa1079c2bbc7f6ffa4686.tar.gz
riscv-openocd-48e01a49694aa00341cfa1079c2bbc7f6ffa4686.tar.bz2
hla: support setting DCB_DEMCR on resume
This is only minimal support to enable use to catch a Hard Fault in the stm32l flash bootloader. Change-Id: I21d6a11893e2f1d173ebff1a651d6f52bf6eec32 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1103 Reviewed-by: Peter Stuge <peter@stuge.se> Tested-by: jenkins
Diffstat (limited to 'src/target/hla_target.c')
-rw-r--r--src/target/hla_target.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/target/hla_target.c b/src/target/hla_target.c
index 8d2a429..6bd286a 100644
--- a/src/target/hla_target.c
+++ b/src/target/hla_target.c
@@ -571,6 +571,11 @@ static int adapter_resume(struct target *target, int current,
resume_pc = buf_get_u32(pc->value, 0, 32);
+ /* write any user vector flags */
+ res = target_write_u32(target, DCB_DEMCR, armv7m->demcr);
+ if (res != ERROR_OK)
+ return res;
+
armv7m_restore_context(target);
/* registers are now invalid */