Open doonny opened 11 months ago
Hi, can you try compiling the latest version?
@fuger222 Thx for the update , I could comiple the driver now. But when trying to initialize the driver, the following error shows up :
main.c:87:main | errno: 11 | Platform cable not found or already initialized pc@pc:~/Download/libxpc$ sudo ./xpc identify main.c:15:_Init | errno: 11 | Platform cable initialization failure
I have checked the usb cable was recognized by the OS:
[ 346.502040] usb 1-1.1: new high-speed USB device number 5 using xhci_hcd [ 346.613192] usb 1-1.1: New USB device found, idVendor=0403, idProduct=6010 [ 346.613196] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 346.613199] usb 1-1.1: Product: Digilent Adept USB Device [ 346.613201] usb 1-1.1: Manufacturer: Digilent [ 346.613204] usb 1-1.1: SerialNumber: 210203825967 [ 346.628546] usbcore: registered new interface driver ftdi_sio [ 346.628567] usbserial: USB Serial support registered for FTDI USB Serial Device [ 346.628620] ftdi_sio 1-1.1:1.0: FTDI USB Serial Device converter detected [ 346.628657] usb 1-1.1: Detected FT2232H [ 346.629648] usb 1-1.1: FTDI USB Serial Device converter now attached to ttyUSB0 [ 346.629672] ftdi_sio 1-1.1:1.1: FTDI USB Serial Device converter detected [ 346.629700] usb 1-1.1: Detected FT2232H [ 346.630406] usb 1-1.1: FTDI USB Serial Device converter now attached to ttyUSB1 pc@pc:~/Download/libxpc$ sudo ./xpc init
What might cause this problem ?
lsusb shows the following info:
pc@pc:~/Download/libxpc$ sudo lsusb Bus 002 Device 002: ID 045b:0210 Hitachi, Ltd Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 1c4f:0027 SiGma Micro Bus 001 Device 003: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse Bus 001 Device 005: ID 0403:6010 Future Technology Devices International, Ltd FT2232C Dual USB-UART/FIFO IC Bus 001 Device 002: ID 045b:0209 Hitachi, Ltd Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
@doonny This is meant to be a warning, not an actual error message. Cables with an FTDI chip are completely "plug and play", they don't require any kind of initialization, so you can safely ignore the first one.
But keep in mind that I originally made this driver for an older cable that had a Cypress FX2 chip inside. I tried to add FTDI support a while ago too, but everything other than the xpc identify
is untested, and very likely doesn't work at all.
As for why xpc identify
didn't work, it was looking for a USB device with ID 0403:6014. I've added 0403:6010 too.
Thx for the reply, other functions does not work either.
Hi, I am trying to build this tool on Ubuntu 20.04, I have install libftdi1-dev libusb-1.0-0-dev, and when compiling, the following error shows up:
gcc -oxpc obj/main.o libxpc.a -lusb-1.0 -lftdi1 -fsanitize=address obj/main.o: In function
_Init': /home/fpga/Downloads/libxpc/main.c:15: undefined reference to
strerrordesc_np' /home/fpga/Downloads/libxpc/main.c:15: undefined reference tostrerrorname_np' obj/main.o: In function
main': /home/fpga/Downloads/libxpc/main.c:22: undefined reference tostrerrordesc_np' /home/fpga/Downloads/libxpc/main.c:22: undefined reference to
strerrorname_np' /home/fpga/Downloads/libxpc/main.c:48: undefined reference tostrerrordesc_np' /home/fpga/Downloads/libxpc/main.c:48: undefined reference to
strerrorname_np' /home/fpga/Downloads/libxpc/main.c:52: undefined reference tostrerrordesc_np' /home/fpga/Downloads/libxpc/main.c:52: undefined reference to
strerrorname_np' /home/fpga/Downloads/libxpc/main.c:87: undefined reference tostrerrordesc_np' /home/fpga/Downloads/libxpc/main.c:87: undefined reference to
strerrorname_np' libxpc.a(driver.o): In functionXPC_Disable': /home/fpga/Downloads/libxpc/driver.c:17: undefined reference to
strerrordesc_np' /home/fpga/Downloads/libxpc/driver.c:17: undefined reference tostrerrorname_np' libxpc.a(driver.o): In function
XPC_Enable': /home/fpga/Downloads/libxpc/driver.c:21: undefined reference tostrerrordesc_np' /home/fpga/Downloads/libxpc/driver.c:21: undefined reference to
strerrorname_np' libxpc.a(driver.o): In functionXPC_SetClock': /home/fpga/Downloads/libxpc/driver.c:27: undefined reference to
strerrordesc_np' /home/fpga/Downloads/libxpc/driver.c:27: undefined reference tostrerrorname_np' libxpc.a(driver.o): In function
XPC_ReadCPLDVersion': /home/fpga/Downloads/libxpc/driver.c:37: undefined reference tostrerrordesc_np' /home/fpga/Downloads/libxpc/driver.c:37: undefined reference to
strerrorname_np' libxpc.a(driver.o): In functionXPC_ReadFirmwareVersion': /home/fpga/Downloads/libxpc/driver.c:41: undefined reference to
strerrordesc_np' /home/fpga/Downloads/libxpc/driver.c:41: undefined reference tostrerrorname_np' libxpc.a(driver.o): In function
XPC_JTAGTransfer': /home/fpga/Downloads/libxpc/driver.c:45: undefined reference tostrerrordesc_np' /home/fpga/Downloads/libxpc/driver.c:45: undefined reference to
strerrorname_np' /home/fpga/Downloads/libxpc/driver.c:52: undefined reference tostrerrordesc_np' /home/fpga/Downloads/libxpc/driver.c:52: undefined reference to
strerrorname_np' /home/fpga/Downloads/libxpc/driver.c:60: undefined reference tostrerrordesc_np' /home/fpga/Downloads/libxpc/driver.c:60: undefined reference to
strerrorname_np' libxpc.a(driver.o): In functionXPC_Connect': /home/fpga/Downloads/libxpc/driver.c:91: undefined reference to
strerrordesc_np' /home/fpga/Downloads/libxpc/driver.c:91: undefined reference tostrerrorname_np' libxpc.a(driver.o): In function
XPC_Initialize': /home/fpga/Downloads/libxpc/driver.c:102: undefined reference tostrerrordesc_np' /home/fpga/Downloads/libxpc/driver.c:102: undefined reference to
strerrorname_np' /home/fpga/Downloads/libxpc/driver.c:106: undefined reference tostrerrordesc_np' /home/fpga/Downloads/libxpc/driver.c:106: undefined reference to
strerrorname_np' libxpc.a(driver.o): In functionXPC_InitializeFTDI': /home/fpga/Downloads/libxpc/driver.c:123: undefined reference to
strerrordesc_np' /home/fpga/Downloads/libxpc/driver.c:123: undefined reference tostrerrorname_np' libxpc.a(driver.o): In function
JTAG_Flush': /home/fpga/Downloads/libxpc/driver.c:192: undefined reference tostrerrordesc_np' /home/fpga/Downloads/libxpc/driver.c:192: undefined reference to
strerrorname_np' /home/fpga/Downloads/libxpc/driver.c:195: undefined reference tostrerrordesc_np' /home/fpga/Downloads/libxpc/driver.c:195: undefined reference to
strerrorname_np' libxpc.a(driver.o): In functionJTAG_Enqueue': /home/fpga/Downloads/libxpc/driver.c:228: undefined reference to
strerrordesc_np' /home/fpga/Downloads/libxpc/driver.c:228: undefined reference tostrerrorname_np' /home/fpga/Downloads/libxpc/driver.c:234: undefined reference to
strerrordesc_np' /home/fpga/Downloads/libxpc/driver.c:234: undefined reference tostrerrorname_np' libxpc.a(driver.o): In function
JTAG_WriteInstructionRegisterBits': /home/fpga/Downloads/libxpc/driver.c:270: undefined reference tostrerrordesc_np' /home/fpga/Downloads/libxpc/driver.c:270: undefined reference to
strerrorname_np' libxpc.a(driver.o): In functionJTAG_ReadWriteDataRegisterBitsFTDI': /home/fpga/Downloads/libxpc/driver.c:294: undefined reference to
strerrordesc_np' /home/fpga/Downloads/libxpc/driver.c:294: undefined reference tostrerrorname_np' /home/fpga/Downloads/libxpc/driver.c:300: undefined reference to
strerrordesc_np' /home/fpga/Downloads/libxpc/driver.c:300: undefined reference tostrerrorname_np' /home/fpga/Downloads/libxpc/driver.c:302: undefined reference to
strerrordesc_np' /home/fpga/Downloads/libxpc/driver.c:302: undefined reference tostrerrorname_np' libxpc.a(driver.o): In function
JTAG_ReadWriteDataRegisterFTDI': /home/fpga/Downloads/libxpc/driver.c:309: undefined reference tostrerrordesc_np' /home/fpga/Downloads/libxpc/driver.c:309: undefined reference to
strerrorname_np' /home/fpga/Downloads/libxpc/driver.c:312: undefined reference tostrerrordesc_np' /home/fpga/Downloads/libxpc/driver.c:312: undefined reference to
strerrorname_np' /home/fpga/Downloads/libxpc/driver.c:324: undefined reference tostrerrordesc_np' /home/fpga/Downloads/libxpc/driver.c:324: undefined reference to
strerrorname_np' libxpc.a(dlc9lp.o): In functionXPC_CypressFX2WriteRAM': /home/fpga/Downloads/libxpc/dlc9lp.c:7: undefined reference to
strerrordesc_np' /home/fpga/Downloads/libxpc/dlc9lp.c:7: undefined reference to `strerrorname_np' collect2: error: ld returned 1 exit status Makefile:6: recipe for target 'xpc' failed make: *** [xpc] Error 1Can you help ? Thx