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

How to find and set library dependencies and configuration?

Hello, 

I've just recently started learning to develop on the nrf52 platform after 2 years of frustration trying to learn of how to develop on the Nordic platform I finally decided to purchase one of the only courses I could find that teach the "foundations" (which for this product is a must sins there is no way you naturally learn that)  and even after that I figured out that the course doesn't cover it and I dint my self just fighting basic IDE Errors.

So I decided to reach out for help here and ask:

How do you determine the required library files&drivers (From the default SDK say Version 16) before you use them as well as what exactly to configure in the "sdk_config.h" with the right parameters per peripheral library and drives?

Thanks for helping!

Op system: windows 10

IDE : Segger embedded studio

Parents Reply Children
  • Hi Thanks for the detailed explanation about how to add the libraries ended up taking one example that contains most everything I needed and go from there,

    But this doesn't answer my educational part of the question which was how do you figure out which other libraries you need to use for say "nrf_serial.h" and similar libraries like that how do you approach it?

  • MikeLemon said:
    But this doesn't answer my educational part of the question which was how do you figure out which other libraries you need to use for say "nrf_serial.h" and similar libraries like that how do you approach it?

    If you want to use the functions in "nrf_serial.h" you first have to add the associated source file nrf_serial.c. Then you should look in these files to see what libraries/drivers you need to add to your project. E.g. in nrf_serial.h these header files are listed:

    #include <stdint.h>
    #include <stdbool.h>
    
    #include "nrf_drv_uart.h"
    #include "nrf_queue.h"
    #include "nrf_mtx.h"
    #include "app_timer.h"

    You need to add the paths to these files, in addition, you have to implement the associated source files.

    In nrf_serial.c the following file is listed: 

    #include "sdk_common.h"

    You don't have to worry about this file if you start with an existing project, e.g. ble_app_template.

    You repeat this process with the files nrf_drv_uart.h, nrf_queue.h, nrf_mtx.h and app_timer.h.

    Best regards

Related