This is an automated email from Gerrit.

Luis de Arquer ([email protected]) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/6122

-- gerrit

commit 911bfc5c4e4bf4cd28fa5892557b3ba109baa7bc
Author: Luis de Arquer <[email protected]>
Date:   Wed Mar 24 17:08:28 2021 +0100

    jtag/tcl: irscan: Return the value shifted out on TDO
    
    This change is required for the ST On Chip Emulator (OnCE)
    The OnCE Status Register is shifted out on TDO during IRSCAN
    
    However, this is not standard JTAG, and may produce
    unexpected behaviour. If so, it could be implemented
    behing some extra option, or even on a separate command.
    
    Change-Id: I1bf374ae1ddf2a56c6206ce17f8204a32ba60700
    Signed-off-by: Luis de Arquer <[email protected]>

diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c
index 2fa162e..7ce2c73 100644
--- a/src/jtag/tcl.c
+++ b/src/jtag/tcl.c
@@ -1151,13 +1151,22 @@ COMMAND_HANDLER(handle_irscan_command)
 
                buf_set_u64(v, 0, field_size, value);
                fields[i].out_value = v;
-               fields[i].in_value = NULL;
+               fields[i].in_value = v;
        }
 
        /* did we have an endstate? */
        jtag_add_ir_scan(tap, fields, endstate);
 
        retval = jtag_execute_queue();
+       if (retval != ERROR_OK)
+               goto error_return;
+
+       if (num_fields == 1) {
+               char *str;
+               str = buf_to_hex_str(fields[0].in_value, fields[0].num_bits);
+               command_print(CMD, "%s", str);
+               free(str);
+       }
 
 error_return:
        for (i = 0; i < num_fields; i++)

-- 


_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to