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

Problem running nRF52 sample app with gdb on NetBeans IDE, macOS

Gentle folks,

I'm sure I'm making some simple, primitive error. Please help me mend my ways :-)

Using gcc in the NetBeans IDE on MacOS for building and running the ble_app_hrs sample app and SoftDevice S132 with a nRF52-DK (PCA10040, V 0.9.0, 2015.41) as target. Builds and runs fine (including connecting and handling BLE requests from an iPhone BLE monitor app).

But when I attempt to run in debug mode from the IDE (after starting JLinkGDBServer (JLinkARM.dll V6.16 (DLL compiled Jun 2 2017 17:59:14)), setting a breakpoint at the first executable line in main(), and connecting to the debugger, the app fails immediately (before ever reaching the breakpoint in main) with a soft device fault.

Here's the stack backtrace: image description

Any hints on how to fix this?

TIA,

Mike

PS: The nRF52-DK currently shows up on the USB as a Flash device named "JLINK".

PPS: Chasing down the interpretation of constants like Soft Device fault IDs is a pain in the online docs, hop-scotching through macro definitions. Sure would be nice if the values were collected in a table. Or am I missing something?

Parents
  • Jørgen,

    Thanks for updating the link. It leads to Mohammad Afaneh's excellent tutorial on using NetBeans/gcc on macOS for nRF5x development, and is what got me started on attempting to use this toolchain. So no direct help there.

    But I did discover the source of my problem and it's not related to Nordic hardware or software. The terminal window in which you run JLinkGDBServer has to be inside the NetBeans IDE, not from a separate (Mac app) Terminal session. (I guess that means the gdb server is trying to get some info from its parent process, namely NetBeans, and can't find it. Correct, Unix experts?)

    So, let's consider this issue closed. Thanks everyone for your attention.

  • Mike,

    Thanks for updating and reporting this issue!

    I will go ahead and update my blog post to address this.

    Thanks!

Reply Children
No Data
Related