Fix debug prints when loading to flash
[openocd.git] / src / jtag / core.c
index 1d424b2e423fd1b47c179830afcaa124285c5dd1..b8d0b74c0111e891910fb55db77ecb52449e1573 100644 (file)
@@ -891,8 +891,8 @@ static int jtag_check_value_inner(uint8_t *captured, uint8_t *in_check_value,
 
                /* NOTE:  we've lost diagnostic context here -- 'which tap' */
 
-               captured_str = buf_to_str(captured, bits, 16);
-               in_check_value_str = buf_to_str(in_check_value, bits, 16);
+               captured_str = buf_to_hex_str(captured, bits);
+               in_check_value_str = buf_to_hex_str(in_check_value, bits);
 
                LOG_WARNING("Bad value '%s' captured during DR or IR scan:",
                        captured_str);
@@ -904,7 +904,7 @@ static int jtag_check_value_inner(uint8_t *captured, uint8_t *in_check_value,
                if (in_check_mask) {
                        char *in_check_mask_str;
 
-                       in_check_mask_str = buf_to_str(in_check_mask, bits, 16);
+                       in_check_mask_str = buf_to_hex_str(in_check_mask, bits);
                        LOG_WARNING(" check_mask: 0x%s", in_check_mask_str);
                        free(in_check_mask_str);
                }
@@ -960,7 +960,7 @@ int default_interface_jtag_execute_queue(void)
         * jtag/Makefile.am if MINIDRIVER_DUMMY || !MINIDRIVER, but those variables
         * aren't accessible here. */
        struct jtag_command *cmd = jtag_command_queue;
-       while (debug_level >= LOG_LVL_DEBUG && cmd) {
+       while (debug_level >= LOG_LVL_DEBUG_IO && cmd) {
                switch (cmd->type) {
                        case JTAG_SCAN:
                                LOG_DEBUG_IO("JTAG %s SCAN to %s",
@@ -969,12 +969,12 @@ int default_interface_jtag_execute_queue(void)
                                for (int i = 0; i < cmd->cmd.scan->num_fields; i++) {
                                        struct scan_field *field = cmd->cmd.scan->fields + i;
                                        if (field->out_value) {
-                                               char *str = buf_to_str(field->out_value, field->num_bits, 16);
+                                               char *str = buf_to_hex_str(field->out_value, field->num_bits);
                                                LOG_DEBUG_IO("  %db out: %s", field->num_bits, str);
                                                free(str);
                                        }
                                        if (field->in_value) {
-                                               char *str = buf_to_str(field->in_value, field->num_bits, 16);
+                                               char *str = buf_to_hex_str(field->in_value, field->num_bits);
                                                LOG_DEBUG_IO("  %db  in: %s", field->num_bits, str);
                                                free(str);
                                        }
@@ -1436,7 +1436,7 @@ static int jtag_validate_ircapture(void)
        /* verify the '11' sentinel we wrote is returned at the end */
        val = buf_get_u64(ir_test, chain_pos, 2);
        if (val != 0x3) {
-               char *cbuf = buf_to_str(ir_test, total_ir_length, 16);
+               char *cbuf = buf_to_hex_str(ir_test, total_ir_length);
 
                LOG_ERROR("IR capture error at bit %d, saw 0x%s not 0x...3",
                        chain_pos, cbuf);

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)