}
if (!found)
{
+#ifdef _DEBUG_JTAG_IO_
/* if a device isn't listed, the BYPASS register should be selected */
if (!jtag_get_device(i)->bypass)
{
ERROR("BUG: no scan data for a device not in BYPASS");
exit(-1);
}
-
+#endif
/* program the scan field to 1 bit length, and ignore it's value */
(*last_cmd)->cmd.scan->fields[field_count].num_bits = 1;
(*last_cmd)->cmd.scan->fields[field_count].out_value = NULL;
}
else
{
+#ifdef _DEBUG_JTAG_IO_
/* if a device is listed, the BYPASS register must not be selected */
if (jtag_get_device(i)->bypass)
{
- WARNING("scan data for a device in BYPASS");
+ ERROR("BUG: scan data for a device in BYPASS");
+ exit(-1);
}
+#endif
}
}
return ERROR_OK;
/* if a device is listed, the BYPASS register must not be selected */
if (jtag_get_device(i)->bypass)
{
- ERROR("scan data for a device in BYPASS");
+ ERROR("BUG: scan data for a device in BYPASS");
exit(-1);
}
#endif
for (j = 0; j < num_fields; j++)
{
- char out_value[4];
+ u8 out_value[4];
scan_size = num_bits[j];
buf_set_u32(out_value, 0, scan_size, value[j]);
(*last_cmd)->cmd.scan->fields[field_count].num_bits = scan_size;
if (cmd_queue_end_state == TAP_TLR)
jtag_call_event_callbacks(JTAG_TRST_ASSERTED);
+
+ enum tap_state cur_state=cmd_queue_cur_state;
+ int i;
+ for (i=0; i<num_states; i++)
+ {
+ if ((tap_transitions[cur_state].low != path[i])&&
+ (tap_transitions[cur_state].high != path[i]))
+ {
+ ERROR("BUG: %s -> %s isn't a valid TAP transition", tap_state_strings[cur_state], tap_state_strings[path[i]]);
+ exit(-1);
+ }
+ cur_state = path[i];
+ }
+
cmd_queue_cur_state = path[num_states - 1];
return interface_jtag_add_pathmove(num_states, path);
{
ERROR("trying to validate configured JTAG chain anyway...");
}
-
+
while (jtag_validate_chain() != ERROR_OK)
{
validate_tries++;
if (argc > 0)
{
+ jtag_speed = strtoul(args[0], NULL, 0);
/* this command can be called during CONFIG,
* in which case jtag isn't initialized */
if (jtag)
- jtag->speed(strtoul(args[0], NULL, 0));
- else
- jtag_speed = strtoul(args[0], NULL, 0);
+ jtag->speed(jtag_speed);
}
return ERROR_OK;