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 project, and are copied to the config/ directory upon project generation. The config/ directory is automatically added as an include path in exported IDE projects if not empty.

The project may register a file that already exists in the output config directory as a configuration file. In this case, the path property starts with config/, and the tool implementation may choose to elide copying the file, since it is already in the right place.

If a configuration file with the same name as one provided by the project is provided by a component, 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
config_file:
  - path: path/to/app_config.h
    file_id: app_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 generated 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 does not have a file_id 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