diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index 9b445948..40dbb8db 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -7,6 +7,9 @@ avoid constant generation loops where other files are newer, but not a different list of commands. + * src/cmd/cmd_bfin.c (cmd_bfin_run): Make sure the part is in emulation mode + first before attempting a reset (since we need to be). + 2011-06-27 Jie Zhang * include/urjtag/Makefile.am (nodist_pkginclude_HEADERS): New and diff --git a/urjtag/src/cmd/cmd_bfin.c b/urjtag/src/cmd/cmd_bfin.c index acec61b9..5e404dfa 100644 --- a/urjtag/src/cmd/cmd_bfin.c +++ b/urjtag/src/cmd/cmd_bfin.c @@ -439,6 +439,15 @@ cmd_bfin_run (urj_chain_t *chain, char *params[]) { int reset_what = 0; + part_dbgstat_get (chain, chain->active_part); + + if (!part_dbgstat_is_emuready (chain, chain->active_part)) + { + urj_error_set (URJ_ERROR_BFIN, "Run '%s' first", + "bfin emulation enter"); + return URJ_STATUS_FAIL; + } + if (num_params == 3) { if (!strcmp (params[2], "core"))