At this point, a Pi Pico is equivalent to a bag full of programmers and debugging accessories. For instance, when you want to program an SPI flash chip, do you use one of those wonky CH341 dongles, or perhaps, even a full-on Raspberry Pi with a Linux OS? If so, it might be time to set those two aside – any RP2040 board can do this now. This is thanks to work of [stacksmashing] who implemented serprog protocol for the RP2040, letting us use a Pi Pico with stock flashrom for all our SPI flash chip needs.

After flashing the code to your RP2040 board, all you need to do is to wire your flash chip to the right pins, and then use the serprog programmer type in your flashrom commandline – instructions are available on GitHub along with the code, as you’d expect. Don’t feel like installing flashrom, or perhaps you happen to run Windows and need a flasher in a pinch? [stacksmashing] has a WebSerial-based SPI flasher tool for you, too, and shows it off with a fancy all-the-pinouts board of his own making.

This kind of tool is indispensable – you don’t need to mod one of these CH341 programmers to fix the bonkers 5 V default IO, or keep an entire Linux computer handy when you likely already have one at your fingertips. All in all, yay for one more RP2040 trick up our sleeve – this SPI flashing helper joins an assortment of applets for SWD, JTAG, UART, I2C and CAN, and in a pinch, your Pi Pico will also work as a digital and analog logic analyzer or an FPGA playground.

Source: https://hackaday.com/2023/03/06/programming-spi-flash-chips-use-your-pico/