add a better log for missing register/instruction definitions

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1773 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Mike Frysinger 15 years ago
parent ac87a4e834
commit 8bcaccbfbd

@ -11,6 +11,9 @@
* src/bfin/bfin-part-bfin.c (bfin_init): Add BF548M and BF592.
* data/analog/PARTS: Add note that bfin_init() needs to be in sync.
* src/bfin/bfin.c (bfin_set_scan): Replace assert() with a more helpful error
message showing the instruction that had a problem with loading.
2010-02-08 Jie Zhang <jie.zhang@analog.com>
* include/urjtag/part.h (struct URJ_PART_PARAMS): Add wait_ready.

@ -112,7 +112,13 @@ bfin_set_scan (urj_part_t *part, int scan)
if (BFIN_PART_SCAN (part) != scan)
{
urj_part_set_instruction (part, scans[scan]);
assert (part->active_instruction != NULL);
if (part->active_instruction == NULL)
{
urj_log (URJ_LOG_LEVEL_ERROR,
_("%s: unable to load instruction '%s'\n"),
"bfin", scans[scan]);
return -1;
}
BFIN_PART_SCAN (part) = scan;
return 1;
}

Loading…
Cancel
Save