Equipment: PCA10040 DK with SDK14
I'm currently having the same issue described in this post.
Essentially, I can program and build my project correctly in Eclipse, but I can't get the debugging console to work properly. I followed the Eclipse and GCC guide here and when I click on the debug icon, the debug perspective opens but the program never halts. Nothing happens really.
I've modified my makefile to have "-O0 -g3" for the optimizations and I've double checked that my debug settings are the same ones outlined in the Eclipse guide. This is the output from the JLinkGDBServer:
SEGGER J-Link GDB Server V6.22c Command Line Version JLinkARM.dll V6.22c (DLL compiled Dec 8 2017 15:42:04) Command line: -if swd -device NRF52832_xxaa -endian little -speed 1000 -port 2331 -swoport 2332 -telnetport 2333 -vd -ir -localhostonly 1 -singlerun -strict -timeout 0 -----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: on Init regs on start: on 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 Jul 24 2017 17:30:12 Hardware: V1.00 S/N: 682707321 Checking target voltage... Target voltage: 3.30 V Listening on TCP/IP port 2331 Connecting to target...Connected to target Waiting for GDB connection...Connected to 127.0.0.1 Reading all registers Read 4 bytes @ address 0x00000000 (Data = 0x20000400) Read 2 bytes @ address 0x00000000 (Data = 0x0400) Received monitor command: speed 1000 Target interface speed set to 1000 kHz Received monitor command: clrbp Received monitor command: reset Resetting target Received monitor command: halt Halting target CPU... ...Target halted (PC = 0x000008E8) Received monitor command: regs R0 = 00000000, R1 = 00000000, R2 = 00000000, R3 = 00000000 R4 = 00000000, R5 = 00000000, R6 = 00000000, R7 = 00000000 R8 = 00000000, R9 = 00000000, R10= 00000000, R11= 00000000 R12= 00000000, R13= 20000400, MSP= 20000400, PSP= 00000000 R14(LR) = FFFFFFFF, R15(PC) = 000008E8 XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000 CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00 Reading all registers Read 4 bytes @ address 0x000008E8 (Data = 0x47184B06) Read 2 bytes @ address 0x000008E8 (Data = 0x4B06) Received monitor command: speed auto Select auto target interface speed (1000 kHz) Received monitor command: flash breakpoints 1 Flash breakpoints enabled Read 4 bytes @ address 0x000008E8 (Data = 0x47184B06) Read 2 bytes @ address 0x000008E8 (Data = 0x4B06) Downloading 16016 bytes @ address 0x00023000 - Verified OK Downloading 16048 bytes @ address 0x00026E90 - Verified OK Downloading 16128 bytes @ address 0x0002AD40 - Verified OK Downloading 5056 bytes @ address 0x0002EC40 - Verified OK Downloading 16000 bytes @ address 0x00030000 - Verified OK Downloading 16096 bytes @ address 0x00033E80 - Verified OK Downloading 228 bytes @ address 0x00037D60 - Verified OK Writing register (PC = 0x00034370) Read 4 bytes @ address 0x00034370 (Data = 0x4A074906) Read 2 bytes @ address 0x00034370 (Data = 0x4906) Received monitor command: clrbp Received monitor command: reset Resetting target Received monitor command: halt Halting target CPU... ...Target halted (PC = 0x000008E8) Received monitor command: regs R0 = 00000000, R1 = 00000000, R2 = 00000000, R3 = 00000000 R4 = 00000000, R5 = 00000000, R6 = 00000000, R7 = 00000000 R8 = 00000000, R9 = 00000000, R10= 00000000, R11= 00000000 R12= 00000000, R13= 20000400, MSP= 20000400, PSP= 00000000 R14(LR) = FFFFFFFF, R15(PC) = 000008E8 XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000 CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00 Reading all registers Read 4 bytes @ address 0x000008E8 (Data = 0x47184B06) Read 2 bytes @ address 0x000008E8 (Data = 0x4B06) Starting target CPU...
When I start the debug process, there is no initial halt when the debugger starts going through main and regardless of where I add breakpoints, the program never halts. I've also made sure that I'm programming both the application and the soft device. I'm not really sure where to go from here.