Hi all,
I have been stuck trying to debug the example project for a couple of days now and could not find the answer through searching. Here are my problems.
Background:
I am using Eclipse Luna on Mac and on pc. SDK version 6, compiler 4.8.4, S110 version 7, JLink version 4.9
I have followed this guide: devzone.nordicsemi.com/.../ it is very helpful. However I am stuck at debugging stage. Everything works fine compiles and was able to flash the generated files on the chip with nrfgo fine. I have already flash S110 softdevice on there.
Problem:
I am having a hard time starting the debug process. My debug configuration is the default for the Jlink GDB with first breakpoint being set in main.
When i started the debug configuration everything loads starts fine no error and the current debug pointer is set at the timer_init() which is the first function of the main().
The only problem with this is that Eclipse is not giving me option to run the program. The buttons for the step over, step into, run, reset, or terminate on the tool bar is not available to select. The Run option from the menu are also not available.
There was a point in time when I was trying to make this work the buttons showed up but then the program keep on throwing out hard fault and does nothing else.
I have no clue of what to do next. Any help pointing me in the right direction would be appreciated.
I have include the JLinkGDBServer log
SEGGER J-Link GDB Server V4.92 Command Line Version
JLinkARM.dll V4.92 (DLL compiled Sep 30 2014 09:55:19)
-----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 onlyGenerate logfile: off
Verify download: on
Init regs on start: on
Silent mode: off
Single run mode: on
Target connection timeout: 5 sec.
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device:
nRF51822_xxAATarget interface: SWD
Target interface speed: 1000kHz
Target endian: little
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link OB-SAM3U128 V1 compiled Aug 22 2014 17:25:44
Hardware: V1.00
S/N: 480205930
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
Select auto target interface speed (2000 kHz)
Flash breakpoints enabled
Semi-hosting enabled (VectorAddr = 0x08)
Semihosting I/O set to TELNET Client
Downloading 16176 bytes @ address 0x00016000 - Verified OK
Downloading 16096 bytes @ address 0x00019F30 - Verified OK
Downloading 13892 bytes @ address 0x0001DE10 - Verified OK
Downloading 8 bytes @ address 0x00021454 - Verified OK
Downloading 1108 bytes @ address 0x0002145C - Verified OK
Writing register (PC = 0x00020a4c)
Read 4 bytes @ address 0x00020A4C (Data = 0x480A2103)
Read 2 bytes @ address 0x00017132 (Data = 0xF7FF)
Read 2 bytes @ address 0x00017132 (Data = 0xF7FF)
Read 2 bytes @ address 0x00017132 (Data = 0xF7FF)
Read 2 bytes @ address 0x00017132 (Data = 0xF7FF)
Read 2 bytes @ address 0x00017132 (Data = 0xF7FF)
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)
Setting breakpoint @ address 0x00017132, Size = 2, BPHandle = 0x0002
Starting target CPU...
...Breakpoint reached @ address 0x00017132
Reading all registers
Removing breakpoint @ address 0x00017132, Size = 2
Read 4 bytes @ address 0x00017132 (Data = 0xFAD5F7FF)
Reading 64 bytes @ address 0x20003FC0