TinyFPGA Bx programming using apio in ubuntu 18.04


#1

Hi everyone!

So i have recently tried to upload a bitstream to TinyFPGA Bx board and while i ran the “apio build” command, i get the following message:
~$ apio upload
Board: TinyFPGA-B2
[Mon Jun 11 21:00:04 2018] Processing TinyFPGA-B2

tinyfpgab -c /dev/ttyACM0 --program hardware.bin

TinyFPGA B-series Programmer CLI

Using device id 1209:2100
Programming /dev/ttyACM0 with hardware.bin
Error: [Errno 13] could not open port /dev/ttyACM0: [Errno 13] Permission denied: ‘/dev/ttyACM0’
scons: *** [upload] Error 1
========================= [ ERROR ] Took 0.33 seconds =========================

I used B2 board as in init file as it is same as Bx model. I am using linux(Ubuntu 18.04 LTS).

Looks like it has something to do with permissions. Being a new Linux user, i am bit of a noob. Can anyone help?

Thanks!


#2

Linking to a different community, I know, but this should help:


#3

Thanks for linking that. I worked on it a bit and ended up using sudo to run it,

Now when i type the command, i get this

Board: TinyFPGA-B2
[Tue Jun 12 12:41:44 2018] Processing TinyFPGA-B2

tinyfpgab -c /dev/ttyACM0 --program hardware.bin

TinyFPGA B-series Programmer CLI

Using device id 1209:2100
Programming /dev/ttyACM0 with hardware.bin
Error: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: ‘/dev/ttyACM0’
scons: *** [upload] Error 1
========================= [ ERROR ] Took 0.33 seconds =========================


#4

And now i got another error

Board: TinyFPGA-B2
[Tue Jun 12 13:03:50 2018] Processing TinyFPGA-B2

tinyfpgab -c /dev/ttyACM0 --program hardware.bin

TinyFPGA B-series Programmer CLI

Using device id 1209:2100
Programming /dev/ttyACM0 with hardware.bin
Bootloader not active
Error: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
scons: *** [upload] Error 1
========================= [ ERROR ] Took 5.86 seconds =========================


#5

Are you sure that your board is on 'ttyACM0’?

What do these commands show?

dmesg | grep tty

ls /dev/serial/by-id/


#6

Yes, even when typing that it returns ttyACM0.

Thing i am worried about is this:
Error: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
scons: *** [upload] Error 1

I activate the bootloader by pressing the button on FPGA, but it just spits this error


#7

If it’s a BX prototype, then you will need to use ‘tinyprog’ script instead. You might have to do an ‘lsusb’ to see the device ID and pass that in to ‘tinyprog’ with the -d option.


#8

This worked. Thanks!