1. `brew install zig open-ocd arm-none-eabi-gdb`
If open-ocd doesn't work build from source,
`brew install pkg-config autoconf automake texinfo libfdti hidpi jimtcl`
`untar docs/openocd.tar.gz`
`./configure --enable-target=rp2350 --enable-interface=jtag`
2. `picotool load -x zig-out/firmware/rp2350.uf2 -f`
`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"`
`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
// |------------------------------------------------|
// |----------------|---|-----------|---------------|
// | 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)
// file system on flash (1024K)
// - use block device : new Flash(400, 384)