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

adding libraries

How do you know what libraries to add when you decide to use an API function call? The documentation does not show that.

Parents
  • There is actually only one API and that's Nordic BLE stack aka Soft Device (functions have sd_ in their name). In case you use it then simply include ble.h from folder corresponding to your Soft Device type (e.g. components\softdevice\s132\headers\ble.h) and you are done. Then all the rest in SDK are rather stand-alone modules (or libraries if you want). There you either know what lib you want to use and how (and then you first find the functions in their header files and then logically include that header file in your project to be able to call that function).

    In case that this doesn't answer your problem then please be more specific, e.g. give us an example what are you doing and where you doubt what headers should be included and what source C files should be compiled.

  • No, peer_manager is simply SDK module (library if you want) which is exactly what I wrote. It might have further dependencies and that's OK, just open SDK with some decent file manager and look for examples (C files) where it is used. Once you learn from these examples and their makefiles just include the same chain of header and C files for compilation and linking.

    And most importantly all SDK modules are in standard architecture of latest Nordic SDKs managed by single file in your project which is called sdk_config.h. Learn how to use this key element on Infocenter. I actually do believe that setting proper defines in your custom config overload should fix your project immediately (or at least that's the idea).

Reply
  • No, peer_manager is simply SDK module (library if you want) which is exactly what I wrote. It might have further dependencies and that's OK, just open SDK with some decent file manager and look for examples (C files) where it is used. Once you learn from these examples and their makefiles just include the same chain of header and C files for compilation and linking.

    And most importantly all SDK modules are in standard architecture of latest Nordic SDKs managed by single file in your project which is called sdk_config.h. Learn how to use this key element on Infocenter. I actually do believe that setting proper defines in your custom config overload should fix your project immediately (or at least that's the idea).

Children
No Data
Related