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

sdk_config.h inconsistency

Can a single sdk_config file that has all possible macros definitions to use with an SDK

(1) be provided ?

(2) so that 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. 

using: SDK V15

Secondly:

The aspect of config for logging.

config for logging doesn't have to be mixed with SDK config - which now bloats the sdk_config.h file.

My suggestion is to consider a separate log_config.h to be provided.

Actually this separation is better, configuring logging has nothing to do with configuring SDK.

Then why should logging parameters be mixed in same config file making unnecessary development time spent to clarify clutter by customer?

  • Please fix this sooner rather than later. It's obviously been an issue for a long time, and is still a mess in version 16.

    The 'generic' sdk_config.h is far from comprehensive, and has duplicates (`grep "#define" sdk_config.h | sort | wc -l` vs `grep "#define" sdk_config.h | sort | uniq | wc -l`). 

    The 'generic' sdk_config.h for the nRF52840 has 1149 unique defines. The 'template' (examples/peripherals/template) sdk_config.h has 968 unique defines. Together, they have a combined 1318 unique defines. Adding in ble_app_template/../sdk_config.h brings the total to 1352 unique defines.

    Across all the config files for the nRF 52840 DK, it appears there are 1735 defined parameters:

    $ find . -path '*/pca10056/*' -name sdk_config.h -exec grep "#define" {} + | cut -d ' ' -f 2 | sort | uniq | wc -l
    > 1735

    Also, FWIW, roughly 1/3 of that is logging:

    $ grep -v -e LOG -e DEBUG_COLOR -e INFO_COLOR nrf52840_sdk_config.h | wc -l
    > 1169
    $ grep -e LOG -e DEBUG_COLOR -e INFO_COLOR nrf52840_sdk_config.h | wc -l
    > 566

    For the nRF52 DK there are 1815 defined parameters in total, but only 1254 in the 'generic' sdk_config.h

    Now I recognize that the 'generic' config might not contain parameters specific to the DK boards intentionally, but then please update the 'template' examples appropriately, as they are most definitely targeting the dev kits.

  • Hi,

    Thank you for the detailed reporting. I have notified the developers.

    Regards,
    Terje

  • SDK v15.3.0 does NOT contain NRF_BLE_CONN_PARAMS_ENABLED, NRF_BLE_GATT_ENABLED among others.

    I had to add them to an external file (e.g. app_config.h) in order for the build system to pull in the definitions of functions such as nrf_ble_gatt_init() etc.

  • Hi,

    I see that those are defined in many of the sdk_config.h files throughout the examples, so they are definitely among the defines that should have been in all sdk_config.h.

    Regards,
    Terje

  • Hi,

    about this topic, is there a fix/update planned for the next SDK release? 

    Btw. Is a new release SDK already scheduled?

Related