diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index 2ba7633f..1a377688 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -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 * include/urjtag/part.h (struct URJ_PART_PARAMS): Add wait_ready. diff --git a/urjtag/src/bfin/bfin.c b/urjtag/src/bfin/bfin.c index 47d365bc..c9baa992 100644 --- a/urjtag/src/bfin/bfin.c +++ b/urjtag/src/bfin/bfin.c @@ -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; }