From 3fb071bc86865f8790872e56b0d45dfd553a9744 Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Thu, 4 Jun 2026 16:19:57 +0200 Subject: [PATCH] xilinxPlatformCableUSB: adapts firmware to PID (0x0d: xusb_emb.hex, 0x0013: xusb_xp2.hex --- src/xilinxPlatformCableUSB.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/xilinxPlatformCableUSB.cpp b/src/xilinxPlatformCableUSB.cpp index 4245e90..817369c 100644 --- a/src/xilinxPlatformCableUSB.cpp +++ b/src/xilinxPlatformCableUSB.cpp @@ -70,9 +70,17 @@ XilinxPlatformCableUSB::XilinxPlatformCableUSB(const uint16_t vid, if (!firmware_path.empty()) firmware_file = firmware_path; else if (strlen(VIVADO_DIR) > 0) - firmware_file = VIVADO_DIR "/data/xicom/xusb_xp2.hex"; + firmware_file = VIVADO_DIR "/data/xicom/"; else if (strlen(ISE_DIR) > 0) - firmware_file = ISE_DIR "/ISE_DS/ISE/bin/lin64/xusb_xp2.hex"; + firmware_file = ISE_DIR "/ISE_DS/ISE/bin/lin64/"; + + if (firmware_path.empty()) { + if (pid == 0x0d) + firmware_file += "xusb_emb.hex"; + else + firmware_file += "xusb_xp2.hex"; + } + printInfo("firmware_file : " + firmware_file); try { fx2 = std::make_unique(vid, pid, XPCU_INITIALIZED_VID,