script: show drv/probe index in jtag_get_probes_list output

The probe ID printed by jtag_get_probes_list is the hex value to pass
verbatim to jtag_open_probe (parsed as base 16), but reading
"ID 0x00000000" and typing "1" as a 1-based index is a natural mistake
— and jtag_open_probe will accept 1, fail with a misleading
"FT_DEVICE_NOT_FOUND" since (drv=0, probe=1) does not exist.

Append explicit [drv N, probe M] decomposition so the value to copy is
unambiguous.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-23 10:49:16 +02:00
parent 0bd109c209
commit 3c1e5f987e

View File

@@ -1751,7 +1751,7 @@ static int cmd_print_probes_list(script_ctx *ctx, char *line)
while (i < nb_of_probes)
{
jtagcore_get_probe_name(jc, PROBE_ID(j, i), probe_list);
ctx->script_printf(ctx, MSG_INFO_0, "ID 0x%.8X : %s\n", PROBE_ID(j, i), probe_list);
ctx->script_printf(ctx, MSG_INFO_0, "ID 0x%.8X [drv %d, probe %d] %s\n", PROBE_ID(j, i), j, i, probe_list);
i++;
}
j++;