Configuration Items

Configuration items are the individual entities that form a configuration. Each item corresponds to the setting of a C pre-processor macro (for example, CYGHWR_HAL_ARM_PID_GDB_BAUD). The code of eCos itself is written to test such pre-processor macros so as to tailor the code. User code can do likewise.

Configuration items come in the following flavors:

  • None: such entities serve only as place holders in the hierarchy, allowing other entities to be grouped more easily.

  • Boolean entities are the most common flavor; they correspond to units of functionality that can be either enabled or disabled. If the entity is enabled then there will be a #define; code will check the setting using, for example, #ifdef

  • Data entities encapsulate some arbitrary data. Other properties such as a set or range of legal values can be used to constrain the actual values, for example to an integer or floating point value within a certain range.

  • Booldata entities combine the attributes of Boolean and Data: they can be enabled or disabled and, if enabled, will hold a data value.

Like packages, configuration items exist in a tree-based hierarchy: each configuration item has a parent which may be another configuration item or a package. Under some conditions (such as when packages are added or removed from a configuration), items may be “re-parented” such that their position in the tree changes.

Expressions

Expressions are relationships between CDL items. There are three types of expression in CDL:

Table 22-1. CDL Expressions

Expression Type Result Common Use (see Table 22-2)
Ordinary A single value legal_values property
List A range of values (for example “1 to 10”) legal_values property
Goal True or False requires and active_if properties

Properties

Each configuration item has a set of properties. The following table describes the most commonly used:

Table 22-2. Configuration properties

Property Use
Flavor The “type” of the item, as described above
Enabled Whether the item is enabled
Current_value The current value of the item
Default_value An ordinary expression defining the default value of the item
Legal_values A list expression defining the values the item may hold (for example, 1 to10)
Active_ifA goal expression denoting the requirement for this item to be active (see below: Inactive Items)
Requires A goal expression denoting requirements this item places on others (see below: Conflicts)
Calculated Whether the item as non-modifiable
Macro The corresponding C pre-processor macro
File The C header file in which the macro is defined
URL The URL of a documentation page describing the item
Hardware Indicates that a particular package is related to specific hardware

A complete description of properties is contained in the Component Writer’s Guide.

Inactive Items

Descendants of an item that is disabled are inactive: their values may not be changed. Items may also become inactive if an active_if expression is used to make the item dependent on an expression involving other items.

2017-02-09
Documentation license for this page: Open Publication License