I accidentally erased SPI Flsh today. When power on, it reported Error 0x0100000000000002.
So, how to rescue image from SD card, when my preprogrammed flash was erased?
I need your help. thanks
- Download the firmware from https://www.sifive.com/products/hifive-unleashed/
- Copy the raw ‘gpt’ file to an SD card (dd if=firmware.gpt of=/dev/sdz)
- Orient the HiFive Unleashed so that the MSELx text is readable left-to-right
- Set the HiFive Unleashed to MSEL0=left, MSEL1=left, MSEL2=right, MSEL3=left
- Boot he HiFive Unleashed with the prepared SD card
- Copy the ‘gpt’ file to the HiFive Unleashed with scp
- On the HiFive Unleashed, run: flashcp -v foo.gpt /dev/mtd0
- Restore the mode select DIPs to all left.
2 Likes