if tap enable/disable failed then a warning was written to the log, but JIM_OK was returned. if using openocd via a TCP interface to the TCL port, there is no way to catch that the command failed (it didn't enable the tap, so it failed)
now it return an error if it fails.
if (strcasecmp(cmd_name, "tapisenabled") == 0) {
// do nothing, just return the value
} else if (strcasecmp(cmd_name, "tapenable") == 0) {
if (strcasecmp(cmd_name, "tapisenabled") == 0) {
// do nothing, just return the value
} else if (strcasecmp(cmd_name, "tapenable") == 0) {
- if (!jtag_tap_enable(t))
+ if (!jtag_tap_enable(t)){
LOG_WARNING("failed to enable tap %s", t->dotted_name);
LOG_WARNING("failed to enable tap %s", t->dotted_name);
} else if (strcasecmp(cmd_name, "tapdisable") == 0) {
} else if (strcasecmp(cmd_name, "tapdisable") == 0) {
- if (!jtag_tap_disable(t))
+ if (!jtag_tap_disable(t)){
LOG_WARNING("failed to disable tap %s", t->dotted_name);
LOG_WARNING("failed to disable tap %s", t->dotted_name);
} else {
LOG_ERROR("command '%s' unknown", cmd_name);
return JIM_ERR;
} else {
LOG_ERROR("command '%s' unknown", cmd_name);
return JIM_ERR;