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

Getting up to speed tutorial

I feel defeated. Programming nrf52 uses libraries that rely on libraries that rely on libraries and on. Loading a new project into Segger Embedded Studio loads none of the libraries used by the SDK. I don't know where to find the full set of libraries and don't know what libraries a certain function requires.

I think perhaps I am too much of a novice to get over the hump. All documentation I can find starts assuming more knowledge than I have. Does anyone know of a good tutorial, book, etc that could get me up to speed by any chance?

Thanks,

  • I would go to the main folder of the SDK in your OS that you are using and search for the specific file(s). For instance search "access.h"  right click 'open file location'. Then copy the file path. Into project explorer ---> preprocessor----> User include directories (make sure to click the common).   If you are missing a access.c file copy the file into the folder you want to put it in "add existing folder".  It will take a long time the first time, but you will get faster and find faster techniques. There are videos from nordic that show this process as well.

  • Thank you.  What I don't understand is how to figure out what all files are needed.  For example, I need to run giote driver but it's header file has includes for 7 other header files and I would imagine all of them have includes for additional header files and I am sure there are a number of source code files required also.  How do I determine all the needed files to include to support one sdk function like gpiote?  That is the reason I asked about including all library files.  Thanks.

  • When compiling you should get errors that tell you which ones are missing or what functions are undefined. Do you see these errors? Have you gotten or tried any of the other examples? 

  • Yes I have seen those.  My reaction was that I was doing something wrong in the set up.  I did not think of it as the method to identify missing files!  I understand that method will work but I did not think of it as the solution for the problem.  Thank you for letting me know.  I will go down that path!  Much appreciated.

  • I have recently started with this SDK. I found the most productive approach was to duplicate one of the examples. I converted the makefile to cmake, which was very instructive on the compiler options and so on, and then removed any files and include directories for which doing this did not break the build. It's amazing how few of the libraries you actually need.

    Aside from which files you need, it's worth looking for the blog describing the Observer pattern. I regards the SDK's implementation as horrible, but it does work. I wasted a lot of time trawling the SDK trying to understand this and other features.

    Personally, I would not use the nrf/nrfx peripheral drivers. The code is overly complex. It is much simpler to just deal with the registers directly. The NRF peripherals have a simple, consistent and logical design, and you can easily write application specific drivers which do just what you need. 

Related