nRF5 SDK v14.0.0
SDK configuration header file

The SDK configuration header file (sdk_config.h) helps to manage the static configuration of an application that is built on top of nRF5 SDK. The configuration options included in this file can be quickly edited in a GUI wizard that is generated from the CMSIS Configuration Wizard Annotations. This annotations standard is supported natively by ARM Keil uVision (versions 4 and 5) or can be parsed using an open source Java tool - CMSIS Configuration Wizard.

Every module in SDK contains at least one configuration option that enables this module. If the module is disabled, then even if source code is added to the project, it is not compiled because the module implementation is conditionally included. With only a quick evaluation of the sdk_config.h file, you can check which modules are used in the application:

|#include "sdk_config.h"

An sdk_config.h file that contains all available configuration options for all modules in this SDK can be found in sdk/nrf5/config. This file is not actually used by any of the SDK projects, but it can serve as a template when developing a new application.

CMSIS Configuration Annotations Wizard

The configuration wizard is generated from the annotations inside the configuration file. For the set of rules for creating these annotations, refer to Configuration Wizard Annotations.

Template projects

This SDK contains a couple of template projects that have the SDK modules included (with sources) and enabled. These projects can serve as good starting points for developing an application based on nRF5 SDK.

Standard projects

All examples contain a full configuration header file in which only the used modules are enabled. The configuration file consists of the SDK modules configuration part, which is common for all projects, and an application-specific configuration section. All include paths are added, as well as the source files for modules that are actually used. If you want to start using one of the SDK modules, you must enable it in the configuration and add the sources (include paths are already present in the file). Keeping the full configuration file should be helpful when migrating to new SDK versions.

Overriding the sdk_config.h configuration

Each define in the sdk_config.h file is a conditional define that is added only if it has not been defined previously so it can be easily overriden.

Configuration in sdk_config.h can be overriden in two ways:

Documentation feedback | Developer Zone | Subscribe | Updated