nRF Command Line Tools v10.11.1

Linking against the DLL

The easiest way to load the DLL is to link against the DLL when building your application. In this way, your application will automatically load the DLL when it starts.

The following code snippets describe how to load and call one function of the nrfjprog DLL. Remember that error checking should be done in each step of the code, but for simplicity this is not illustrated in the following code snippets.

  1. Link your application against the DLL:
    • On Windows: nrfjprogdll.lib
    • On Linux: libnrfjprogdll.so
    • On macOS: libnrfjprogdll.dylib
    See the documentation of your toolchain for how to link against libraries.
  2. Include the nrfjprog header file:
    #include "nrfjprogdll.h"
  3. Call the function, for example:
    bool halted;
    NRFJPROG_is_halted(&halted);