This is an automated email from Gerrit.

"Paul Fertser <fercer...@gmail.com>" just uploaded a new patch set to Gerrit, 
which you can find at https://review.openocd.org/c/openocd/+/7654

-- gerrit

commit 19dec3227bb433279cccd147630d8af2a69967e1
Author: Paul Fertser <fercer...@gmail.com>
Date:   Tue May 2 15:15:21 2023 +0300

    jtag: tcl: show error message when attempting manual "drscan" on a bypassed 
tap
    
    To perform any meaningful manipulations with DR the corresponding IR should
    be set to a relevant instruction, not BYPASS, so warn the user accordingly.
    
    Signed-off-by: Paul Fertser <fercer...@gmail.com>
    Change-Id: I42580ecd75ae824a4145f6f17f0df9bcf825b50f

diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c
index 1f321e840b..aa8ec986a3 100644
--- a/src/jtag/tcl.c
+++ b/src/jtag/tcl.c
@@ -155,6 +155,11 @@ static int jim_command_drscan(Jim_Interp *interp, int 
argc, Jim_Obj * const *arg
        if (!tap)
                return JIM_ERR;
 
+       if (tap->bypass) {
+               Jim_SetResultString(interp, "drscan: can't execute as the 
selected tap is in BYPASS", -1);
+               return JIM_ERR;
+       }
+
        num_fields = (argc-2)/2;
        if (num_fields <= 0) {
                Jim_SetResultString(interp, "drscan: no scan fields supplied", 
-1);

-- 

Reply via email to