From 60c67ee156c2ec1bef1149d57bce313192b649f5 Mon Sep 17 00:00:00 2001 From: Gareth McMullin Date: Fri, 10 Jun 2016 09:36:32 +1200 Subject: [PATCH] cortexa: Flush I-Cache on detach. --- src/cortexa.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cortexa.c b/src/cortexa.c index 5f783e6..79003cd 100644 --- a/src/cortexa.c +++ b/src/cortexa.c @@ -334,6 +334,8 @@ void cortexa_detach(target *t) /* Restore any clobbered registers */ cortexa_regs_write_internal(t); + /* Invalidate cache */ + apb_write(t, DBGITR, MCR | ICIALLU); uint32_t dbgdscr = apb_read(t, DBGDSCR); /* Disable halting debug mode */