Brak opisu

kay e75e3a20e6 Fix undefined `cs` variable 3 miesięcy temu
.gitignore 57e5f20c2f Improve performance 2 lat temu
99-serprog.rules f9be0c789c Add udev rule to create /dev/serprog0, 1, 2, ... 8 miesięcy temu
CMakeLists.txt 030bfdfa94 Make USB descriptor less generic 8 miesięcy temu
COPYING b5d9c3a720 Init 3 lat temu
COPYING.CC-BY-SA c8c16e9c11 Add CC-BY-SA 4.0 International license 8 miesięcy temu
main.c e75e3a20e6 Fix undefined `cs` variable 3 miesięcy temu
pico_sdk_import.cmake b5d9c3a720 Init 3 lat temu
pinout.png 51a50ac9db Add pinout.png 8 miesięcy temu
readme.md bdcb6f6f55 update readme 3 miesięcy temu
serprog.h 6301fbf3ed add support for multiple chip selects 4 miesięcy temu
tusb_config.h 14d004ca02 Use TinyUSB directly instead of the SDK's stdio layer 2 lat temu
usb_descriptors.c 36bc681dc2 Include board name in product string 8 miesięcy temu

readme.md

pico-serprog

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. And me (Riku_V) here.

Pre-compiled binaries binaries can be downloaded from the Libreboot project.

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

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:

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 GP5-GP8 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 pico-pinout.svg by Raspberry Pi Ltd, under the Creative Commons Attribution-ShareAlike 4.0 International license.