Bootloader recovery scripts for HiFive1 boards
To restore bootloader on your board you need programmer software. This is basically the same software that was mentioned in the riscv-rust-quickstart repo.
For HiFive1 Rev B: Segger JLink software & documentation pack for Linux
For HiFive1: OpenOCD from SiFive. You can also use a fresh upstream OpenOCD build (available as openocd-git in ArchLinux, for example).
Clone the repository:
git clone https://github.com/riscv-rust/hifive1-recover
cd hifive1-recoverAlternatively, you can download it as a zip file and unpack:
wget https://github.com/riscv-rust/hifive1-recover/archive/master.zip
unzip master.zip
cd hifive1-recover-masterMake sure JLinkExe is in path, otherwise add it:
PATH=$PATH:/path/to/JLink # /tmp/JLink_Linux_V683b_x86_64, for exampleConnect the board and run the recover script:
cd hifive1-revb
./recoverMake sure openocd is in path, otherwise add it:
PATH=$PATH:/path/to/riscv-openocd-0.10.0-2019.02.0-x86_64-linux-ubuntu14/binConnect the board and run the recover script:
cd hifive1
./recoverIf something doesn't work for you, feel free to open an issue.