Hello, When I try to debug the RP2040, I get the output below, then the program doesn't stop at the first breakpoint right after main() and just goes off into nowhere. I'm not sure if my command line options are correct. I am able to connect to the target using the JLinkGDBserver GUI, so I know that the J-Link is working. I would eventually like to debug a dual core application, but am stuck just trying to start debugging at all.
I'm using CLion in Windows, and here's the output ( I hid my serial no )..
"C:\Program Files\SEGGER\JLink_V784d\JLinkGDBServerCL.exe" -select USB=xxxxxxxxxx -device RP2040_M0_0 -endian little -if SWD -speed 4000 -LocalhostOnly -nologtofile -port 2331 -SWOPort 2332 -TelnetPort 2333
SEGGER J-Link GDB Server V7.84d Command Line Version
JLinkARM.dll V7.84d (DLL compiled Jan 25 2023 15:56:28)
Command line: -select USB=xxxxxxxxxx -device RP2040_M0_0 -endian little -if SWD -
speed 4000 -LocalhostOnly -nologtofile -port 2331 -SWOPort 2332 -TelnetPort 2333
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: localhost only
Generate logfile: off
Verify download: off
Init regs on start: off
Silent mode: off
Single run mode: off
Target connection timeout: 0 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device: RP2040_M0_0
Target device parameters: none
Target interface: SWD
Target interface speed: 4000kHz
Target endian: little
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link EDU Mini V1 compiled Jan 23 2023 11:00:33
Hardware: V1.00
S/N: xxxxxxxxxx
Feature(s): FlashBP, GDB
Checking target voltage...
Target voltage: 3.27 V
Listening on TCP/IP port 2331
Connecting to target...
Connected to target
Waiting for GDB connection...Connected to 0000:0000:0000:0000:0000:0000:0000:000
1
Reading common registers: R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12,
SP, LR, PC, XPSR
Reading 64 bytes @ address 0x10001300
Read 4 bytes @ address 0x100013D8 (Data = 0x20000C00)
Read 2 bytes @ address 0x10001348 (Data = 0x4B23)
Read 4 bytes @ address 0x100013D8 (Data = 0x20000C00)
Read 2 bytes @ address 0x100013AC (Data = 0x4B0D)
Reading 64 bytes @ address 0x10000680
Read 2 bytes @ address 0x100006F8 (Data = 0x2019)
Read 4 bytes @ address 0x100006F8 (Data = 0xF0042019)
Received monitor command: reset
Resetting target
Resetting target
Downloading 256 bytes @ address 0x10000000
Downloading 16080 bytes @ address 0x10000100
Downloading 16032 bytes @ address 0x10003FD0
Downloading 11064 bytes @ address 0x10007E70
Downloading 11728 bytes @ address 0x1000A9A8
Downloading 32 bytes @ address 0x1000D778
Downloading 3340 bytes @ address 0x1000D798
Writing register (PC = 0x100001e8)
Reading 64 bytes @ address 0x10001300
Read 4 bytes @ address 0x100013D8 (Data = 0x20000C00)
Read 2 bytes @ address 0x10001348 (Data = 0x4B23)
Read 4 bytes @ address 0x100013D8 (Data = 0x20000C00)
Read 2 bytes @ address 0x100013AC (Data = 0x4B0D)
Reading 64 bytes @ address 0x10000680
Read 2 bytes @ address 0x100006F8 (Data = 0x2019)
Debugger connected to tcp:localhost:2331
Setting breakpoint @ address 0x100006F8, Kind = 2, Type = THUMB, BPHandle = 0x00
01
Setting breakpoint @ address 0x10001348, Kind = 2, Type = THUMB, BPHandle = 0x00
02
Setting breakpoint @ address 0x100013AC, Kind = 2, Type = THUMB, BPHandle = 0x00
03
Starting target CPU...
I'm using CLion in Windows, and here's the output ( I hid my serial no )..
"C:\Program Files\SEGGER\JLink_V784d\JLinkGDBServerCL.exe" -select USB=xxxxxxxxxx -device RP2040_M0_0 -endian little -if SWD -speed 4000 -LocalhostOnly -nologtofile -port 2331 -SWOPort 2332 -TelnetPort 2333
SEGGER J-Link GDB Server V7.84d Command Line Version
JLinkARM.dll V7.84d (DLL compiled Jan 25 2023 15:56:28)
Command line: -select USB=xxxxxxxxxx -device RP2040_M0_0 -endian little -if SWD -
speed 4000 -LocalhostOnly -nologtofile -port 2331 -SWOPort 2332 -TelnetPort 2333
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: localhost only
Generate logfile: off
Verify download: off
Init regs on start: off
Silent mode: off
Single run mode: off
Target connection timeout: 0 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device: RP2040_M0_0
Target device parameters: none
Target interface: SWD
Target interface speed: 4000kHz
Target endian: little
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link EDU Mini V1 compiled Jan 23 2023 11:00:33
Hardware: V1.00
S/N: xxxxxxxxxx
Feature(s): FlashBP, GDB
Checking target voltage...
Target voltage: 3.27 V
Listening on TCP/IP port 2331
Connecting to target...
Connected to target
Waiting for GDB connection...Connected to 0000:0000:0000:0000:0000:0000:0000:000
1
Reading common registers: R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12,
SP, LR, PC, XPSR
Reading 64 bytes @ address 0x10001300
Read 4 bytes @ address 0x100013D8 (Data = 0x20000C00)
Read 2 bytes @ address 0x10001348 (Data = 0x4B23)
Read 4 bytes @ address 0x100013D8 (Data = 0x20000C00)
Read 2 bytes @ address 0x100013AC (Data = 0x4B0D)
Reading 64 bytes @ address 0x10000680
Read 2 bytes @ address 0x100006F8 (Data = 0x2019)
Read 4 bytes @ address 0x100006F8 (Data = 0xF0042019)
Received monitor command: reset
Resetting target
Resetting target
Downloading 256 bytes @ address 0x10000000
Downloading 16080 bytes @ address 0x10000100
Downloading 16032 bytes @ address 0x10003FD0
Downloading 11064 bytes @ address 0x10007E70
Downloading 11728 bytes @ address 0x1000A9A8
Downloading 32 bytes @ address 0x1000D778
Downloading 3340 bytes @ address 0x1000D798
Writing register (PC = 0x100001e8)
Reading 64 bytes @ address 0x10001300
Read 4 bytes @ address 0x100013D8 (Data = 0x20000C00)
Read 2 bytes @ address 0x10001348 (Data = 0x4B23)
Read 4 bytes @ address 0x100013D8 (Data = 0x20000C00)
Read 2 bytes @ address 0x100013AC (Data = 0x4B0D)
Reading 64 bytes @ address 0x10000680
Read 2 bytes @ address 0x100006F8 (Data = 0x2019)
Debugger connected to tcp:localhost:2331
Setting breakpoint @ address 0x100006F8, Kind = 2, Type = THUMB, BPHandle = 0x00
01
Setting breakpoint @ address 0x10001348, Kind = 2, Type = THUMB, BPHandle = 0x00
02
Setting breakpoint @ address 0x100013AC, Kind = 2, Type = THUMB, BPHandle = 0x00
03
Starting target CPU...
The post was edited 1 time, last by ronter ().