Atom. Error: board TinyFPGA-BX not available


#1

Hi,

Got my TinyFPGA-BX board today. I have been following the TinyFPGA BX User Guide to get the first project working. I have installed everything according to the instructions on a MacBook Pro with High Sierra 10.13.6. tinyprog is able to see the board.

$ tinyprog -l

TinyProg CLI
------------
Using device id 1d50:6130
Only one board with active bootloader, using it.
Boards with active bootloaders:

    USB 20.9: TinyFPGA BX 1.0.0
        UUID: eb1a998e-f312-4632-b485-a35efbe2d75e
        FPGA: ice40lp8k-cm81

I am also able to build the apio template project in Atom.
However, when I try to upload the project to the board, I get error:
Error: board TinyFPGA-BX not available.

Any help will be appreciated. Thanks!


#2

Hi @animan, this is due to an issue in later versions of MacOS where the default serial driver does not attach to the TinyFPGA BX. This affects more serial devices than just the TinyFPGA BX, there are arduino dev boards with similar issues. @JesusArroyo is the owner of APIO and suggests trying out the drivers in this post:

Install these drivers, then try programming the bitstream with tinyprog --pyserial -p hardware.bin.

Let us know if that works or not. In the meantime, the workaround is to program directly with tinyprog like so:

tinyprog -p hardware.bin

#3

Hi @lukevalenty. Thanks for the response, I have not tried the Mac-os-x-driver yet. But I just tried tinyprog -p hardware.bin and got some errors below. I believe the programming worked though, since I do see the SOS flashing.

However, if I unplug the board and plug it back in… it goes back to flashing led, boot loader mode.

$ tinyprog -p hardware.bin

TinyProg CLI
------------
Using device id 1d50:6130
Only one board with active bootloader, using it.
Programming USB 20.9 with hardware.bin
Programming at addr 028000
Waking up SPI flash
135100 bytes to program
Erasing: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 135k/135k [00:00<00:00, 168kB/s]
Writing: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 135k/135k [00:00<00:00, 186kB/s]
Reading: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 135k/135k [00:00<00:00, 174kB/s]
Success!

Traceback (most recent call last):
File β€œ/usr/local/bin/tinyprog”, line 11, in
sys.exit(main())
File β€œ/usr/local/lib/python2.7/site-packages/tinyprog/main.py”, line 334, in main
fpga.boot()
File β€œ/usr/local/lib/python2.7/site-packages/tinyprog/init.py”, line 388, in boot
self.ser.write(b"\x00")
File β€œ/usr/local/lib/python2.7/site-packages/tinyprog/init.py”, line 92, in write
self.OUT.write(data)
File β€œ/usr/local/lib/python2.7/site-packages/usb/core.py”, line 387, in write
return self.device.write(self, data, timeout)
File β€œ/usr/local/lib/python2.7/site-packages/usb/core.py”, line 948, in write
self.__get_timeout(timeout)
File β€œ/usr/local/lib/python2.7/site-packages/usb/backend/libusb1.py”, line 824, in bulk_write
timeout)
File β€œ/usr/local/lib/python2.7/site-packages/usb/backend/libusb1.py”, line 920, in __write
_check(retval)
File β€œ/usr/local/lib/python2.7/site-packages/usb/backend/libusb1.py”, line 595, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 5] Input/Output Error


#4

Regarding @animan original issue - I have the same problem uploading through Atom.
@lukevalenty - no luck with the ch34g drivers. I have used these before for Arudino projects and they seemed to work, however the installation verification - checking /dev/cu.xxxx - does not show any devices for the tinyFPGA.
I am able to program with both commands:

  1. tinyprog --pyserial -p hardware.bin
  2. tinyprog -p hardware.bin

It should be noted that I am running Atom from a VirtualEnv, since all packages were installed in one.tin


#5

I have the same problem too – I am able to successfully invoke tinyprog -p hardware.bin, but Atom fails to upload and apio system --lsserial shows zero serial devices. I’ve tried installing the CH34x drivers, but to no avail. Also tested two different USB cables.

MacOS HighSierra 10.13.6, MacBook Air 11" (late 2013)
tinyprog==1.0.12b1
apio==0.4.0b3


#6

Hello. I have finally tested the CH34x drivers in a MacOS HighSierra without luck :frowning:

The weird thing is that I can see a TinyFPGA B2 board with the apio system --lsserial in the same machine as /dev/cu.usbmodem1411, but nothing appears when I connect the TinyFPGA BX board.

@lukevalenty this could be because of the bootloader or because the new VID:PID of the board?


#7

Maybe your bootloader needs to be updated. Try:

tinyprog --update-bootloader

#8

@lukevalenty I’ve updated my bootloader but I’m seeing the same symptoms on 10.14 Mojave (tinyprog works, although dumping the usb.core IO error after β€œSuccess!”).


#9

Good news – apio==0.4.0b5 seems to use tinyprog --libusb --program directly rather than serial port. So with tinyprog==1.0.23 I am able to sucessfuly upload via Atom!


#10

Thanks Jan!! Happy to report that worked for me too!!


#11

apio==0.4.0b5 works for me too! Thank you.


#12

Hi! I am experiencing similar issues with Atom and a TinyFPGA BX.

I am running Mac OS 10.13.4, I have Python 3.6, APIO 0.4.0b5 and tinyprog -l returns:
TinyProg CLI
------------
Using device id 1d50:6130
Only one board with active bootloader, using it.
Boards with active bootloaders:

    USB 20.2: TinyFPGA BX 1.0.0
        UUID: 1c5e554d-8a50-4c5b-b099-7a4d8753b45a
        FPGA: ice40lp8k-cm81

When I open Atom and try to upload, it blinks red after .6 seconds and I do not get the SOS pattern. When I try to use tinyprog -p hardware.bin, it returns FileNotFoundError: [Errno 2] No such file or directory: β€˜hardware.bin’

I have read through similar posts here but not sure how to debug as I am seeing the board with tinyprog, but it wont upload anything.

Thank you!


#13

Hi all! I decided to source a windows laptop and I have no issues connecting my bx model and getting it to run properly. I had to run command prompt in administration mode as well as a few extra steps to install apio drivers, but pretty easy!


#14

Hi again,

After several successful builds and uploads with my tinyFPGA BX, now suddenly the board is appearing as unavailable. I’ve tried restarting windows and directly programming with apio and tinyprog in command prompt. I get an error β€˜int’ object does not support item assignment. Atom just says it is not connected.

Also, when I do tinyprog -l, it shows me a device id and it is using the bootloader, however it then lists com#: No metadata

I also tested on my mac and tiyprog -l also returns no metadata. When I try to program with -p hardware.bin I get the same β€˜int’ object is not subscriptable.

Any thoughts?