Skip to content

config_file

Required: No
Type: List of configuration files
Condition: Yes

List of configuration files to be included in the project. Configuration files may reside anywhere in the SDK, and are copied to the config/ directory in the project upon project generation. The config/ directory is automatically added as an include path in exported IDE projects if not empty.

If multiple components contribute configuration files with the same name to the same project, it is implementation-defined how this is handled.

See the description of configuration files for more details.

A configuration file entry may have the following keys:

Key Required Type Description
path Yes String Path to configuration file
directory No String Copy the file to the given subdirectory of the config directory.
file_id No String ID of this configuration file. If multiple configuration files have the same ID, they are assumed to have mutually exclusive conditions.
override No Override map Map containing information about another configuration file to override
condition No List of features The configuration file is added if all the given features are present
unless No List of features The configuration file is added unless any of the given features are present
1
2
3
4
id: driver
config_file:
  - path: path/to/driver_config.h
    file_id: driver_config

Configuration Override

The override entry may have the following keys:

Key Required Type Description
file_id Yes String ID of the configuration file to override
component Yes String ID of the component containing the original configuration file
instance No String Instance name of the instance whose configuration file shall be overridden

When the override property is set, the configuration file is considered an overriding configuration file. Such a configuration file is only added to the project if the file referenced by the override property (combination of file_id, component and instance) is due to be added to the project. In this case, the overriding configuration file replaces the original.

Overriding a configuration file that doesn't have a file_id in the original component is not supported.

1
2
3
4
5
config_file:
  - path: other_path/to/driver_config.h
    override:
      component: driver
      file_id: driver_config
Back to top