# The eCos Component Writer's Guide

### Bart Veer

### John Dallaway

Copyright © 2000, 2001 Free Software Foundation, Inc.

Table of Contents
1. Overview
  Terminology
    Component Framework
    Configuration Option
    Component
    Package
    Configuration
    Target
    Template
    Properties
    Consequences
    Constraints
    Conflicts
    CDL
    Component Repository
  Why Configurability?
  Approaches to Configurability
  Degrees of Configurability
  Warnings
2. Package Organization
  Packages and the Component Repository
  Package Versioning
  Package Contents and Layout
    Outline of the Build Process
    Configurable Source Code
    Exported Header Files
    Package Documentation
    Test Cases
    Host-side Support
  Making a Package Distribution
    The eCos package distribution file format
    Preparing eCos packages for distribution
3. The CDL Language
  Language Overview
  CDL Commands
  CDL Properties
    Information-providing Properties
    The Configuration Hierarchy
    Value-related Properties
    Generating the Configuration Header Files
    Controlling what gets Built
    Miscellaneous Properties
  Option Naming Convention
  An Introduction to Tcl
  Values and Expressions
    Option Values
    Ordinary Expressions
    Functions
    Goal Expressions
    List Expressions
  Interfaces
  Updating the ecos.db database
4. The Build Process
  Build Tree Generation
  Configuration Header File Generation
    The `system.h` Header
  Building eCos
    Updating the Build Tree
    Exporting Public Header Files
    Compiling
    Generating the Libraries
    The `extras.o` file
    Compilers and Flags
    Custom Build Steps
    Startup Code
    The Linker Script
  Building Test Cases
5. CDL Language Specification
  `cdl_option` -- Define a single configuration option
  `cdl_component` -- Define a component, a collection of configuration options
  `cdl_package` -- Define a package, a component that can be distributed
  `cdl_interface` -- Define an interface, functionality that can be provided by a number of different implementations.
  active_if -- Allow additional control over the active state of an option or other CDL entity.
  calculated -- Used if the current option's value is not user-modifiable, but is calculated using a suitable CDL expression.
  compile -- List the source files that should be built if this option is active and enabled.
  default_value -- Provide a default value for this option using a CDL expression.
  define -- Specify additional `#define` symbols that should go into the owning package's configuration header file.
  define_format -- Control how an option's value will appear in the configuration header file.
  define_header -- Specify the configuration header file that will be generated for a given package.
  define_proc -- Use a fragment of Tcl code to output additional data to configuration header files.
  description -- Provide a textual description for an option.
  display -- Provide a short string describing this option.
  doc -- The location of online-documentation for a configuration option.
  flavor -- Specify the nature of a configuration option.
  hardware -- Specify that a package is tied to specific hardware.
  if_define -- Output a common preprocessor construct to a configuration header file.
  implements -- Enabling this option provides one instance of a more general interface.
  include_dir -- Specify the desired location of a package's exported header files in the install tree.
  include_files -- List the header files that are exported by a package.
  legal_values -- Impose constraints on the possible values for an option.
  library -- Specify which library should contain the object files generated by building this package.
  make -- Define an additional custom build step associated with an option, resulting in a target that should not go directly into a library.
  make_object -- Define a custom build step, resulting in an object file that should go into a library.
  no_define -- Suppress the normal generation of a preprocessor `#define` symbol in a configuration header file.
  parent -- Control the location of an option in the configuration hierarchy.
  requires -- List constraints that the configuration should satisfy if a given option is active and enabled..
  script -- Include additional configuration information from another CDL script.
6. Templates, Targets and Other Topics
  Templates
  Targets

|  | Next
|  | Overview