This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

JLinkGDBServer prevents wakeup after sd_app_evt_wait()

I'm trying to use RTT for debug printing and having some trouble. I'm using the nrf51-ble-app-lbs example app that goes with App Note 36. I've added the RTT code from www.segger.com/jlink-real-time-terminal.html, and Added some debug logging.

When I flash the chip and boot up regularly I can connect over BLE, but when I try to connect to the RTT stream my debugging log tells me that it gets as far as calling sd_app_evt_wait() and then it never wakes up. I don't see any further debug info and the device stops doing BLE advertisements.

Here's how I'm connecting to the RTT stream:

  1. Power-cycle the chip
  2. run JLinkGDBServer -device nrf51822 -if swd -speed 1000 -port 2331 to connect to the JLINK
  3. run JLinkRTTClientto connect to the GDB server

Any thoughts as to what's going on? I know there are some issues with breakpoints on an app that uses the SoftDevice, but I don't need to set breakpoints, I just want to connect to RTT.

Parents
  • Seems like the issue is that when I connect with JLinkGDBServer it halts the chip, which is why it's not waking up. When I connect using gdb and explicitly start the chip running then I'm able to get debugging output.

    Is there a different way create a bridge to JLinkRTTClient that doesn't halt the chip, or a way to have JLinkGDBServer automatically run the chip when it starts up instead of halting it?

Reply
  • Seems like the issue is that when I connect with JLinkGDBServer it halts the chip, which is why it's not waking up. When I connect using gdb and explicitly start the chip running then I'm able to get debugging output.

    Is there a different way create a bridge to JLinkRTTClient that doesn't halt the chip, or a way to have JLinkGDBServer automatically run the chip when it starts up instead of halting it?

Children
No Data
Related