fpga: don't warn on BSDLs that share an IDCODE in autoinit

Several BSDL files can legitimately match one IDCODE (same die in
different packages, or twins like SmartFusion2 / IGLOO2). The autoinit
loader loaded every match onto the device, silently overwriting the
first, and flagged it as "ID conflit ?". Keep the first match and skip
later files with the same IDCODE instead.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-24 10:46:58 +02:00
parent 3579c5efb0
commit d579c56de6

View File

@@ -1533,8 +1533,16 @@ static int cmd_autoinit(script_ctx *ctx, char *line)
{
if (jtagcore_get_number_of_pins(jc, dev_nb) > 0)
{
// Device already loaded !
ctx->script_printf(ctx, MSG_WARNING, "Device %d BSDL already loaded ! ID conflit ?\n", dev_nb);
// A BSDL is already attached to this device.
// Several files can legitimately share one
// IDCODE (same die in different packages, or
// twins like SmartFusion2 / IGLOO2). Keep the
// first match and just note the others, rather
// than overwriting it and crying "conflict".
ctx->script_printf(ctx, MSG_INFO_0,
"[skip] %s also matches device %d's IDCODE; keeping the BSDL already loaded\n",
fileinfo.filename, dev_nb);
continue;
}
// The BSDL ID match with the device.