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:

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 24-1. CDL Expressions

Expression TypeResultCommon Use (see Table 24-2)
OrdinaryA single valuelegal_values property
ListA range of values (for example “1 to 10”)legal_values property
GoalTrue or Falserequires and active_if properties

Properties

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

Table 24-2. Configuration properties

PropertyUse
FlavorThe “type” of the item, as described above
EnabledWhether the item is enabled
Current_valueThe current value of the item
Default_valueAn ordinary expression defining the default value of the item
Legal_valuesA 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)
RequiresA goal expression denoting requirements this item places on others (see below: Conflicts)
CalculatedWhether the item as non-modifiable
MacroThe corresponding C pre-processor macro
FileThe C header file in which the macro is defined
URLThe URL of a documentation page describing the item
HardwareIndicates 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.