openFPGALoader/src
r4d10n 9e548983f9 esp_usb_jtag: disambiguate multiple boards via --busdev-num and --usb-serial-num
libusb_open_device_with_vid_pid() returns the first VID:PID match, so
with two ESP32-S3 cables connected, every invocation programmed the
same board. Replace it with a libusb_get_device_list() iteration that
also honours cable.bus_addr/device_addr (already exposed as
--busdev-num) and --usb-serial-num flag that matches the device
iSerialNumber by substring (useful with MAC-derived serials).

The -d /dev/ttyACM* path could not help: that's the CDC-ACM interface
(iface 0), while JTAG is on the vendor iface 2 reached via libusb;
ttyACM numbering and libusb enumeration order are independent.

Constraint: must keep existing single-board invocations working without flag changes
Confidence: high
Scope-risk: narrow
Directive: arguments struct uses positional aggregate init at main.cpp:120; new fields must add a matching slot
Not-tested: simultaneous two-board programming on real hardware (single-board path verified to build)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 18:28:31 +02:00
..
altera.cpp altera: fix 64 bits hex display (PRIx64) 2026-04-08 17:31:39 +02:00
altera.hpp altera: agilex3/agilex5 support draft (memory only) 2026-04-08 16:51:45 +02:00
anlogic.cpp SPIInterface -> FlashInterface 2026-03-21 07:59:18 +01:00
anlogic.hpp SPIInterface -> FlashInterface 2026-03-21 07:59:18 +01:00
anlogicBitParser.cpp all/everything/world: removed using namespace std to be able to compile in c++17 with windows 2026-03-18 15:28:34 +01:00
anlogicBitParser.hpp move to APACHE-2.0 license 2021-06-26 15:24:07 +02:00
anlogicCable.cpp all/everything/world: removed using namespace std to be able to compile in c++17 with windows 2026-03-18 15:28:34 +01:00
anlogicCable.hpp all jtag cable: no more hardcoding tdi bit with writeTMS 2023-10-29 06:41:39 +01:00
bitparser.cpp bitparser: Add `COMPRESS` key. 2026-04-20 21:01:42 +02:00
bitparser.hpp move to APACHE-2.0 license 2021-06-26 15:24:07 +02:00
board.hpp board.hpp: Add brs-100-gw1nr9 2026-05-13 16:21:38 +10:00
bpiFlash.cpp Adding BPI flash support and YPCB board support 2026-02-13 12:03:38 +01:00
bpiFlash.hpp Adding BPI flash support and YPCB board support 2026-02-13 12:03:38 +01:00
cable.hpp xilinxPlatformCableUSB: driver for Xilinx Platform Cable USB probe 2026-05-14 14:33:44 +02:00
ch347jtag.cpp all/everything/world: removed using namespace std to be able to compile in c++17 with windows 2026-03-18 15:28:34 +01:00
ch347jtag.hpp ch347jtag: align tms/tdi uses to others cables 2026-02-21 10:26:57 +01:00
ch552_jtag.cpp all/everything/world: removed using namespace std to be able to compile in c++17 with windows 2026-03-18 15:28:34 +01:00
ch552_jtag.hpp all jtag cable: no more hardcoding tdi bit with writeTMS 2023-10-29 06:41:39 +01:00
cmsisDAP.cpp all/everything/world: removed using namespace std to be able to compile in c++17 with windows 2026-03-18 15:28:34 +01:00
cmsisDAP.hpp all jtag cable: no more hardcoding tdi bit with writeTMS 2023-10-29 06:41:39 +01:00
colognechip.cpp colognechip: fix -Wshift-op-parentheses warning 2026-04-03 07:48:50 +02:00
colognechip.hpp SPIInterface -> FlashInterface 2026-03-21 07:59:18 +01:00
colognechipCfgParser.cpp make output buffer const 2023-08-29 19:51:41 +03:00
colognechipCfgParser.hpp colognechip integration: apply review remarks 2021-12-12 11:55:10 +01:00
common.cpp fix to have an happy CI 2025-03-18 23:02:11 +01:00
common.hpp fix to have an happy CI 2025-03-18 23:02:11 +01:00
configBitstreamParser.cpp all/everything/world: removed using namespace std to be able to compile in c++17 with windows 2026-03-18 15:28:34 +01:00
configBitstreamParser.hpp configBitstreamParser: added filename getter 2025-09-24 08:06:28 +02:00
cxxopts.hpp typo's, added git as dependency 2022-12-18 13:56:54 +01:00
device.cpp all/everything/world: removed using namespace std to be able to compile in c++17 with windows 2026-03-18 15:28:34 +01:00
device.hpp device: added verbose_level attribute 2025-06-03 11:24:36 +02:00
dfu.cpp all/everything/world: removed using namespace std to be able to compile in c++17 with windows 2026-03-18 15:28:34 +01:00
dfu.hpp DFU: fix code to accept tinyDFU implementation (where not altsettings have an DFU descriptor) 2024-02-15 06:45:13 +01:00
dfuFileParser.cpp dfuFileParser: nitpick 2026-04-03 10:33:12 +02:00
dfuFileParser.hpp dfuFileParser: nitpick 2026-04-03 10:33:12 +02:00
dirtyJtag.cpp all/everything/world: removed using namespace std to be able to compile in c++17 with windows 2026-03-18 15:28:34 +01:00
dirtyJtag.hpp dirtyJtag: rework error messages in constructor. Added a method to close USB (and to avoids to have multiple time the same piece of code) 2026-03-12 18:45:25 +01:00
display.cpp display: std::endl -> \n 2025-08-26 17:51:31 +02:00
display.hpp src/xx: cppcheck 2023-04-15 08:20:05 +02:00
efinix.cpp Efinix: Check for presence of mode header value before checking it 2026-04-27 15:06:21 +02:00
efinix.hpp SPIInterface -> FlashInterface 2026-03-21 07:59:18 +01:00
efinixHexParser.cpp all/everything/world: removed using namespace std to be able to compile in c++17 with windows 2026-03-18 15:28:34 +01:00
efinixHexParser.hpp efinix: Add header parsing and flash programming validation 2025-12-12 02:55:31 +00:00
esp_usb_jtag.cpp esp_usb_jtag: disambiguate multiple boards via --busdev-num and --usb-serial-num 2026-05-14 18:28:31 +02:00
esp_usb_jtag.hpp esp_usb_jtag: disambiguate multiple boards via --busdev-num and --usb-serial-num 2026-05-14 18:28:31 +02:00
feaparser.cpp all/everything/world: removed using namespace std to be able to compile in c++17 with windows 2026-03-18 15:28:34 +01:00
feaparser.hpp src/xx: cppcheck 2023-04-15 08:20:05 +02:00
flashInterface.cpp SPIInterface -> FlashInterface 2026-03-21 07:59:18 +01:00
flashInterface.hpp SPIInterface -> FlashInterface 2026-03-21 07:59:18 +01:00
fsparser.cpp fsparser: check lines length 2026-04-10 09:26:08 +02:00
fsparser.hpp move to APACHE-2.0 license 2021-06-26 15:24:07 +02:00
ftdiJtagBitbang.cpp all/everything/world: removed using namespace std to be able to compile in c++17 with windows 2026-03-18 15:28:34 +01:00
ftdiJtagBitbang.hpp all jtag cable: no more hardcoding tdi bit with writeTMS 2023-10-29 06:41:39 +01:00
ftdiJtagMPSSE.cpp all/everything/world: removed using namespace std to be able to compile in c++17 with windows 2026-03-18 15:28:34 +01:00
ftdiJtagMPSSE.hpp Add workaround for slow JTAG on Sipeed Console 2026-02-08 10:55:22 +01:00
ftdipp_mpsse.cpp all/everything/world: removed using namespace std to be able to compile in c++17 with windows 2026-03-18 15:28:34 +01:00
ftdipp_mpsse.hpp Add faulty MPSEE cmd 8E workaround 2024-01-27 13:02:46 +01:00
ftdispi.cpp SPIInterface -> FlashInterface 2026-03-21 07:59:18 +01:00
ftdispi.hpp SPIInterface -> FlashInterface 2026-03-21 07:59:18 +01:00
fx2_ll.cpp fx2_ll: check load_firmware return code. Added some progressbar. Allows caller to set the alternate setting for an interface. Expose windex in write_ctrl/read_ctrl 2026-05-14 14:33:21 +02:00
fx2_ll.hpp fx2_ll: check load_firmware return code. Added some progressbar. Allows caller to set the alternate setting for an interface. Expose windex in write_ctrl/read_ctrl 2026-05-14 14:33:21 +02:00
gowin.cpp gowin: fix checksum header key typo 2026-04-24 16:34:17 +03:00
gowin.hpp SPIInterface -> FlashInterface 2026-03-21 07:59:18 +01:00
gwu2x_jtag.cpp ../src/gwu2x_jtag.cpp 2024-05-22 20:54:14 +02:00
gwu2x_jtag.hpp added support for Gowin GWU2X USB (JTAG mode) (#434) 2024-05-20 21:10:29 +02:00
ice40.cpp SPIInterface -> FlashInterface 2026-03-21 07:59:18 +01:00
ice40.hpp SPIInterface -> FlashInterface 2026-03-21 07:59:18 +01:00
ihexParser.cpp all/everything/world: removed using namespace std to be able to compile in c++17 with windows 2026-03-18 15:28:34 +01:00
ihexParser.hpp move to APACHE-2.0 license 2021-06-26 15:24:07 +02:00
jedParser.cpp all/everything/world: removed using namespace std to be able to compile in c++17 with windows 2026-03-18 15:28:34 +01:00
jedParser.hpp src/xx: cppcheck 2023-04-15 08:20:05 +02:00
jetsonNanoJtagBitbang.cpp all jtag cable: no more hardcoding tdi bit with writeTMS 2023-10-29 06:41:39 +01:00
jetsonNanoJtagBitbang.hpp all jtag cable: no more hardcoding tdi bit with writeTMS 2023-10-29 06:41:39 +01:00
jlink.cpp all/everything/world: removed using namespace std to be able to compile in c++17 with windows 2026-03-18 15:28:34 +01:00
jlink.hpp all jtag cable: no more hardcoding tdi bit with writeTMS 2023-10-29 06:41:39 +01:00
jtag.cpp esp_usb_jtag: disambiguate multiple boards via --busdev-num and --usb-serial-num 2026-05-14 18:28:31 +02:00
jtag.hpp jtag: allows caller to specify tdi level in toggleClk method 2025-06-18 10:01:16 +02:00
jtagInterface.hpp all jtag cable: no more hardcoding tdi bit with writeTMS 2023-10-29 06:41:39 +01:00
lattice.cpp SPIInterface -> FlashInterface 2026-03-21 07:59:18 +01:00
lattice.hpp SPIInterface -> FlashInterface 2026-03-21 07:59:18 +01:00
latticeBitParser.cpp latticeBitParser: fix previous commit 2026-04-06 17:31:48 +02:00
latticeBitParser.hpp latticeBitParser: check file size during parse. Improved a bit parsing speed 2026-04-06 17:22:02 +02:00
latticeSSPI.cpp latticeSSPI: uses registers struct for status 2025-06-19 09:51:44 +02:00
latticeSSPI.hpp latticeSSPI: ECP5 driver for Slave SPI mode 2025-06-19 08:34:29 +02:00
libgpiodJtagBitbang.cpp libgpiodJtagBitbang: add support for XVC server 2025-03-10 15:29:06 +01:00
libgpiodJtagBitbang.hpp libgpiodJtagBitbang: add support for XVC server 2025-03-10 15:29:06 +01:00
libusb_ll.cpp all/everything/world: removed using namespace std to be able to compile in c++17 with windows 2026-03-18 15:28:34 +01:00
libusb_ll.hpp libusb_ll: rework. Splitted scan method -> help futur dev with a common code to detect/select usb devices 2024-05-20 16:18:50 +02:00
main.cpp esp_usb_jtag: disambiguate multiple boards via --busdev-num and --usb-serial-num 2026-05-14 18:28:31 +02:00
mcsParser.cpp mcsParser: added guard to avoir bound check failures. Improved code speed with c++17 2026-04-03 10:01:28 +02:00
mcsParser.hpp mcsParser: reworks code to uses FlashDataSection 2025-12-17 20:05:11 +01:00
openFPGALoader.h.in Update cmake according to trabucayre request https://github.com/trabucayre/openFPGALoader/pull/17 2020-01-27 09:47:42 +01:00
part.hpp part: added Agilex3 A3CZ135 2026-04-08 17:02:36 +02:00
pathHelper.cpp msys2: Fix absolute windows paths 2022-10-23 13:10:45 +10:30
pathHelper.hpp msys2: Fix absolute windows paths 2022-10-23 13:10:45 +10:30
pofParser.cpp pofParser: added bound check tests 2026-04-01 10:58:22 +02:00
pofParser.hpp pofParser: ARRAY2INT32: must be casted to uin32_t not uint16_t 2026-04-01 10:32:38 +02:00
progressBar.cpp main,progressBar: --force-terminal-mode argument to force progress bar output as if connected to a terminal (#629) 2026-03-13 09:28:54 +01:00
progressBar.hpp main,progressBar: --force-terminal-mode argument to force progress bar output as if connected to a terminal (#629) 2026-03-13 09:28:54 +01:00
rawParser.cpp all/everything/world: removed using namespace std to be able to compile in c++17 with windows 2026-03-18 15:28:34 +01:00
rawParser.hpp more typo fixes 2022-12-18 23:29:21 +01:00
remoteBitbang_client.cpp all/everything/world: removed using namespace std to be able to compile in c++17 with windows 2026-03-18 15:28:34 +01:00
remoteBitbang_client.hpp all jtag cable: no more hardcoding tdi bit with writeTMS 2023-10-29 06:41:39 +01:00
spiFlash.cpp SPIInterface -> FlashInterface 2026-03-21 07:59:18 +01:00
spiFlash.hpp SPIInterface -> FlashInterface 2026-03-21 07:59:18 +01:00
spiFlashdb.hpp add Adesto AT25DF321A support 2026-04-09 15:51:30 +03:00
svf_jtag.cpp all/everything/world: removed using namespace std to be able to compile in c++17 with windows 2026-03-18 15:28:34 +01:00
svf_jtag.hpp all/everything/world: removed using namespace std to be able to compile in c++17 with windows 2026-03-18 15:28:34 +01:00
usbBlaster.cpp usbBlaster: added explicit windex when read_ctrl is used 2026-05-14 14:33:37 +02:00
usbBlaster.hpp Global: added option to select/deselect all cables, added variables ENABLE_xxx to enable corresponding cables. Some vendor drivers needs to to be disabled accordlingly 2025-12-26 09:17:06 +01:00
xilinx.cpp Merge pull request #658 from hgomersall/master 2026-05-02 12:51:25 +02:00
xilinx.hpp SPIInterface -> FlashInterface 2026-03-21 07:59:18 +01:00
xilinxMapParser.cpp all/everything/world: removed using namespace std to be able to compile in c++17 with windows 2026-03-18 15:28:34 +01:00
xilinxMapParser.hpp xilinxMapParser: typo 2021-10-03 16:46:12 +02:00
xilinxPlatformCableUSB.cpp xilinxPlatformCableUSB: driver for Xilinx Platform Cable USB probe 2026-05-14 14:33:44 +02:00
xilinxPlatformCableUSB.hpp xilinxPlatformCableUSB: driver for Xilinx Platform Cable USB probe 2026-05-14 14:33:44 +02:00
xvc_client.cpp all/everything/world: removed using namespace std to be able to compile in c++17 with windows 2026-03-18 15:28:34 +01:00
xvc_client.hpp all jtag cable: no more hardcoding tdi bit with writeTMS 2023-10-29 06:41:39 +01:00
xvc_server.cpp xvc server: increase buffer size to 1MiB for improved performance over slow connections 2026-04-19 16:10:44 -07:00
xvc_server.hpp all/everything/world: removed using namespace std to be able to compile in c++17 with windows 2026-03-18 15:28:34 +01:00