Clear target error on attaching.

Fixes possible lock-up on devices booting from blank flash.
This commit is contained in:
Gareth McMullin 2012-06-28 20:11:53 +12:00
parent 466bb66424
commit 22993fb5bd
1 changed files with 3 additions and 0 deletions

View File

@ -358,6 +358,9 @@ cortexm_attach(struct target_s *target)
unsigned i;
uint32_t r;
/* Clear any pending fault condition */
target_check_error(target);
target_halt_request(target);
while(!target_halt_wait(target));