|
1 рік тому | |
---|---|---|
.gitignore | 3 роки тому | |
CMakeLists.txt | 3 роки тому | |
COPYING | 4 роки тому | |
main.c | 3 роки тому | |
pico_sdk_import.cmake | 4 роки тому | |
readme.md | 1 рік тому | |
serprog.h | 3 роки тому | |
tusb_config.h | 3 роки тому | |
usb_descriptors.c | 3 роки тому |
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 |
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.
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
As a lot of the code itself was heavily inspired/influenced by stm32-vserprog
this code is licensed under GPLv3.