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

Debugging problem with GNU ARM Eclipse toolchain (nrf52 blinky)

Hi,

I want to debug the blinky project on a nRF52 dk (PCA10040) using Eclipse. I strictly followed the instructions as described here: devzone.nordicsemi.com/.../

I can build, download and execute the blinky sample project, but I am not able to debug it. (My problem looks similar to this post: devzone.nordicsemi.com/.../)

When I launch my debug configuration the gdb starts and connects to the target. Then I got two different scenarios:

Scenario 1: The debugger hangs up while "Starting target CPU..." (see console output below).

Scenario 2: The CPU is restarted again and again until I terminate the debugging session. Here is the console output I got from scenario 2:

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

JLinkARM.dll V5.12e (DLL compiled Apr 29 2016 15:05:28)

-----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:        12000kHz
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: 682968329
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 1 bytes @ address 0x00000000 (Data = 0x00)
Read 1 bytes @ address 0x00000000 (Data = 0x00)
Reading 64 bytes @ address 0x00000000
Reading 8 bytes @ address 0x00000000
Reading 7 bytes @ address 0x00000000
Target interface speed set to 1000 kHz
Resetting target
Halting target CPU...
...Target halted (PC = 0x00000E7C)
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= 20010000, MSP= 20010000, PSP= 00000000
R14(LR) = FFFFFFFF, R15(PC) = 00000E7C
XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
Read 1 bytes @ address 0x00000000 (Data = 0x00)
Read 1 bytes @ address 0x00000000 (Data = 0x00)
Reading 8 bytes @ address 0x00000000
Reading 7 bytes @ address 0x00000000
Select auto target interface speed (1000 kHz)
Flash breakpoints enabled
Semi-hosting enabled (Handle on BKPT)
Semihosting I/O set to TELNET Client
SWO disabled succesfully.
SWO enabled succesfully.
Read 1 bytes @ address 0x00000000 (Data = 0x00)
Downloading 3976 bytes @ address 0x00000000 - Verified OK
Downloading 8 bytes @ address 0x00000F88 - Verified OK
Downloading 1360 bytes @ address 0x00000F90 - Verified OK
Comparing flash   [....................] Done.
Erasing flash     [....................] Done.
Programming flash [....................] Done.
Verifying flash   [....................] Done.
Writing register (R8 = 0x00000e7d)
Writing register (s8 = 0xffffffff)
Read 1 bytes @ address 0x00000E7D (Data = 0x49)
Reading 64 bytes @ address 0x00000D40
Read 1 bytes @ address 0x00000D44 (Data = 0x80)
Read 1 bytes @ address 0x00000D44 (Data = 0x80)
R0 = 00000000, R1 = 00000000, R2 = 00000000, R3 = 00000000
R4 = 00000000, R5 = 00000000, R6 = 00000000, R7 = 00000000
R8 = 00000E7D, R9 = 00000000, R10= 00000000, R11= 00000000
R12= 00000000, R13= 20010000, MSP= 20010000, PSP= 00000000
R14(LR) = FFFFFFFF, R15(PC) = 00000E7C
XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
Read 1 bytes @ address 0x00000E7D (Data = 0x49)
Setting breakpoint @ address 0x00000D44, Size = 4, BPHandle = 0x0001
Starting target CPU...
Comparing flash   [....................] Done.
Erasing flash     [....................] Done.
Programming flash [....................] Done.
Verifying flash   [....................] Done.
...Breakpoint reached @ address 0x00000D44
Reading all registers
Read 1 bytes @ address 0x00000E7D (Data = 0x49)
Reading 64 bytes @ address 0x00000E40
Reading 64 bytes @ address 0x00000E80
Starting target CPU...
...Breakpoint reached @ address 0x00000D44
Reading all registers
Read 1 bytes @ address 0x00000E7D (Data = 0x49)
Reading 64 bytes @ address 0x00000E40
Reading 64 bytes @ address 0x00000E80
Starting target CPU...
...Breakpoint reached @ address 0x00000D44
Reading all registers
Read 1 bytes @ address 0x00000E7D (Data = 0x49)
Reading 64 bytes @ address 0x00000E40
Reading 64 bytes @ address 0x00000E80
Starting target CPU...
...Breakpoint reached @ address 0x00000D44
Reading all registers
Read 1 bytes @ address 0x00000E7D (Data = 0x49)
Reading 64 bytes @ address 0x00000E40
Reading 64 bytes @ address 0x00000E80
Starting target CPU...

NOTE: This output continues endlessly...

I have the following system/toolchain configuration:

  • Kubuntu 16.06
  • Eclipse IDE for C/C++ Developers Version: Mars.2 Release (4.5.2)
  • GNU Tools ARM Embedded 5.3.1 20160307
  • ...

I have tried it numerous times each time with a "fresh" project setup.

Any suggestions? If necessary I can provide you more information...

Update 21.07.2016: Attached out-file nrf52832_xxaa.out

Update 22.07.2016: Attached screenshots of the debug config image description image description image description

Parents Reply Children
No Data
Related