This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Can't get Eclipse debugging to work for nrf52

Hello,

We are switching chips from the nrf51 to the nrf52832. I have a nrf52-DK board now. My Eclipse set up is still able to compile, run, and debug my nrf51 projects, however, for the new board I cannot debug. The code compiles fine and I can Flash successfully but when I try to debug I get no source available for 0x0 or other random addresses like: No source available for "0x14b05e0".

I have been thru all of the tutorials regarding how to configure debugging (again it works fine for the nrf51 chips). I have selected device nRF2832_xxAA under Settings/Devices, but it still won't debug. Below is the latest console log. Any insight would be greatly appreciated. Thank you!

SEGGER J-Link GDB Server V5.12f Command Line Version

JLinkARM.dll V5.12f (DLL compiled May 17 2016 16:03:35)

-----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:              on
Verify download:               on
Init regs on start:            off
Silent mode:                   off
Single run mode:               on
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:                 nRF52832_xxAA
Target interface:              SWD
Target interface speed:        1000kHz
Target endian:                 little

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 15 2016 18:03:17
Hardware: V1.00
S/N: 682961532
Checking target voltage...
Target voltage: 3.30 V
Listening on TCP/IP port 2331
Connecting to target...WARNING: T-bit of XPSR is 0 but should be 1. Changed to 1.
Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x014B05E0 (Data = 0x00000000)
Target interface speed set to 1000 kHz
Select auto target interface speed (1000 kHz)
Flash breakpoints enabled
Semi-hosting enabled (Handle on BKPT)
Semihosting I/O set to TELNET Client
Read 4 bytes @ address 0x014B05E0 (Data = 0x00000000)
Read 2 bytes @ address 0x000277DE (Data = 0x2300)
Read 2 bytes @ address 0x000277DE (Data = 0x2300)
Read 4 bytes @ address 0x00000604 (Data = 0x496C205C)
Read 4 bytes @ address 0x00000604 (Data = 0x496C205C)
Read 2 bytes @ address 0x000277DE (Data = 0x2300)
Read 2 bytes @ address 0x000277DE (Data = 0x2300)
Read 2 bytes @ address 0x000277DE (Data = 0x2300)
R0 = 000005FB, R1 = 014B05E0, R2 = 00000001, R3 = 40020518
R4 = 000005FB, R5 = 000005DD, R6 = 000005E7, R7 = 000005F1
R8 = 000005FB, R9 = 40008544, R10= 40001504, R11= 00000000
R12= 00000001, R13= 00000060, MSP= 00000060, PSP= 00000000
R14(LR) = 00000605, R15(PC) = 014B05E0
XPSR 21000003, APSR 20000000, EPSR 01000000, IPSR 00000003
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
Read 4 bytes @ address 0x014B05E0 (Data = 0x00000000)
Setting breakpoint @ address 0x000277DE, Size = 2, BPHandle = 0x0001
Starting target CPU...
...Target halted (DBGRQ, PC = 0x014B05E0)
Reading all registers
Read 4 bytes @ address 0x014B05E0 (Data = 0x00000000)
Removing breakpoint @ address 0x000277DE, Size = 2
Read 4 bytes @ address 0x00000604 (Data = 0x496C205C)
Read 4 bytes @ address 0x00000604 (Data = 0x496C205C)
Reading 64 bytes @ address 0x014B05C0
Reading 64 bytes @ address 0x014B0600
Parents
  • Just thinking out loud: it does set a breakpoint at 0x277DE, look in the .map file to see where that is. The debugger does start executing your code at 0x0 (the reset handler) and the code faults (enters and infinite loop in a default handler) and then you hit the Pause button and it displays PC=0x014B05E0? Thats probably unrelated to the missing symbols. You say the "Build Configuration" is a good clone, but I think the problem might be in the Eclipse "Debug Configuration" which should differ in subtle ways

Reply
  • Just thinking out loud: it does set a breakpoint at 0x277DE, look in the .map file to see where that is. The debugger does start executing your code at 0x0 (the reset handler) and the code faults (enters and infinite loop in a default handler) and then you hit the Pause button and it displays PC=0x014B05E0? Thats probably unrelated to the missing symbols. You say the "Build Configuration" is a good clone, but I think the problem might be in the Eclipse "Debug Configuration" which should differ in subtle ways

Children
No Data
Related