int tms_count = tap_get_tms_path_len(start_state, goal_state);
assert(tms_count <= 8);
- DEBUG_JTAG_IO("start=%s goal=%s", tap_state_name(start_state), tap_state_name(goal_state));
+ LOG_DEBUG_IO("start=%s goal=%s", tap_state_name(start_state), tap_state_name(goal_state));
/* Track state transitions step by step */
for (int i = 0; i < tms_count; i++)
int i;
uint8_t zero = 0;
- DEBUG_JTAG_IO("runtest %i cycles, end in %s",
+ LOG_DEBUG_IO("runtest %i cycles, end in %s",
cmd->cmd.runtest->num_cycles,
tap_state_name(cmd->cmd.runtest->end_state));
if (tap_get_state() != tap_get_end_state())
move_to_state(tap_get_end_state());
- DEBUG_JTAG_IO("runtest: %i, end in %s",
+ LOG_DEBUG_IO("runtest: %i, end in %s",
cmd->cmd.runtest->num_cycles,
tap_state_name(tap_get_end_state()));
}
static void ftdi_execute_statemove(struct jtag_command *cmd)
{
- DEBUG_JTAG_IO("statemove end in %s",
+ LOG_DEBUG_IO("statemove end in %s",
tap_state_name(cmd->cmd.statemove->end_state));
ftdi_end_state(cmd->cmd.statemove->end_state);
*/
static void ftdi_execute_tms(struct jtag_command *cmd)
{
- DEBUG_JTAG_IO("TMS: %d bits", cmd->cmd.tms->num_bits);
+ LOG_DEBUG_IO("TMS: %d bits", cmd->cmd.tms->num_bits);
/* TODO: Missing tap state tracking, also missing from ft2232.c! */
mpsse_clock_tms_cs_out(mpsse_ctx,
tap_state_t *path = cmd->cmd.pathmove->path;
int num_states = cmd->cmd.pathmove->num_states;
- DEBUG_JTAG_IO("pathmove: %i states, current: %s end: %s", num_states,
+ LOG_DEBUG_IO("pathmove: %i states, current: %s end: %s", num_states,
tap_state_name(tap_get_state()),
tap_state_name(path[num_states-1]));
unsigned bit_count = 0;
uint8_t tms_byte = 0;
- DEBUG_JTAG_IO("-");
+ LOG_DEBUG_IO("-");
/* this loop verifies that the path is legal and logs each state in the path */
while (num_states--) {
static void ftdi_execute_scan(struct jtag_command *cmd)
{
- DEBUG_JTAG_IO("%s type:%d", cmd->cmd.scan->ir_scan ? "IRSCAN" : "DRSCAN",
+ LOG_DEBUG_IO("%s type:%d", cmd->cmd.scan->ir_scan ? "IRSCAN" : "DRSCAN",
jtag_scan_type(cmd->cmd.scan));
/* Make sure there are no trailing fields with num_bits == 0, or the logic below will fail. */
while (cmd->cmd.scan->num_fields > 0
&& cmd->cmd.scan->fields[cmd->cmd.scan->num_fields - 1].num_bits == 0) {
cmd->cmd.scan->num_fields--;
- DEBUG_JTAG_IO("discarding trailing empty field");
+ LOG_DEBUG_IO("discarding trailing empty field");
}
if (cmd->cmd.scan->num_fields == 0) {
- DEBUG_JTAG_IO("empty scan, doing nothing");
+ LOG_DEBUG_IO("empty scan, doing nothing");
return;
}
for (int i = 0; i < cmd->cmd.scan->num_fields; i++, field++) {
scan_size += field->num_bits;
- DEBUG_JTAG_IO("%s%s field %d/%d %d bits",
+ LOG_DEBUG_IO("%s%s field %d/%d %d bits",
field->in_value ? "in" : "",
field->out_value ? "out" : "",
i,
if (tap_get_state() != tap_get_end_state())
move_to_state(tap_get_end_state());
- DEBUG_JTAG_IO("%s scan, %i bits, end in %s",
+ LOG_DEBUG_IO("%s scan, %i bits, end in %s",
(cmd->cmd.scan->ir_scan) ? "IR" : "DR", scan_size,
tap_state_name(tap_get_end_state()));
}
static void ftdi_execute_reset(struct jtag_command *cmd)
{
- DEBUG_JTAG_IO("reset trst: %i srst %i",
+ LOG_DEBUG_IO("reset trst: %i srst %i",
cmd->cmd.reset->trst, cmd->cmd.reset->srst);
if (cmd->cmd.reset->trst == 1
ftdi_set_signal(srst, 'z');
}
- DEBUG_JTAG_IO("trst: %i, srst: %i",
+ LOG_DEBUG_IO("trst: %i, srst: %i",
cmd->cmd.reset->trst, cmd->cmd.reset->srst);
}
static void ftdi_execute_sleep(struct jtag_command *cmd)
{
- DEBUG_JTAG_IO("sleep %" PRIi32, cmd->cmd.sleep->us);
+ LOG_DEBUG_IO("sleep %" PRIi32, cmd->cmd.sleep->us);
mpsse_flush(mpsse_ctx);
jtag_sleep(cmd->cmd.sleep->us);
- DEBUG_JTAG_IO("sleep %" PRIi32 " usec while in %s",
+ LOG_DEBUG_IO("sleep %" PRIi32 " usec while in %s",
cmd->cmd.sleep->us,
tap_state_name(tap_get_state()));
}
num_cycles -= this_len;
}
- DEBUG_JTAG_IO("clocks %i while in %s",
+ LOG_DEBUG_IO("clocks %i while in %s",
cmd->cmd.stableclocks->num_cycles,
tap_state_name(tap_get_state()));
}