Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7619

General • How do I use OpenOCD to program one of two Pico's

$
0
0
My project has two Pico's connected via SPI. The code on each depends on the other.

I want to connect the two Pico's at the same time:

PC USB 1 ----> Pico Debugger 1 ----> PIco 1 USB and UART on GPIO0/1
PC USB 2 ----> Pico Debugger 2 ----> PIco 2 USB and UART on GPIO0/1

The Pico's have serial=E6614103E73C8B25 and serial=E6632891E33DAF30

I want to program the Pico's with the openocd command

sudo openocd -f interface/cmsis-dap.cfg -f target/rp2040.cfg \
-c "adapter speed 5000" -c "program <filaneme>.elf verify; reset halt; resume; shutdown"

How do I specify the serial number? Or other selection criteria?

With one Pico, I see:

Code:

Info : Using CMSIS-DAPv2 interface with VID:PID=0x2e8a:0x000c, serial=E6614103E73C8B25Info : CMSIS-DAP: SWD supportedInfo : CMSIS-DAP: Atomic commands supportedInfo : CMSIS-DAP: Test domain timer supportedInfo : CMSIS-DAP: FW Version = 2.0.0Info : CMSIS-DAP: Interface Initialised (SWD)Info : SWCLK/TCK = 0 SWDIO/TMS = 0 TDI = 0 TDO = 0 nTRST = 0 nRESET = 0Info : CMSIS-DAP: Interface ready...Info : RP2040 rev 2, QSPI Flash win w25q16jv id = 0x1540ef size = 2048 KiB in 512 sectorsInfo : RP2xxx ROM API function CX @ 2321

Statistics: Posted by tomdean — Thu Oct 30, 2025 12:54 am



Viewing all articles
Browse latest Browse all 7619

Trending Articles