Tinyprog: ValueError: invalid literal for int() with base 10


#1

Hi, I’ve just received BX boards, but I’m unable to upload anything to them. Could you please advise me whats is wrong? Tinyprog version is 1.0.23
$ tinyprog -l

TinyProg CLI
------------
Using device id 1d50:6130
No port was specified and no active bootloaders found.
Activate bootloader by pressing the reset button.

Okay, let’s press the button:

$ tinyprog -l

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

    /dev/ttyACM0: TinyFPGA BX 1.0.0
        UUID: 2de573b1-897c-4830-9010-db34354eed6b
        FPGA: ice40lp8k-cm81

And try to upload:

$ tinyprog -p hardware.bin

TinyProg CLI
------------
Using device id 1d50:6130
Only one board with active bootloader, using it.
Programming /dev/ttyACM0 with hardware.bin
Programming at addr 028000
Waking up SPI flash
135100 bytes to program
Programming and Verifying:  32%|█████████████████▍                                    | 43.8k/135k [00:01<00:02, 42.3kB/s]

Traceback (most recent call last):
File “/usr/local/bin/tinyprog”, line 10, in
sys.exit(main())
File “/usr/local/lib/python2.7/dist-packages/tinyprog/main.py”, line 348, in main
if not fpga.program_bitstream(addr, bitstream):
File “/usr/local/lib/python2.7/dist-packages/tinyprog/init.py”, line 460, in program_bitstream
return self.program_sectors(addr, bitstream)
File “/usr/local/lib/python2.7/dist-packages/tinyprog/init.py”, line 407, in program_sectors
self.write(current_addr + minor_offset, minor_write_data, disable_progress=True, max_length=256)
File “/usr/local/lib/python2.7/dist-packages/tinyprog/init.py”, line 375, in write
self._write(addr, write_data)
File “/usr/local/lib/python2.7/dist-packages/tinyprog/init.py”, line 364, in _write
self.wait_while_busy()
File “/usr/local/lib/python2.7/dist-packages/tinyprog/init.py”, line 296, in wait_while_busy
while to_int(self.read_sts()) & 1:
File “/usr/local/lib/python2.7/dist-packages/tinyprog/init.py”, line 27, in to_int
return int(value)
ValueError: invalid literal for int() with base 10: ‘’

Thanks.


#2

Long shot… have you maybe got some other piece of software with /dev/ttyACM0 open?


#3

Its usually modemmanager - see [BX] Error: 'device reports readiness to read but returned no data' [SOLVED]


#4

It works! Thank you! modemmanager was troublemaker