Package Structure

The files in an installed eCos source tree are organized in a natural tree structure, grouping together files which work together into Packages. For example, the kernel files are all together in:


and µITRON compatibility layer files are in:


The feature of these names which is of interest here is the <version> near the end. It may seem odd to place a version number deep in the path, rather than having something like BASE_DIR/<version>/...everything... or leaving it up to you to choose a different install-place when a new release of the system arrives.

There is a rationale for this organization: as indicated, the kernel and the µITRON compatibility subsystem are examples of software packages. For the first few releases of eCos, all the packages will move along in step, i.e. Release 1.3.x will feature Version 1.3.x of every package, and so forth. But in future, especially when third party packages become available, it is intended that the package be the unit of software distribution, so it will be possible to build a system from a selection of packages with different version numbers, and even differing versioning schemes. A Tcl script ecosadmin.tcl is provided in the eCos repository to manage the installation and removal of packages in this way.

Many users will have their own source code control system, version control system or equivalent, and will want to use it with eCos sources. In that case, since a new release of eCos comes with different pathnames for all the source files, a bit of work is necessary to import a new release into your source repository.

One way of handling the import is to rename all the version parts to some common name, for example “current”, and continue to work. “current” is suggested because ecosconfig recognizes it and places it first in any list of versions. In the future, we may provide a tool to help with this, or an option in the install wizard. Alternatively, in a POSIX shell environment (Linux or Cygwin on Windows) use the following command:

find . -name <version> -type d -printf 'mv %p %h/current\n' | sh

Having carried out such a renaming operation, your source tree will now look like this:


which is a suitable format for import into your own source code control system. When you get a subsequent release of eCos, do the same thing and use your own source code control system to manage the new source base, by importing the new version from


and so on.

The eCos build tool will now offer only the “current” version of each package; select this for the packages you wish to use.

Making such a change has implications for any build trees you already have in use. A configured build tree contains information about the selected packages and their selected versions. Changing the name of the “versioning” folder in the source tree invalidates this information, and in consequence it also invalidates any local configuration options you have set up in this build tree. So if you want to change the version information in the source tree, do it first, before investing any serious time in configuring and building your system. When you create a new build tree to deal with the new source layout, it will contain default settings for all the configuration options, just like the old build tree did before you configured it. You will need to redo that configuration work in the new tree.

Moving source code around also invalidates debugging information in any programs or libraries built from the old tree; these will need to be rebuilt.