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

Debug nRF52840-PDK with arm-none-eabi-gdb

My kit is a nRF52840 PDK, i've installed SDK_14.2.0 and succesfully built and flashed the ble_app_hrs example project, but i'm not able to work as expected with the debugger.
Below the details on my setup,
Any help is welcome! 
Attilio
host: linux (ubuntu)
arm-none-eabi-gcc: 5.4.1 20160919
arm-none-eabi-gdb: GNU gdb (7.11.90.20160917-0ubuntu1+9build1)
JLinkGDBServer: SEGGER J-Link GDB Server V6.20e
debug server:
> JLinkGDBServer -device nRF52840_xxAA -speed 1000 -if SWD -port 3333 -telnetport 4444
debugger:
.gdbinit:
    target remote :3333
    set auto-load safe-path /
    load
    step
> arm-none-eabi-gdb _build/nrf52840_xxaa.out
 
If I set a breakpoint, for example:
b ble_stack_init
I have two cases:
 
Case 1
(gdb) b ble_stack_init
Breakpoint 1 at 0x286fa: file ../../../main.c, line 863.
(gdb) c
Continuing.
Program received signal SIGTRAP, Trace/breakpoint trap.
0x000008c8 in ?? ()
(gdb) c
Continuing.
Program received signal SIGTRAP, Trace/breakpoint trap.
0x000008c8 in ?? ()
(gdb) 
Case 2
 
(gdb) b ble_stack_init
Breakpoint 1 at 0x286fa: file ../../../main.c, line 863.
(gdb) c
Continuing.
Breakpoint 1, main () at ../../../main.c:1033
1033     ble_stack_init();
(gdb) c
Continuing.
Program received signal SIGTRAP, Trace/breakpoint trap.
sd_softdevice_enable (p_clock_lf_cfg=p_clock_lf_cfg@entry=0x2003fefc, fault_handler=0x23349 <app_error_fault_handler>)
    at ../../../../../../components/softdevice/s140/headers/nrf_sdm.h:293
293 SVCALL(SD_SOFTDEVICE_ENABLE, uint32_t, sd_softdevice_enable(nrf_clock_lf_cfg_t const * p_clock_lf_cfg, nrf_fault_handler_t fault_handler));
(gdb) c
Continuing.
Program received signal SIGTRAP, Trace/breakpoint trap.
sd_softdevice_enable (p_clock_lf_cfg=p_clock_lf_cfg@entry=0x2003fefc, fault_handler=0x23349 <app_error_fault_handler>)
    at ../../../../../../components/softdevice/s140/headers/nrf_sdm.h:293
293 SVCALL(SD_SOFTDEVICE_ENABLE, uint32_t, sd_softdevice_enable(nrf_clock_lf_cfg_t const * p_clock_lf_cfg, nrf_fault_handler_t fault_handler));
What is it needed to go ahead?
Parents Reply Children
No Data
Related