Skip to content

🔬Dumping SPI Flash Firmware with a Raspberry Pi Pico

2 min read

How to turn a spare RP2040 microcontroller and a SOIC-8 test clip into a fast, reliable *flashrom* programmer for extracting embedded BIOS images.

Pinout & Wiring ​

Most 8-pin SPI NOR flash chips (W25Q64, W25Q128, MX25L) operate at 3.3V (or 1.8V on newer mobile chipsets) and follow a standard SOIC-8 footprint:

SOIC-8 PinSignalRP2040 GPIODescription
Pin 1/CSGP17Chip Select (Active Low)
Pin 2DO (MISO)GP16Serial Data Out
Pin 5DI (MOSI)GP19Serial Data In
Pin 6CLKGP18Serial Clock
Pin 8VCC3V3(OUT)3.3V Supply (Check datasheet first!)

WARNING

Verify whether your target SPI flash is a 1.8V (W25Q64JW) or 3.3V (W25Q64JV) part before connecting VCC—driving a 1.8V flash chip directly from a 3.3V rail without a level shifter can permanently damage the controller.

Dumping and Verifying With flashrom ​

Always take at least two consecutive reads and compare their SHA-256 checksums to ensure your SOIC-8 clip made solid contact:

bash
# Read two separate dumps over serprog
flashrom -p serprog:dev=/dev/ttyACM0:115200 -r dump1.bin
flashrom -p serprog:dev=/dev/ttyACM0:115200 -r dump2.bin

# Verify bit-for-bit identical dumps
sha256sum dump1.bin dump2.bin