The Component Repository and Working Directories
To Contents | To previous page | To next page

## The Component Repository and Working Directories

Each of the file trees involved in eCos development has a different role.

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

Component repository

##### Purpose

The component respository 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` .

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

##### When is it edited manually?

Files in the component repository should only be edited manually as determined by the component maintainer.

##### User applications

User application source code should not go into the component repository.

##### Examples of files in this hierarchy:

`BASE_DIR` /doc/ref/ecos-ref.html

The top level HTML file for the eCos Reference Manual.

`BASE_DIR` /prebuilt/pid/tests/kernel/v1_3_x/tests/thread_gdb.exe

`BASE_DIR` /prebuilt/linux/tests/kernel/v1_3_x/tests/thread_gdb.exe

Prebuilt tests for the supported platforms, and the synthetic Linux target.

`BASE_DIR` /examples/twothreads.c

One of the example programs.

`BASE_DIR` /ecosadmin.tcl

The Tcl program which is used to import new versions of packages from a distribution or remove existing packages.

`BASE_DIR` /packages/language/c/libm/ v1_3_x /src/double/portable-api/s_tanh.c

Implementation of the hyperbolic tangent function in the standard math library.

`BASE_DIR` /pkgconf/rules.mak

A file with `make` rules, used by the `makefile` .

### 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 `.d` extension) for each source file.

##### Purpose

The build tree is where all intermediate object files are placed.

##### How is it modified?

Recompiling can modify the object files.

##### User applications

User application source or binary code should not go in the build tree.

##### Examples of files in this hierarchy

ecos-work/language/c/libc/ v1_3_x/src

The directory in which object files for the C library are built.

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

By default, the install tree is created by `ecosconfig` in a subdirectory of the build tree called `install` . This can be modified with the `--prefix` option (see Manual Configuration ).

##### Purpose

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

##### How is it modified?

Recompiling can replace `libtarget.a` and the test executables.

##### 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 `install/include/pkgconf/mlt_*.*` . Note that subsequent modification of the install tree using the Configuration Tool will result in such manual edits being lost.

##### User applications

User application source or binary code should not go in the install tree.

##### Examples of files in this hierarchy

install/lib/libtarget.a

The library containing the kernel and other components.

install/include/cyg/kernel/kapi.h

The header file for the kernel C language API.

install/include/pkgconf/mlt_arm_pid_ram.ldi

The linker script fragment describing the memory layout for linking applications intended for execution on an ARM PID development board using RAM startup.

install/include/stdio.h

The C library header file for standard I/O.

### 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 `BASE_DIR` `/examples` .

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 Compiler and Linker Options .

The Component Repository and Working Directories
To Contents | To previous page | To next page