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

Breakpoints ignored in Eclipse

Hi everyone,

I am struggling to get the GNU Debugger to work and break at breakpoints.

I followed the GCC and Eclipse tutorial: devzone.nordicsemi.com/.../ to install everything on my Mac.

I also tried it with the PCA10028 dev kit as well as a couple of other boards and breakpoints are simply ignored. I built an app based on the app_template and set a breakpoint in my main function, but it does not stop.

Flashing with JLinkExe and debug printing via RTT works fine and Eclipse seems to start the debugger and all the J-Link stuff up correctly, but no breaking at breakpoints.

Update: I also turned off all the optimizations that could cause trouble by using the -Og flag for GCC and it did not help.

Here is the console output in Eclipse when doing a debug launch (Run -> Debug):

SEGGER J-Link GDB Server V5.10d Command Line Version

JLinkARM.dll V5.10d (DLL compiled Dec  9 2015 12:59:04)

-----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:                 NRF51822_XXAA
Target interface:              SWD
Target interface speed:        4000kHz
Target endian:                 little

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Aug 28 2015 19:26:24
Hardware: V1.00
S/N: 681939210
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 = 0x000007C0)
Target interface speed set to 1000 kHz
Resetting target
Halting target CPU...
...Target halted (PC = 0x000006D0)
R0 = FFFFFFFF, R1 = FFFFFFFF, R2 = FFFFFFFF, R3 = FFFFFFFF
R4 = FFFFFFFF, R5 = FFFFFFFF, R6 = FFFFFFFF, R7 = FFFFFFFF
R8 = FFFFFFFF, R9 = FFFFFFFF, R10= FFFFFFFF, R11= FFFFFFFF
R12= FFFFFFFF, R13= 000007C0, MSP= 000007C0, PSP= FFFFFFFC
R14(LR) = FFFFFFFF, R15(PC) = 000006D0
XPSR C1000000, APSR C0000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
Read 4 bytes @ address 0x000006D0 (Data = 0x4C174916)
Select auto target interface speed (1000 kHz)
Flash breakpoints enabled
Read 4 bytes @ address 0x000006D0 (Data = 0x4C174916)
Downloading 4096 bytes @ address 0x00018000 - Verified OK
Downloading 4096 bytes @ address 0x00019000 - Verified OK
Downloading 4096 bytes @ address 0x0001A000 - Verified OK
Downloading 4096 bytes @ address 0x0001B000 - Verified OK
Downloading 4096 bytes @ address 0x0001C000 - Verified OK
Downloading 4096 bytes @ address 0x0001D000 - Verified OK
Downloading 4096 bytes @ address 0x0001E000 - Verified OK
Downloading 1704 bytes @ address 0x0001F000 - Verified OK
Comparing flash   [....................] Done.
Verifying flash   [....................] Done.
Writing register (PC = 0x0001e324)
Read 4 bytes @ address 0x0001E324 (Data = 0x480A2103)
Resetting target
Halting target CPU...
...Target halted (PC = 0x000006D0)
R0 = FFFFFFFF, R1 = FFFFFFFF, R2 = FFFFFFFF, R3 = FFFFFFFF
R4 = FFFFFFFF, R5 = FFFFFFFF, R6 = FFFFFFFF, R7 = FFFFFFFF
R8 = FFFFFFFF, R9 = FFFFFFFF, R10= FFFFFFFF, R11= FFFFFFFF
R12= FFFFFFFF, R13= 000007C0, MSP= 000007C0, PSP= FFFFFFFC
R14(LR) = FFFFFFFF, R15(PC) = 000006D0
XPSR C1000000, APSR C0000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
Read 4 bytes @ address 0x000006D0 (Data = 0x4C174916)
Starting target CPU...
Related