The eCos
Component Writer's Guide

Bart Veer

John Dallaway

Alex Schuilenburg

Open Publication License

6 July 2018


Table of Contents

1. Overview
1.1. Terminology
1.1.1. Component Framework
1.1.2. Configuration Option
1.1.3. Component
1.1.4. Package
1.1.5. Configuration
1.1.6. Target
1.1.7. Template
1.1.8. Properties
1.1.9. Consequences
1.1.10. Constraints
1.1.11. Conflicts
1.1.12. CDL
1.1.13. Component Repository
1.2. Why Configurability?
1.3. Approaches to Configurability
1.4. Degrees of Configurability
1.5. Warnings
2. Package Organization
2.1. Packages and the Component Repository
2.2. Package Versioning
2.3. Package Contents and Layout
2.3.1. Outline of the Build Process
2.3.2. Configurable Source Code
2.3.3. Exported Header Files
2.3.4. Package Documentation
2.3.5. Test Cases
2.3.6. Host-side Support
2.4. Making a Package Distribution
2.4.1. The eCos package distribution file format
2.4.2. Preparing eCos packages for distribution
3. The CDL Language
3.1. Language Overview
3.2. CDL Commands
3.3. CDL Properties
3.3.1. Information-providing Properties
3.3.2. The Configuration Hierarchy
3.3.3. Value-related Properties
3.3.4. Generating the Configuration Header Files
3.3.5. Controlling what gets Built
3.3.6. Miscellaneous Properties
3.4. Option Naming Convention
3.5. An Introduction to Tcl
3.6. Values and Expressions
3.6.1. Option Values
3.6.2. Ordinary Expressions
3.6.3. Functions
3.6.4. Goal Expressions
3.6.5. List Expressions
3.7. Interfaces
3.8. Updating the ecos.db database
4. The Build Process
4.1. Build Tree Generation
4.2. Configuration Header File Generation
4.2.1. The system.h Header
4.3. Building eCos
4.3.1. Updating the Build Tree
4.3.2. Exporting Public Header Files
4.3.3. Compiling
4.3.4. Generating the Libraries
4.3.5. The extras.o file
4.3.6. Compilers and Flags
4.3.7. Custom Build Steps
4.3.8. Startup Code
4.3.9. The Linker Script
4.4. 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.