Search
   

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 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.

   
         
 
  Copyright © 2003-2008 eCosCentric Limited Privacy & Legal Statements