SkeletonMan03/RP2040-Feather-serprog

Mirrored from https://codeberg.org/LordSkeletonMan/RP2040-Feather-serprog, but updated here

★ 1Forks 0CGitHub ↗Compare

README

RP2040 Feather serprog (fork of pico-serprog for use on RP2040 Feather)

Slightly less terrible serprog implementation for the Raspberry Pi Pico and other RP2040 based boards. Based on pico-serprog by stacksmashing. Further improved by kukrimate here.
Further improved by Riku_V here.
Made work on a RP2040 Feather by me (LordSkeletonMan) here.

For a guide on how to flash a chip see this page.

This takes about 33 seconds to read the 16MiB BIOS chip of a T480s.

Pinout for the SPI lines:

Pin Function
9 CS
20 MISO
19 MOSI
18 SCK

RP2040 Feather pinout

Compiling

mkdir build
cd build
cmake ../
make

Plug in your RP2040 Feather. Mount it as you would any other USB flash drive. Copy rp2040feather_serprog.uf2 into it. Your programmer is now ready. If you want to change the firmware, you need to press the button on the board while you plug it in.

Usage

Substitute ttyACMx with the actual tty device corresponding to the firmware. You can find this by running dmesg -wH. When you plug in the device, a line containing something like this will appear:

[453876.669019] cdc_acm 2-1.2:1.0: ttyACM0: USB ACM device

Read chip:

flashprog -p serprog:dev=/dev/ttyACMx,spispeed=32M -r flash.bin

Write chip:

flashprog -p serprog:dev=/dev/ttyACMx,spispeed=32M -w flash.bin

Multiple chips can be connected at the same time. Pins GP9-GP12 are Chip Selects 0-3, respectively. The firmware defaults to using Chip Select 0.

flashprog -p serprog:dev=/dev/ttyACMx,cs=0 -r chip0.bin
flashprog -p serprog:dev=/dev/ttyACMx,cs=1 -r chip1.bin

License

As a lot of the code itself was heavily inspired/influenced by stm32-vserprog this code is licensed under GPLv3.

pinout.png is based on Adafruit Feather RP2040 pinout.pdf by Adafruit Industries, under the Creative Commons Attribution-ShareAlike license license.

Contributors

SkeletonMan03kratz00kukrimatenezza

Issues