A simple system to turn an ESP8266 or ESP32 into an SPI memory flasher
- Make sure your device has at least 4MB of memory!
- Make sure your board's USB-to-serial drivers are installed - Here is the most common one
- Install the PlatformIO CLI (or their VSCode extension)
- Configure
./src/SPI-Flasher/platformio.ini
if you don't have a nodemcuv2 compatible device - Open
./src/SPI-Flasher/
in your shell and runpio run --target upload
- Check the datasheet for your flash chip and read the pin connection requirements (WP and HOLD should be inactive)
- NOTE: A pull-up resistor on the CS pin will cause boot loops; it is not needed
- Wire your flash chip to your device via the SPI pins (example)
- Install Python 3.6+
- Open a shell in
./src/read_server/
pip install -r requirements.txt
python spi_flasher.py -port [PORT] -baud 921600 -file bios.rom --erase --write
NOTE 1: If you get a bunch of "Hash mismatch" messages, press "ctrl + C" and lower the baud rate
NOTE 2: Erasing is mandatory prior to writes on (most) flash chips that have already been written
- UEFI BIOSes
- Check the last 512 bytes of the file in a hex editor (HxD is a good one for Windows)
- All
0xFF
means it is probably a bad image
- All
- Open the BIOS file with UEFITool
- Click the drop-down before
(...) capsule
and ensure it says either "Intel Image" or "UEFI Image" - Extract the image from the capsule (Action > Capsule > Extract Body)
- Click the drop-down before
- Make sure the size of the image and the chip match exactly
- Proceed with flashing
- Check the last 512 bytes of the file in a hex editor (HxD is a good one for Windows)
This project was created to fix the BIOS chip of an ASUS M32AD that was bricked by a faulty automatic update, which it succeeded in doing!