From d579c56de6093751c4ed59e6684be13c85bc4e79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Sun, 24 May 2026 10:46:58 +0200 Subject: [PATCH] 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 --- modules/script/script.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/script/script.c b/modules/script/script.c index 70c67dc..3b47a85 100644 --- a/modules/script/script.c +++ b/modules/script/script.c @@ -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.