Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Unwanted libraries included in examples

WHY ARE SO MANY UN-NECESSARY LIBRARIES INCLUDED IN SIMPLE EXAMPLES?

I'm using nrf52 for a consumer device. Just loaded up the blinky example (under the peripheral folder) to test on my pca10040. 

I see 12 -14 libraries!!! Is that what it takes to blink an led?

I'm trying to understand 

a) what is the the purpose of  nrf_atomic.c , nrf_balloc.c , nrf_memobj.c and 10 other libraries TO BLINK AN LED?

b) has anyone had luck here building their project from scratch and adding just the bare minimum libraries needed? It just seems like there a whole lot of libraries and a whole bunch of on/off switches in the sdk_config.h and I find myself spending more time understanding the sdk than building my product. 

cheers, 

Hari 

Parents Reply
  • haricane said:
    Can Nordic share similar code for say setting up advertisements? I don't need any events/ handlers, just setting up of advertisements. Or even the simplest of BLE features?

    Not really, the Softdevice (BLE stack) requires handlers to signalize events to the application. I would suggest that you check out NCS, it might be more fitting for you, especially if you have any previous experience with RTOS. 

    regards

    Jared 

Children
Related