diff options
author | Paul Fertser <fercerpav@gmail.com> | 2023-05-02 15:15:21 +0300 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2023-05-13 09:24:05 +0000 |
commit | 3a4f445bd92101d3daee3715178d3fbff3b7b029 (patch) | |
tree | 504c45930274f49874eb51049e16ad9f610f2034 /src | |
parent | 8d12ae796ead267aeef48467ccd49ec4c2f863ad (diff) | |
download | riscv-openocd-3a4f445bd92101d3daee3715178d3fbff3b7b029.zip riscv-openocd-3a4f445bd92101d3daee3715178d3fbff3b7b029.tar.gz riscv-openocd-3a4f445bd92101d3daee3715178d3fbff3b7b029.tar.bz2 |
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 <fercerpav@gmail.com>
Change-Id: I42580ecd75ae824a4145f6f17f0df9bcf825b50f
Reviewed-on: https://review.openocd.org/c/openocd/+/7654
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Diffstat (limited to 'src')
-rw-r--r-- | src/jtag/tcl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c index 3954390..934b603 100644 --- a/src/jtag/tcl.c +++ b/src/jtag/tcl.c @@ -116,6 +116,11 @@ COMMAND_HANDLER(handle_jtag_command_drscan) return ERROR_COMMAND_ARGUMENT_INVALID; } + if (tap->bypass) { + command_print(CMD, "Can't execute as the selected tap is in BYPASS"); + return ERROR_FAIL; + } + tap_state_t endstate = TAP_IDLE; if (CMD_ARGC > 3 && !strcmp("-endstate", CMD_ARGV[CMD_ARGC - 2])) { const char *state_name = CMD_ARGV[CMD_ARGC - 1]; |