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?

  • Hi,

    (1) There are sdk_config.h template files in SDK 15, found at <sdk folder>/config/<nrf variant>/config/sdk_config.h.

    (2) Our goal is that all the examples have all the options in their sdk_config.h. If not then it is a bug. Note however that what those settings are set to will differ, depending on the needs of the particular example. If you merge functionality from separate examples, or add a module to the project, you must change the settings accordingly.

    I will register the suggestion of putting log configuration in a separate file, although one might argue that it would defeat the purpose of having one configuration file for the project. Note that you can do this separation manually if you set the USE_APP_CONFIG flag and put log related settings in app_config.h. (All of the settings in sdk_config.h can be overridden, either by adding the setting as a project flag/define, or by the method of setting USE_APP_CONFIG and using an app_config.h file.)

    Regards,
    Terje

  • (I know this is old, but it just came up as a 'Related' topic)

    Our goal is that all the examples have all the options in their sdk_config.h.

    They most certainly do not:

    https://devzone.nordicsemi.com/f/nordic-q-a/45366/missing-defines-in-generic-sdk_config-h

  • Hi,

    Thank you for the pointer to the new thread. We are aware of the situation, and hopefully we can sort it out sooner rather than later. Our intention is that at least the generic sdk_config.h contains the full set of defines, and that should preferably be the case also for the ones used in the examples.

    Regards,
    Terje

  • Hi,

    I think with SDK 16 this is still inconsistent, which is very irritating and confusing. I am just trying to find a "full" sdk_config.h for a new project, but already the ble_app_template for pca10040 (=nrf52832) has a different one compared to top level config for nrf52832. See nRF5_SDK_16.0.0_98a08e2\examples\ble_peripheral\ble_app_template\pca10040\s132\config\sdk_config.h vs. nRF5_SDK_16.0.0_98a08e2\config\nrf52832\config\sdk_config.h. The first contains additionally e.g. NRF_BLE_CONN_PARAMS_ENABLED, NRF_BLE_GATT_ENABLED and NRFX_*, nRF_Segger_RTT blocks, the latter has a lot of ANT blocks and misses some NFC settings.

    When will this be cleaned up, so that all examples and "top level" sdk_config.h are content-wise really "full" i.e. complete regards all possibilities (with default=off) and diff-able (same content, keep same order)? This would make comparing and merging examples much much more easier ...

    Can you name me the actual "full" sdk_config.h for nrf52832 and S132 (if this makes a difference) I should use for a new project?

  • Hi,

    The file at <SDK root folder>/config/<device>/config/sdk_config.h should contain all settings.

    Regarding what is (and is not) included in the various examples, as well as the point on ordering, I will tell the developers.

    Regards,
    Terje

Related