1
0
Fork
You've already forked pico-serprog
0
forked from Riku_V/pico-serprog
Raspberry Pi Pico serprog. Fork of https://github.com/kukrimate/pico-serprog
C 86.3%
CMake 13.7%
2023年09月01日 05:34:27 +03:00
.gitignore Improve performance 2021年08月07日 00:04:38 +01:00
CMakeLists.txt Use TinyUSB directly instead of the SDK's stdio layer 2021年08月07日 02:42:16 +01:00
COPYING Init 2021年04月03日 18:36:40 +02:00
COPYING.CC-BY-SA Add CC-BY-SA 4.0 International license 2023年09月01日 05:34:27 +03:00
main.c Use TinyUSB directly instead of the SDK's stdio layer 2021年08月07日 02:42:16 +01:00
pico_sdk_import.cmake Init 2021年04月03日 18:36:40 +02:00
pinout.png Add pinout.png 2023年09月01日 05:28:07 +03:00
readme.md Add pinout.png 2023年09月01日 05:28:07 +03:00
serprog.h Use hardware SPI peripheral (WARN: this changed pinout!) 2021年08月07日 01:34:05 +01:00
tusb_config.h Use TinyUSB directly instead of the SDK's stdio layer 2021年08月07日 02:42:16 +01:00
usb_descriptors.c Use TinyUSB directly instead of the SDK's stdio layer 2021年08月07日 02:42:16 +01:00

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".

This takes about 17 seconds to read the 8MiB BIOS chip of an X200.

Pinout for the SPI lines:

Pin Function
7 CS
6 MISO
5 MOSI
4 SCK

Pico pinout

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.

pinout.png is based on pico-pinout.svg by Raspberry Pi Ltd, under the Creative Commons Attribution-ShareAlike 4.0 International license.