~repos/rp2350
code to drive rp2350
git clone s3://pyrossh-repos/rp2350
wget https://pyrossh.dev/zips/rp2350.zip
RP2350 Dev Board
Setup
brew install zig open-ocd arm-none-eabi-gdb
If open-ocd doesn’t work build from source,
brew remove open-ocd
brew install pkg-config autoconf automake texinfo libfdti hidpi jimtcl
untar docs/openocd.tar.gz
./boostrap
./configure --enable-target=rp2350 --enable-interface=jtag
make
sudo make install
Run
zig build
picotool load -x zig-out/firmware/rp2350.uf2 -f
Start OCD Server
sudo openocd -s tcl -f interface/cmsis-dap.cfg -f target/rp2350.cfg -c "adapter speed 5000"sudo openocd -s tcl -f interface/cmsis-dap.cfg -f target/rp2350.cfg -c "adapter speed 5000"
Flash OCD Program
sudo openocd -f interface/cmsis-dap.cfg -f target/rp2350.cfg -c "adapter speed 5000" -c "program zig-out/firmware/rp2350.elf verify reset exit"
// Flash allocation map 4MB for pico 2W
//
// |------------------------------------------------|
// | A | B | C | D |
// |----------------|---|-----------|---------------|
// | 1024K |64K| 1472K | 1536K |
// |------------------------------------------------|
// |----------- flash.c -----------|
// |------ 1MB -----|------------- 3MB -------------|
// |---------------------- 4MB ---------------------|
//
// - A : binary (firmware)
// - B : storage (key-value database)
// - C : user program (js)
// - D : file system (lfs)
// (Total : 4MB)
// file system on flash (1024K)
// - sector base : 400
// - sector count : 384
// - use block device : new Flash(400, 384)