Error while updating bootloader: invalid literal for int() with base 10


#1

Hello,

I just took my TinyFPGA BX out of the packaging, and tried to update the bootloader. It failed at this point:

    Programming stage two...
    Erasing:   0%|                                                                                                   | 0.00/299k [00:00<?, ?B/s]
Traceback (most recent call last):
  File "/home/joel/.local/bin/tinyprog", line 11, in <module>
    load_entry_point('tinyprog==1.0.18', 'console_scripts', 'tinyprog')()
  File "build/bdist.linux-x86_64/egg/tinyprog/__main__.py", line 282, in main
  File "build/bdist.linux-x86_64/egg/tinyprog/__main__.py", line 152, in perform_bootloader_update
  File "build/bdist.linux-x86_64/egg/tinyprog/__init__.py", line 419, in program_bitstream
  File "build/bdist.linux-x86_64/egg/tinyprog/__init__.py", line 375, in program
  File "build/bdist.linux-x86_64/egg/tinyprog/__init__.py", line 347, in erase
  File "build/bdist.linux-x86_64/egg/tinyprog/__init__.py", line 301, in _erase
  File "build/bdist.linux-x86_64/egg/tinyprog/__init__.py", line 290, in wait_while_busy
  File "build/bdist.linux-x86_64/egg/tinyprog/__init__.py", line 21, in to_int
ValueError: invalid literal for int() with base 10: ''

The full log is here: https://github.com/tinyfpga/TinyFPGA-Bootloader/issues/18

When I connect to it now, it says this, even when I press the button:

tinyprog 

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

I couldn’t work out what is contained in each stage of the bootloader. I assume I’m missing some important bits without the second stage.


#2

Hey @shenki, this one is a bummer. If you have a JTAG Programmer, you can get the bootloader back on the board. If you don’t have a JTAG Programmer then we can exchange boards. I’ll send you one with the bootloader and you can send me back the one you have.

Stage two is the one that actually loads the new bootloader. If it fails at erase, that’s trouble. I’ll be working out a way to prevent it from failing this way in the future.


[BX] Error: 'device reports readiness to read but returned no data' [SOLVED]
#3

If you do have a JTAG/SPI programmer, you can program the firmware image found here:

https://github.com/tinyfpga/TinyFPGA-Bootloader/releases/download/1.0.1/tinyfpga_bx_fw.bin

The SPI pins can be found on the bottom of the board and are labeled SS, SCK, IO0, and IO1. You’ll also want to connect the 3.3v to the VCC pin of your programmer so it uses 3.3v, and GND between the programmer and board.