Menu

#20 xc3sprog does not work with Xilinx cable on second try

Error
open
nobody
None
5
2020-09-11
2017-02-22
No

xc3sprog will succesfully scan the IR chain on the first invocation with "-c xpc" parameter. However, on the second and subsequent invocations, it will fail to communicate with the programmer.

To recover, one needs to power cycle the programmer and reload its firmware.

[mrnuke@dev2 build]$ ./xc3sprog -c xpc
XC3SPROG (c) 2004-2011 xc3sprog project $Rev$ OS: Linux
[snip]
JTAG loc.: 0 IDCODE: 0x43651093 Desc: XC7K325T Rev: E IR length: 6

[mrnuke@dev2 build]$ ./xc3sprog -c xpc
XC3SPROG (c) 2004-2011 xc3sprog project $Rev$ OS: Linux
[snip]
usb_control_msg(0x28 12) Connection timed out

Discussion

  • Philipp Klaus Krause

    I see the same problem (using a platform cable USB DLC9G - which cable are you using?):

    philipp@notebook5:~$ xc3sprog -c xpc
    XC3SPROG (c) 2004-2011 xc3sprog project $Rev$ OS: Linux
    Free software: If you contribute nothing, expect nothing!
    Feedback on success/failure/enhancement requests:
        http://sourceforge.net/mail/?group_id=170565 
    Check Sourceforge for updates:
        http://sourceforge.net/projects/xc3sprog/develop
    
    JTAG loc.:   0  IDCODE: 0x59602093  Desc:                       XC9536XL Rev: E  IR length:  8
    philipp@notebook5:~$ xc3sprog -c xpc
    XC3SPROG (c) 2004-2011 xc3sprog project $Rev$ OS: Linux
    Free software: If you contribute nothing, expect nothing!
    Feedback on success/failure/enhancement requests:
        http://sourceforge.net/mail/?group_id=170565 
    Check Sourceforge for updates:
        http://sourceforge.net/projects/xc3sprog/develop
    
    usb_control_msg(0x28 12) error sending control message: Connection timed out
    
     

    Last edit: Philipp Klaus Krause 2019-12-13
    • Philipp Klaus Krause

      For information, the output is a bit different when no device is attached to JTAG, but xc3sprog still fails on the second invokation, then the timeout comes on the third:

      philipp@notebook5:/tmp/xc3sprog-code/build$ ./xc3sprog -c xpc
      XC3SPROG (c) 2004-2011 xc3sprog project $Rev: 795 $ OS: Linux
      Free software: If you contribute nothing, expect nothing!
      Feedback on success/failure/enhancement requests:
          http://sourceforge.net/mail/?group_id=170565 
      Check Sourceforge for updates:
          http://sourceforge.net/projects/xc3sprog/develop
      
      No JTAG Chain found
      philipp@notebook5:/tmp/xc3sprog-code/build$ ./xc3sprog -c xpc
      XC3SPROG (c) 2004-2011 xc3sprog project $Rev: 795 $ OS: Linux
      Free software: If you contribute nothing, expect nothing!
      Feedback on success/failure/enhancement requests:
          http://sourceforge.net/mail/?group_id=170565 
      Check Sourceforge for updates:
          http://sourceforge.net/projects/xc3sprog/develop
      
      
      usb_bulk_read error(shift): No error
      Cannot find device having IDCODE=0007f47 Revision A
      JTAG loc.:   0  IDCODE: 0x00007f47  not found in 'built-in device list'.
      philipp@notebook5:/tmp/xc3sprog-code/build$ ./xc3sprog -c xpc
      XC3SPROG (c) 2004-2011 xc3sprog project $Rev: 795 $ OS: Linux
      Free software: If you contribute nothing, expect nothing!
      Feedback on success/failure/enhancement requests:
          http://sourceforge.net/mail/?group_id=170565 
      Check Sourceforge for updates:
          http://sourceforge.net/projects/xc3sprog/develop
      
      usb_control_msg(0x28 12) error sending control message: Connection timed out
      
       

      Last edit: Philipp Klaus Krause 2019-12-14
  • Uwe Bonnes

    Uwe Bonnes - 2019-12-13

    I will have a look at it if you give me a head start how to get my DLC10 working under linux again without downloading impact/vivado whatever. Best head start would be a patch request for XC3Sprog with some updated Readme.DLC10.

     
    • Philipp Klaus Krause

      My /etc/udev/rules.d/xusbdfwu.rules rules look like:
      https://github.com/timvideos/litex-buildenv/wiki/Xilinx-Platform-Cable-USB-under-Linux

      But that uses firmware files that came with Xilinx ISE 14.7. I do not know about any free firmware alternative. Also, I had to install ISE 14.7 anyway for synthesis (the XC9536XL is not yet supported by free synthesis tools).

      However, I also see an error in /var/log/daemon.log (apparently the rule is executed once with empty $tempnode):

      Dec 14 08:04:41 notebook5 systemd-udevd[112788]: 1-7:1.0: Process '/sbin/fxload -v -t fx2 -I /opt/Xilinx/14.7/ISE_DS/ISE/bin/lin64/xusb_xlp.hex -D ' failed with exit code 255.
      

      I don't think this error is related to the problem though, as the cable works fine for the first invokation of xc3sprog.

       
      • Philipp Klaus Krause

        I think I've solved the udev issue. Apparently, the rule was executed for the device first, then again for the interface, resulting inthe error message on the execution for the interface. I've changed my /etc/udev/rules.d/xusbdfwu.rules, and now see only one execution, for the device. I've attached my new /etc/udev/rules.d/xusbdfwu.rules.

        Still, this seems unrelated to the bug reported here.

         
  • Steven Hirsch

    Steven Hirsch - 2020-09-11

    I'm experiencing the same issue with my Xilinx adapter. I have to unplug / replug after every programming action or xc3sprog fails with above mentioned USB error. Is there any fix or workaround for the issue?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.