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!”).