Missing Bootloader on HiFive1 but Instructions for Repair Outdated / No Longer Exist


Hi everyone,

I’m doing some work using the old revision of the HiFive1 and I appear to have blown away the bootloader at 0x20000000 while loading mynewt onto the board at some point and I want to go back to running applications on bare metal but it appears any instructions on how to reload the bootloader have been removed from the internet as far as I can tell.

Specifically, the instructions at this thread:

To use the supplied bash script. The git patches in the script no longer line up with the files or structure of the new freedom-e-sdk and even reverting freedom-e-sdk back to release v0.1.2 of the master branch doesn’t fix it as it looks like the script still doesn’t see the things it wants in there.

I tried just patching the files myself but the core of the problem is that I can’t seem to find any record of the “double_tap_dontboot” application anywhere on the internet. If I search for it I find expired links to it (https://github.com/sifive/freedom-e-sdk/tree/master/software/double_tap_dontboot) so I’m not sure what to do.

(Jim Wilson) #2

The v1_0 branch of freedom-e-sdk is the last commit before the rewrite started. It has the old double_tap_dontboot application. But I don’t have a HiFive1 so I don’t know the details of how to use it.


Thanks, Jim. Its taking a pretty long time to compile this toolchain and I’m in a rush so I just used the actual source code from that branch and created my own bootloader in FreedomStudio and that got me back where I needed to be.

I’ll post my FreedomStudio version of the bootloader somewhere and post it here to this thread for anyone who comes by with the same problem.

(Bruce Hoult) #4

Hi nbegley, everything is still right there in git, on the v1_0 branch. It should work fine if you simply check out that branch of freedom-e-sdk

I just tried it, from scratch:

git clone --recursive -b v1_0 https://github.com/sifive/freedom-e-sdk.git
cd freedom-e-sdk
make tools
curl https://static.dev.sifive.com/dev-tools/flash_bootloader.sh | sh

No problems. In particular the patching still goes fine:

$ patch -p1 <$TPATCH
patching file Makefile
Hunk #2 succeeded at 189 with fuzz 2.
patching file bsp/env/freedom-e300-hifive1/flash.lds

Building double_tap_dontboot works fine.

(Bruce Hoult) #5

Building the toolchain etc from scratch does take some time, yes – about 12 minutes on my dev machine or maybe 25 minutes on a laptop. However doing it that way ensures that the process works, which is generally faster than taking a shortcut and then making multiple attempts at it, waiting for answers on support forums etc.

It is unfortunate that development of the new version of freedom-e-sdk has taken place on a trunk, not on a dev branch, but we have for a number of months now had the appropriate old version easily available via the v1_0 branch.