script: jtag_autoinit returns success, count via last_data_value
It returned the loaded-BSDL count, which the engine flagged as an error
code ("Command failed with code: 1") whenever a BSDL matched. Stash the
count in last_data_value and return JTAG_CORE_NO_ERROR instead.
This commit is contained in:
@@ -1575,7 +1575,10 @@ static int cmd_autoinit(script_ctx *ctx, char *line)
|
||||
return JTAG_CORE_ACCESS_ERROR;
|
||||
}
|
||||
|
||||
return loaded_bsdl;
|
||||
// Expose the count to scripts via last_data_value, but report success
|
||||
// (a non-zero return is treated as an error code by the engine).
|
||||
ctx->last_data_value = loaded_bsdl;
|
||||
return JTAG_CORE_NO_ERROR;
|
||||
}
|
||||
|
||||
const char *cmd_init_and_scan_help[] = {
|
||||
|
||||
Reference in New Issue
Block a user