Convert DEBUG_JTAG_IO to LOG_DEBUG_IO
[openocd.git] / src / jtag / drivers / ftdi.c
index 00ae8d0e01df4228d19dd7f89f42901ea0486c27..60387a98f9c6c8b379fe2121f99ce7fd695cf192 100644 (file)
@@ -262,7 +262,7 @@ static void move_to_state(tap_state_t goal_state)
        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++)
@@ -324,7 +324,7 @@ static void ftdi_execute_runtest(struct jtag_command *cmd)
        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));
 
@@ -345,14 +345,14 @@ static void ftdi_execute_runtest(struct jtag_command *cmd)
        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);
@@ -368,7 +368,7 @@ static void ftdi_execute_statemove(struct jtag_command *cmd)
  */
 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,
@@ -384,7 +384,7 @@ static void ftdi_execute_pathmove(struct jtag_command *cmd)
        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]));
 
@@ -392,7 +392,7 @@ static void ftdi_execute_pathmove(struct jtag_command *cmd)
        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--) {
@@ -432,18 +432,18 @@ static void ftdi_execute_pathmove(struct jtag_command *cmd)
 
 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;
        }
 
@@ -462,7 +462,7 @@ static void ftdi_execute_scan(struct jtag_command *cmd)
 
        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,
@@ -512,14 +512,14 @@ static void ftdi_execute_scan(struct jtag_command *cmd)
        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
@@ -555,17 +555,17 @@ static void ftdi_execute_reset(struct jtag_command *cmd)
                        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()));
 }
@@ -589,7 +589,7 @@ static void ftdi_execute_stableclocks(struct jtag_command *cmd)
                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()));
 }

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)