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 wrote simple npm package, which could be used in command line

    https://github.com/lybrus/nrf-config-diff-cli

    For blinky_freertos (in $NRF_SDK/examples/peripheral/blinky_freertos/pca10056/blank/config/) it creates file with content:

    /* Generated by nrf-config-diff-cli */
    
    #ifndef APP_CONFIG_H__
    #define APP_CONFIG_H__
    
    #define USE_APP_CONFIG
    
    /* Changed variables */
    #define GPIOTE_ENABLED 1
    #define GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS 4
    #define NRFX_CLOCK_ENABLED 1
    #define NRFX_GPIOTE_ENABLED 1
    #define NRF_CLOCK_ENABLED 1
    #define APP_TIMER_ENABLED 1
    #define BUTTON_ENABLED 1
    
    #endif // APP_CONFIG_H__

Reply
  • I wrote simple npm package, which could be used in command line

    https://github.com/lybrus/nrf-config-diff-cli

    For blinky_freertos (in $NRF_SDK/examples/peripheral/blinky_freertos/pca10056/blank/config/) it creates file with content:

    /* Generated by nrf-config-diff-cli */
    
    #ifndef APP_CONFIG_H__
    #define APP_CONFIG_H__
    
    #define USE_APP_CONFIG
    
    /* Changed variables */
    #define GPIOTE_ENABLED 1
    #define GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS 4
    #define NRFX_CLOCK_ENABLED 1
    #define NRFX_GPIOTE_ENABLED 1
    #define NRF_CLOCK_ENABLED 1
    #define APP_TIMER_ENABLED 1
    #define BUTTON_ENABLED 1
    
    #endif // APP_CONFIG_H__

Children
Related