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.
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.
Hello,
You can use JLinkGDBServer to make a link with your debug software ( like DDD on linux )
Hello,
You can use JLinkGDBServer to make a link with your debug software ( like DDD on linux )
I am still confused how to start gdb server in my system.
This command can active your remote server and allow you to debug with DDD :
JLinkGDBServer -If SWD -Speed 4000 -Device Cortex-M4
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.