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

SDK_config.h inconsistencies

I just replaced SDK 14.0 with the shiny new SDK 14.1 in my project. My project uses components from the SDK, but I don't use the exact same structure. Once again, it won't compile out of the box. sigh

Okay, here's the question. I assumed ~\nRF5_SDK_14.1.0_1dda907\config\sdk_config.h to be a typical "master" from which the sdk_config.h files used in the examples are derived. No such luck. I expected this master not to be that different from, for example, from ~\nRF5_SDK_14.1.0_1dda907\examples\peripheral\blinky\pca10040\blank\config\sdk_config.h.

Wrong. It is next to impossible to compare the differences in these two using an automated tool.

Is there another "master" that is being used for creation of the examples?

How can I compare the sdk_config.h from my project (that started life using SDK 13) with the changes required in SDK 14.1?

  • Hi,

    Are there any defines and settings you are missing in the sdk_config.h in sdk_folder\config\sdk_config.h ? This should be a master sdk_config.h, and have most defines.

    Please note the release notes from SDK 14.1 about sdk_config.h:

    • The order of some module BLE event handlers has been changed. This means that compiling new sdk_config.h files with old modules might lead to crashes
    • A new priority has been added, and all BLE applications have been changed to have the new priority (NRF_SDH_BLE_OBSERVER_PRIO_LEVELS has been changed from 3 to 4). This means that compiling new main files with old sdk_config.h files will not work unless NRF_SDH_BLE_OBSERVER_PRIO_LEVELS is set to 4 or more.
  • The pin settings NRF_SPI_DRV_MISO_PULLUP_CFG for SPI are not part of the sdk_config.h as available in this master configuration file. Neither is NRF_BLE_GATT_ENABLED. The log macro's for NRF_SORTLIST_* are missing. Just to name a few, I didn't check everything.

    A closely related request: would it be possible to update the examples to use sdk_config files directly derived from the delivered master copy?

    The reason for this request is that it would enable a simple diff between master- and example sdk_config.h to provide a quick overview of the modifications done to get the example up and running. Makes it so much easier to re-use the illustrated functionality!

    Just to illustrate the problem I ran into... I wrote a small diff tool that checks differences based on identifiers (a tool like winmerge finds 391 different blocks with changes in it). image description

    My tool found 617 differences, 606 symbols are missing from the sdk_config.h in blinky (examples/peripheral/blinky/pca10040/blank/config), 4 are not in the master at all and only 7 have actually been changed from the default. Note that this tool was written in a couple of hours and thus may contain bugs, but the ones I checked seem to confirm said figures.

    Please note, I'm not here to sound all negative and such. It's great to have an SDK as complete as this that is actually useful and you guys are doing a terrific job helping us where necessary!

  • Yes, there seems to be some room for improvment in the sdk_folder\config\sdk_config.h file.

    For BLE application, you can also consider the sdk_config.h in the ble_app_template project to also be a kind of master config file.

    would it be possible to update the examples to use sdk_config files directly derived from the delivered master copy?

    Could be possible, but care must be taken when merging so that the master sdk_config defines don’t overwrite any of the defines set in the example sdk_config.

  • Slight misunderstanding there I guess. I meant Nordic should update their examples, preferably in an SDK 14.1.1 (or otherwise 14.2.0 or even 15.something once it is published).

    I'll check the sdk_config.h from ble_app_template, thanks for the pointer! I guess, however, this template has part of the BLE interface already enabled, no? (Didn't check it yet, will find out tomorrow!)

  • Can a single sdk_config file that has all possible macros definitions ?

    (1) be provided ?

    (2) an identical sdk_config file be inserted in all examples - so it is easy for customers to merge different examples to make their projects easily. 

    What we have now is scrambled sdk macros spread in different examples. [This means example projects does not have all the sdk_config parameters which defeats the purpose of having and sdk_config. altogether].

    A huge amount of time is wasted just trying to identify and getting a working sdk_config file. This can be avoided with a single sdk_config that has all parameters. 

Related