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

Merge and Edit sdk_cofig

I using nRF52840, SDK: 16, Softdevice: s140 with Keil uVision5.

In my application, I want to merge many example codes like iBeacon, BLE as UART, SPI etc. I have successfully merged everything else in the iBeacon example but unable to merge ble_app_uart example. The problem is some of the options(for example, NRF_BLE_CONN_PARAMS, NRF_BLE_GATT_ENABLE) are not available in sdk_config.h configuration wizard(PFA, left:ble_app_uart, right:ble_app_beacon)

  • I can find all of them in the header file(text format) and manually add to the another. Is it the right solution?
  • What other things should I consider while merging these two, as it may disturb transmission or softdevice
  • Hello,

    I can find all of them in the header file(text format) and manually add to the another. Is it the right solution?

    Yes, you may just as well edit the sdk_config file directly. Personally, I prefer to only work with the sdk_config file directly, as opposed to using the Keil configuration wizard. You may use whichever approach you are comfortable with, the results should be the same.
    If the UART options is not showing up, I suspect that the configuration of the included source files might be incomplete, but that is just my initial thought.
    The approach I recommend when merging sdk_config files, is to look at an example that includes the functionality you are interested in replicating, and then copying the entire block of configs. Then, you should look over each define to verify that the configuration is as wanted, or to make the necessary changes.

    What other things should I consider while merging these two, as it may disturb transmission or softdevice

    The sdk_config can be challenging to familiarize oneself with, but following the steep learning curve it becomes much easier to navigate.

    One of the biggest pitfalls of the sdk_config is its - sometimes unintended by the user - fallback to legacy drivers. This happens if the legacy driver is defined - regardless of if it is enabled - such as discussed in this ticket. Therefore, I recommend highly recommend that you keep your sdk_config file strictly "minimalistic" - i.e only add blocks of defines that are necessary, and avoid dumping a more-or-less whole example sdk_config file into your project sdk_config. This could indeed lead to unexpected results.

    Please do not hesitate to ask if things should still be unclear, or if you encounter any other questions!

    Best regards,
    Karl

Related