TinyFPGA BX user guide don't work for me (Scons upload ERROR 1) [SOLVED]


#1

Hi everybody!
Today arrived my TinyFPGA BX. I tried the tinyFPGA BX User Guide, but I have an error.
I Installed apio, Atom, etc, I followed the guide until “2. Copy the template project from the TinyFPGA BX Repository” but when I try to upload blink project I have error. Also if I manually execute apio upload I obtain the same error:

$ ~/Documenti/repo-ELN/tinyfpga/blink_project > apio upload
[Thu Jul 26 01:16:05 2018] Processing TinyFPGA-BX
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
tinyprog -c /dev/ttyACM0 --program hardware.bin

TinyProg CLI
------------
Using device id 1d50:6130
Traceback (most recent call last):
File "/home/paolini/.local/bin//tinyprog", line 11, in <module>
sys.exit(main())
File "/home/paolini/.local/lib/python3.6/site-packages/tinyprog/__main__.py", line 290, in main
with active_port:
AttributeError: __enter__
scons: *** [upload] Error 1
===================================================================== [ ERROR ] Took 1.78 seconds =====================================================================

I don’t understand why… Anyone can help me?
P.S. I run it on Ubuntu 18.04.1 and python 3.6
TIA


#2

Try running the tinyprog command directly. It could be a permissions issue with the serial device.


#3

Thanks for the quick reply but I think it isn’t the solution… :frowning:

I tried to use tinyprog standalone. I done the step indicated in the guide (tinyprog --update-bootloader) and it saw me that the bootloader was the last version, and also tinyprog -l seems to communicate with the board, find it on /dev/ttyACM0.

Also I tried

tinyprog -c /dev/ttyACM0 --program hardware.bin -d 1d50:6130

and the reply was the same above.
I’m in the group dialout, but also with sudo it don’t work.
Where is my error?


#4

Hi Paolini,
I have same kind of error but with different line references :sleepy: :

However, i am able to upload to the fpga bd using the command line interface :slight_smile:

The whole programming environnment is installed from scratch, with last updates i hope,
( i followed instructions from https://tinyfpga.com/bx/guide.html
but as i am new to python, apio etc, i really do not know where to look for errors…

Please tell me if you found a solution.
Cheers,
Eddy.


#5

Ok @eddy, @paolini, thanks to your bug reports I have a fix:

pip install --upgrade --no-cache-dir "tinyprog>=1.0.18"

The issue was related to changes made to support libusb combined with APIO specifying a com port name or path.


#6

GREAT! Now it works!

immagine

Thank You @lukevalenty, now the environment is up and running and then i can start learning!


#7

Yay! Thanks for letting me know! :smile:


#8

@lukevalenty,
Its working for me too :grinning: :grinning: :grinning:
Thanks for your time and outstanding service !
Cheers,
Eddy.