Chapter 23. The Component Repository and Working Directories
Table of Contents
- 23.1. Component Repository
- 23.2. Build Tree
- 23.3. Install Tree
- 23.4. Application Build Tree
Each of the file trees involved in eCos development has a different role.
23.1. Component Repository
The eCos component repository contains directories for all the packages that are shipped with eCos or provided by third parties.
The component repository should not be modified as part of application development.
Figure 23.1. Component repository
The component repository is the master copy of source code for all system and third party components. It also contains some files needed to administer and build the system, such as ecosadmin.tcl.
23.1.2. How is it modified?
You modify it by importing new versions of packages from a distribution or removing existing packages. These activities are undertaken using the eCos Package Administration Tool.
23.1.3. When is it edited manually?
Files in the component repository should only be edited manually as determined by the component maintainer.
23.1.4. User Applications
User application source code should not go into the component repository.
23.1.5. Examples of files in this hierarchy:
The top level HTML file for the eCos Reference Manual.
Pre-built tests for the supported platforms, and the synthetic Linux target.
One of the example programs.
The Tcl program which is used to import new versions of packages from a distribution or remove existing packages.
Implementation of the hyperbolic tangent function in the standard math library.
A file with make rules, used by the
23.2. Build Tree
The build tree is the directory
hierarchy in which all generated files
are placed. Generated files consist of the
makefile, the compiled object files,
and a dependency file (with a
extension) for each source file.
The build tree is where all intermediate object files are placed.
23.2.2. How is it modified?
Recompiling can modify the object files.
23.2.3. User applications
User application source or binary code should not go in the build tree.
23.2.4. Examples of files in this hierarchy
The directory in which object files for the C library are built.
23.3. Install Tree
The install tree is the location
for all files needed for application development. The
libtarget.a library, which contains the
custom-built eCos kernel and other components, is placed
in the install tree, along with all packages’ public
header files. If you build the tests, the test executable
programs will also be placed in the install
By default, the install tree is created by
ecosconfig in a subdirectory of the build
install. This can be
modified with the
--prefix option (see
Chapter 26, Manual Configuration).
The install tree is where the custom-built
libtarget.a library, which contains
the eCos kernel and other components, is located. The
install tree is also the location for all the header files
that are part of a published interface for their
23.3.2. How is it modified?
Recompiling can replace
libtarget.a and the test
23.3.3. When is it edited manually?
Where a memory layout requires modification without
use of the eCos
Configuration Tool, the memory layout
files must be edited directly in the install tree. These
files are located at
Note that subsequent modification of the install tree
using the Configuration Tool will result in such manual
edits being lost.
23.3.4. User applications
User application source or binary code should not go in the install tree.
23.3.5. Examples of files in this hierarchy
The library containing the kernel and other components.
The header file for the kernel C language API.
The linker script fragment describing the memory layout for linking applications intended for execution on an ARM PID development board using RAM startup.
The C library header file for standard I/O.
23.4. Application Build Tree
This tree is not part of eCos itself: it is the directory in which eCos end users write their own applications.
Example applications and their
Makefile are located in the component
repository, in the directory
There is no imposed format on this directory, but there
are certain compiler and linker flags that must be used to
compile an eCos application. The basic set of flags is shown
in the example
Makefile, and additional
details can be found in Chapter 24, Compiler and Linker Options.
|2020-11-04||Open Publication License|