openocd icon indicating copy to clipboard operation
openocd copied to clipboard

Can't connect to rp2350 riscv core via jlink

Open simonjwright opened this issue 1 year ago • 5 comments

macOS Sonoma 14.6.1 (M1) Command Line Tools 15.3 Homebrew This repo sdk-2.0.0 libjaylink 0.3.1 gcc 14.1.0 (aarch64) jlink-edu v9.3 pico 2

./configure --prefix=$HOME/local --enable-jlink --enable-internal-jlink

Running with this script:

OPENOCD_LOC=~/local
$OPENOCD_LOC/bin/openocd                        \
    -f interface/jlink.cfg                      \
    -c "adapter speed 5000"                     \
    -c "set USE_CORE 0"                         \
    -f target/rp2350-riscv.cfg

I get

adapter speed: 5000 kHz
0
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : J-Link V9 compiled May  7 2021 16:26:12
Info : Hardware version: 9.30
Info : VTarget = 3.240 V
Info : clock speed 5000 kHz
Info : SWD DPIDR 0x4c013477
Info : [rp2350.dap.core0] datacount=1 progbufsize=2
Info : [rp2350.dap.core0] unavailable.
Error: [rp2350.dap.core0] Examination failed
Warn : target rp2350.dap.core0 examination failed
Info : starting gdb server for rp2350.dap.core0 on 3333
Info : Listening on port 3333 for gdb connections
^Cshutdown command invoked
Error: [rp2350.dap.core0] Unsupported DTM version: -1
Error: [rp2350.dap.core0] Could not identify target type.
Error: BUG: refcount AP#0 still 1 at exit

(including the last 3 lines for info).

If I use target/rp2350.cfg, I get

adapter speed: 5000 kHz
0
Info : Hardware thread awareness created
cortex_m reset_config sysresetreq
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : J-Link V9 compiled May  7 2021 16:26:12
Info : Hardware version: 9.30
Info : VTarget = 3.245 V
Info : clock speed 5000 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.core0] Examination succeed
Info : starting gdb server for rp2350.dap.core0 on 3333
Info : Listening on port 3333 for gdb connections
^Cshutdown command invoked

simonjwright avatar Aug 23 '24 15:08 simonjwright