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

Compare sdk_config files

Hi!

What is the easiest way to compare two sdk_config files? Some tools, etc. Why do I need it:

  1. My idea is to use "$NRF_SDK/config/nrf52840/config/sdk_config.h" as base config and don't change it. All changed parameters ("diff") put into "app_config.h". Usually it's not a lot of changes compared to the base configuration, but if i need to see it in "modified" (compared to the base) sdk_config - it's very hard. Now I have projects with "modified" sdk_config files, I want to get "diff". 
  2. It would be useful for sdk examples to see "diff".

I hope my explanation is understandable. Thanks for answers and suggestions in advance.

Parents
  • I made a python script to pretty print the differences between sdk_config.h files.

    It looks like this:

    $ ./compare_sdkconfig.py examples/sdk_config_1.h examples/sdk_config_2.h
    ╒════════════════════════════════════╤═══════════════════╤═══════════════════╕
    │ Define                             │   examples/sdk_co │ examples/sdk_co   │
    │                                    │          nfig_1.h │ nfig_2.h          │
    ╞════════════════════════════════════╪═══════════════════╪═══════════════════╡
    │ NRF_RADIO_ANTENNA_COUNT            │                12 │ 3                 │
    ├────────────────────────────────────┼───────────────────┼───────────────────┤
    │ DTM_ANOMALY_172_TIMER_IRQ_PRIORITY │                 2 │ None              │
    ╘════════════════════════════════════╧═══════════════════╧═══════════════════╛

    You can find the script here: github.com/.../nrf_sdk_sdkconfig_diff

Reply
  • I made a python script to pretty print the differences between sdk_config.h files.

    It looks like this:

    $ ./compare_sdkconfig.py examples/sdk_config_1.h examples/sdk_config_2.h
    ╒════════════════════════════════════╤═══════════════════╤═══════════════════╕
    │ Define                             │   examples/sdk_co │ examples/sdk_co   │
    │                                    │          nfig_1.h │ nfig_2.h          │
    ╞════════════════════════════════════╪═══════════════════╪═══════════════════╡
    │ NRF_RADIO_ANTENNA_COUNT            │                12 │ 3                 │
    ├────────────────────────────────────┼───────────────────┼───────────────────┤
    │ DTM_ANOMALY_172_TIMER_IRQ_PRIORITY │                 2 │ None              │
    ╘════════════════════════════════════╧═══════════════════╧═══════════════════╛

    You can find the script here: github.com/.../nrf_sdk_sdkconfig_diff

Children
Related