No Description

Riku Viitanen 4c2a7b54cd More beginner-friendly documentation 1 year ago
.gitignore 57e5f20c2f Improve performance 3 years ago
CMakeLists.txt 14d004ca02 Use TinyUSB directly instead of the SDK's stdio layer 3 years ago
COPYING b5d9c3a720 Init 4 years ago
main.c 14d004ca02 Use TinyUSB directly instead of the SDK's stdio layer 3 years ago
pico_sdk_import.cmake b5d9c3a720 Init 4 years ago
readme.md 4c2a7b54cd More beginner-friendly documentation 1 year ago
serprog.h fe27a2d185 Use hardware SPI peripheral (WARN: this changed pinout!) 3 years ago
tusb_config.h 14d004ca02 Use TinyUSB directly instead of the SDK's stdio layer 3 years ago
usb_descriptors.c 14d004ca02 Use TinyUSB directly instead of the SDK's stdio layer 3 years ago

readme.md

pico-serprog

Slightly less terrible serprog implementation for the Raspberry Pi Pico and possibly other RP2040 based boards. Based on pico-serprog by GitHub user "stacksmashing". Further improved by "kukrimate".

Pinout for the SPI lines: | Pin | Function | |-----|----------| | GP5 | CS | | GP4 | MISO | | GP3 | MOSI | | GP2 | SCK |

Compiling

cmake .
make

Plug in your Pico. Mount it as you would any other USB flash drive. Copy pico_serprog.uf2 into it. Your programmer is now ready. If you want to change the firwmare, 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:

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

Write chip:

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

License

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