Compare commits
2 Commits
riscv
...
halt_exami
Author | SHA1 | Date |
---|---|---|
|
a74e59f0fc | |
|
d4c92a5ac7 |
|
@ -589,8 +589,14 @@ int target_halt(struct target *target)
|
|||
int retval;
|
||||
/* We can't poll until after examine */
|
||||
if (!target_was_examined(target)) {
|
||||
LOG_ERROR("Target not examined yet");
|
||||
return ERROR_FAIL;
|
||||
/* Try to examine the target right now, in case the target we're
|
||||
* talking to didn't examine correctly during `init`. */
|
||||
LOG_TARGET_INFO(target, "Trying to examine unexamined target before halt attempt.");
|
||||
target_examine();
|
||||
if (!target_was_examined(target)) {
|
||||
LOG_TARGET_ERROR(target, "Re-examination before halt failed. Target not examined yet.");
|
||||
return ERROR_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
retval = target->type->halt(target);
|
||||
|
|
Loading…
Reference in New Issue