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

Jlink gdb debugger

Hi all, I am working on nrf51822 and I need to debug my code through gdb. Please give me suggestion how can I use gdb server and how can connect it to JLink. thanks in advance.

Parents Reply
  • You can start the GDB server with the command @Nabil posted, but you need to change the device from cortex-m4 to nrf51822.

    Here are the commands I typically use to start a new debug session:

    jlinkgdbservercl  -select USB -device nRF51 -if SWD -speed 4000 // starts server
    arm-none-eabi-gdb *.out/*.elf // starts GDB session and loads debug symbols from input
    
    //in GDB (may be added to .gdbinit)
    target remote localhost:2331 // connects to server
    mon reset 0 // reset target
    

    That said, I would recommend to consider Segger Ozone as an alternative to GDB.

Children
No Data
Related