Menu

#467 RP2350 flash fails with Incorrect RP2040 BOOT ROM version

0.12.0
new
nobody
PICO RP2350 (1)
RP2340
2026-03-07
2026-03-06
symdeb
No

Using an RP2040 pr RP2350 with a debugprobe firmware from the raspberry repo
openocd install with sudo apt-get install
it seem openocd is missing the rp2350.cfg so copied the .cfg file to

sudo cp rp2350.cfg  /usr/share/openocd/scripts/target/.

Ubuntu 25.10

Targets 2040 and 2040W flash is fine:

sudo openocd -f interface/cmsis-dap.cfg -f target/rp2040.cfg -c "adapter speed 5000" -c "program build/uart.elf verify reset exit

Targets 2350 and 2340W fail (elf file build with correct options for RP2350)

sudo openocd -f interface/cmsis-dap.cfg -f target/rp2350.cfg -c "adapter speed 5000" -c "program build/uart.elf verify reset exit" 

There are several rp2350.cfg files around. Attached 3 versions. only olddebugproberepo.cfg found in an old openocd repo from raspberry downstream seems to work. the other can't even detect the board. the others are the ones from openocd repo, and the current raaspberry git openocd downstream repo

-rw-rw-r--  1 user user  2494 Feb 15  2025 rp2350_olddebugproberepo.cfg
-rw-rw-r--  1 user user  6752 Mar  6 15:24 rp2350_openocd_repo.cfg
-rw-rw-r--  1 user user 14009 Mar  6 15:16 rp2350_raspberry_repo.cfg

The debug port seems to work

openocd -f interface/cmsis-dap.cfg -f target/rp2350.cfg -c "adapter speed 1000" -c "tcl_port 6888" -c "telnet_port 5666"
Open On-Chip Debugger 0.12.0
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
Info : Hardware thread awareness created
Info : Hardware thread awareness created
Info : Hardware thread awareness created
Info : Hardware thread awareness created
cortex_m reset_config sysresetreq

adapter speed: 1000 kHz

Info : Listening on port 6888 for tcl connections
Info : Listening on port 5666 for telnet connections
Info : Using CMSIS-DAPv2 interface with VID:PID=0x2e8a:0x000c, serial=E6625C05E7877123
Info : CMSIS-DAP: SWD supported
Info : CMSIS-DAP: Atomic commands supported
Info : CMSIS-DAP: Test domain timer supported
Info : CMSIS-DAP: FW Version = 2.0.0
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 0 SWDIO/TMS = 0 TDI = 0 TDO = 0 nTRST = 0 nRESET = 0
Info : CMSIS-DAP: Interface ready
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x4c013477
Info : [rp2350.dap.core0] Cortex-M33 r1p0 processor detected
Info : [rp2350.dap.core0] target has 8 breakpoints, 4 watchpoints
Info : [rp2350.dap.core1] Cortex-M33 r1p0 processor detected
Info : [rp2350.dap.core1] target has 8 breakpoints, 4 watchpoints
Info : starting gdb server for rp2350.dap.core0 on 3333
4 Attachments

Discussion

  • Tomas Vanek

    Tomas Vanek - 2026-03-06

    No wonder as you're using the latest but too old release (0.12 from January 2023) and RP2350 flash support was merged in April 2025.
    Don't combine config files downloaded from untrustworthy sources with different OpenOCD binary.
    Either use fresh upstream git master (build from source or a prebuild pack) - it will support rp2350 except RISC-V cores, or use RPi fork https://github.com/raspberrypi/openocd for complete rp2350 support

     
  • symdeb

    symdeb - 2026-03-06

    it seem that for many apt applications on ubuntu are years behind. I tried those two options as well with the same DAP. The Raspberry seems not support CMIS-SAP and the latest openocd fails as well.

    Bus 001 Device 029: ID 2e8a:000c Raspberry Pi Debug Probe (CMSIS-DAP) RP2350

    below all run after build fresh from source and sudo make install:

    openocd:

    Open On-Chip Debugger 0.12.0+dev-02422-g5b3db97c4 (2026-03-06-14:15)
    Licensed under GNU GPL v2
    For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
    Info : [rp2350.cm0] Hardware thread awareness created
    Info : [rp2350.cm1] Hardware thread awareness created
    _rv_reset_init
    adapter speed: 1000 kHz
    Error: unable to find a matching CMSIS-DAP device
    ** OpenOCD init failed **
    shutdown command invoked
    embedded:startup.tcl:1965: Error: 
    Traceback (most recent call last):
      File "embedded:startup.tcl", line 2000, in program
        program_error {** OpenOCD init failed **} 1
      File "embedded:startup.tcl", line 1965, in program_error
        shutdown error
    

    raspberry:

    Open On-Chip Debugger 0.12.0+dev-00002-gcd4873400 (2026-03-06-14:21)
    Licensed under GNU GPL v2
    For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
    Error: The specified adapter driver was not found (cmsis-dap)
    The following adapter drivers are available:
    dummy          { jtag }
    jtag_vpi       { jtag }
    vdebug         { jtag swd }
    jtag_dpi       { jtag }
    buspirate      { jtag swd }
    remote_bitbang { jtag swd }
    sysfsgpio      { jtag swd }
    linuxspidev    { swd }
    xlnx_pcie_xvc  { jtag swd }
    rshim          { swd }
    
     

    Last edit: symdeb 2026-03-06
  • symdeb

    symdeb - 2026-03-07

    Tested with RP2040 and latest openocd and fails, Distro openocd works for RP2040,. See video.

     
  • symdeb

    symdeb - 2026-03-07

    Issue can be closed.

    This works with the master branch, the issue was w/o specifying CMSIS-DAP support the strange error as above appeared: for anyone interested:

    sudo apt-get install libhidapi-dev libusb-1.0-0-dev
    git clone https://sourceforge.net/p/openocd/code/ci/master/tree/
    git submodule update --init --recursive
    git checkout master
    ./bootstrap
    export CFLAGS="-Wno-error=calloc-transposed-args"
    ./configure --enable-internal-jimtcl --enable-cmsis-dap 
    make
    sudo make install
    

    flash with
    sudo openocd -f interface/cmsis-dap.cfg -f target/rp2350.cfg -c "adapter speed 1000" -c "program build/uart.elf verify reset exit"

     

    Last edit: symdeb 2026-03-07

Log in to post a comment.

MongoDB Logo MongoDB