tinyfpga / TinyFPGA-BX

Other
268 stars 96 forks source link

Error: board TinyFPGA-BX not connected #24

Open ilbertt opened 4 years ago

ilbertt commented 4 years ago

I'm getting this error after Apio: Upload from Atom. The bootloader board keeps going offline (LED stops blinking).

When I try to execute tinyprog -p hardware.bin:

TinyProg CLI
    ------------
    Using device id 1d50:6130
    Only one board with active bootloader, using it.
Traceback (most recent call last):
  File "$HOME/.local/lib/python3.7/site-packages/serial/serialposix.py", line 265, in open
    self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
OSError: [Errno 16] Device or resource busy: '/dev/ttyACM0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/tinyprog", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/tinyprog/__main__.py", line 323, in main
    with active_port:
  File "/usr/local/lib/python3.7/site-packages/tinyprog/__init__.py", line 60, in __enter__
    self.ser = serial.Serial(self.port_name, timeout=1.0, writeTimeout=1.0).__enter__()
  File "$HOME/.local/lib/python3.7/site-packages/serial/serialutil.py", line 240, in __init__
    self.open()
  File "$HOME/.local/lib/python3.7/site-packages/serial/serialposix.py", line 268, in open
    raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 16] could not open port /dev/ttyACM0: [Errno 16] Device or resource busy: '/dev/ttyACM0'

Here's the log from $ dmesg:

[ 2443.927967] cdc_acm 2-3:1.0: failed to set dtr/rts
[ 2493.381379] debugfs: Directory '09' with parent 'devices' already present!
[ 2493.993317] usb 2-3: new full-speed USB device number 74 using xhci_hcd
[ 2494.142205] usb 2-3: New USB device found, idVendor=1d50, idProduct=6130, bcdDevice= 0.00
[ 2494.142207] usb 2-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 2494.143308] cdc_acm 2-3:1.0: ttyACM0: USB ACM device
[ 2513.926778] usb 2-3: USB disconnect, device number 74
[ 2513.926877] cdc_acm 2-3:1.0: failed to set dtr/rts
[ 3235.189611] debugfs: Directory '10' with parent 'devices' already present!
[ 3235.317550] usb 2-3: new full-speed USB device number 75 using xhci_hcd
[ 3342.172788] debugfs: Directory '11' with parent 'devices' already present!
[ 3342.300710] usb 2-3: new full-speed USB device number 76 using xhci_hcd
[ 3342.428783] usb 2-3: device descriptor read/64, error -71
[ 3342.664732] usb 2-3: device descriptor read/64, error -71
[ 3342.772749] debugfs: Directory '12' with parent 'devices' already present!
[ 3342.900722] usb 2-3: new full-speed USB device number 77 using xhci_hcd
[ 3343.028718] usb 2-3: device descriptor read/64, error -71
[ 3343.264737] usb 2-3: device descriptor read/64, error -71
[ 3343.372749] usb usb2-port3: attempt power cycle
[ 3343.688729] debugfs: Directory '13' with parent 'devices' already present!
[ 3344.232697] usb 2-3: new full-speed USB device number 78 using xhci_hcd
[ 3344.253218] usb 2-3: New USB device found, idVendor=1d50, idProduct=6130, bcdDevice= 0.00
[ 3344.253221] usb 2-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 3344.254320] cdc_acm 2-3:1.0: ttyACM0: USB ACM device
[ 3363.918157] usb 2-3: USB disconnect, device number 78
[ 3363.918302] cdc_acm 2-3:1.0: failed to set dtr/rts
[ 3449.699880] usb 2-3: new full-speed USB device number 79 using xhci_hcd

I'm on elementary OS 5.1.3 Hera (Ubuntu 18.04.3 LTS distro).

notmike5 commented 3 years ago

Also having the issue where the FPGABX is seen and then lost. Upon resetting the board tinyprog -l will sometimes show the device and then moments late it will disappear. apio-ide uplaod fails with Error: board TinyFPGA-BX not connected.