Upgrading the old-style bootloader on TinyFPGA B1/2


#1

Hi,

I have a TinyFPGA B2 board with the original bootloader. According to the TinyFPGA-B-Series repo issues, the original bootloader has a bug that will not be fixed in favor of upgrading to a new, improved, and more portable (to other boards) bootloader. What is the process of upgrading to the new bootloader using only the existing old bootloader?

If I mess up the upgrade process, I can personally just reprogram the SPI flash using an external programmer, but I understand this may not be possible for others.


#2

I will be creating a script to do this, but the script will do something like this:

  1. Use tinyfpgab to program the new bootloader into the user area.
  2. With the new bootloader active in the user area, use tinyprog to program the new bootloader to the boot area.
  3. Use tinyprog and a new script to program metadata appropriate for the TinyFPGA B2 into the security registers.

The new bootloader and programmer is much more reliable. Using this 2-step process will help ensure the upgrade is successful. I don’t recommend people do this just yet, it will break support for the TinyFPGA B2 in Icestudio. I will be working to fix that.


#3

Okay, this is important for me to know. Right now, migen support for programming a tinyfpga B board is limited to the old bootloader (and thus B1/B2). I’ll probably rename this to TinyFpgaBLegacyProgrammer at some point, but as of right now I have no way to test the improved bootloader, so support will have to wait.