Chapter 6. About configuration projects

6.1. eCos configuration projects

eCos configuration projects are used to hold and build eCos configurations. One configuration may be shared across multiple application projects.

  • These projects contain one or more .ecc files, build and install directories, as well as an Eclipse link to the source repository defined by the eCosPro profile.

    • If there are multiple .ecc files, only one may be selected as the active eCos configuration file name. This file name is set within the eCos Configuration property of the eCos Configuration Project. For details on how to change the active configuration file, refer to Section 6.2.2, “Using a different configuration file”.

    • Providing the default behaviour has not been changed, double-clicking on a .ecc file opens it in the eCos Configuration Tool; when this tool exits, the plug-in checks if the .ecc has been changed and triggers a rebuild if so and it is the active eCos configuration file name.

    • While it is also possible to build eCos from within in the eCos Configuration Tool, it is not required as Eclipse will rebuild eCos as necessary whenever the configuration changes.

    • Right-clicking on a .ecc file will bring up an “Open With” menu item under which you can also choose to edit the eCos configuration using the built-in Textual eCos Configuration Editor; when this tool exits, the plug-in will again check for changes which may trigger a rebuild if this is also the eCos configuration file name as above.

    • Should there be any compilation failures in your eCos configuration, they are automatically highlighted and turned into Eclipse problem markers which you can double-click on to go directly to the error.

  • eCos configuration projects are associated with an eCosPro profile which specifies the eCos source base for the project. For details on how to switch to a different eCosPro profile refer to Section 6.3, “Changing the configuration project's profile”.

  • Eclipse normally builds eCos configurations automatically in the background if the ProjectBuild Automatically option is selected. However, there is a per-project Inhibit building this project option which prevents a configuration from being built or rebuilt - if, for example, you create a new configuration but wish to customise it further before building.

    If set, any attempts to build the configuration project either manually or automatically will result in the error:

    Example 6.1. eCos Builds Inhibited Error

    Builds of project XXX are inhibited. To enable building, select the project
    and uncheck “Inhibit configuration build” in the eCos menu.

    The Inhibit building this project option may be changed through the project properties dialog when selecting the eCos Configuration item. See Figure 6.1, “eCos Configuration Properties” for an example of the “eCos Configuration” properties dialog.

  • A wizard may be used in order to create eCos configuration projects. This wizard allows you to either import an existing configuration (.ecc file), or create an entirely new eCos configuration project. If importing an existing configuration, the .ecc file is copied into your project, and the original will not be modified. Bear in mind this also means any changes you make to the .ecc file within your configuration project will similarly not be reflected in the original .ecc file.


    The wizard for importing an existing eCos configuration is listed as both a New wizard and as an Import. The functionality is the same in both cases: a new eCos configuration project is created and the .ecc file is copied into it.

    It is also possible to create a configuration project or import an existing configuration at the same time as creating an application project.

6.2. Changing the eCos configuration

This can be done in three ways.

6.2.1. Editing the eCos configuration project

The configuration project contains an eCos configuration file which is named ecos.ecc by default. Double- clicking on this opens it up, by default, with the graphical eCos Configuration Tool (externally to Eclipse/CDT). When you close the eCos Configuration Tool, the eCosPro CDT plug-in checks to see whether the configuration has changed and, if so, triggers a rebuild (unless the Inhibit building this project project property is set).


This per-project inhibit option is not set by default. If you set this option you must explicitly clear it before it is possible to (re)build eCos. It is set and cleared by first clicking on the project in the Project Explorer, and either selecting the Inhibit configuration build option from within the eCos drop-down menu; or by opening the project properties using FileProperties (Alt+Enter) or by right-clickProperties, then selecting Inhibit building this project in the eCos Configuration panel illustrated in Figure 6.1, “eCos Configuration Properties”.

Figure 6.1. eCos Configuration Properties

eCos Configuration Properties


Certain changes to an eCos configuration are more wide-ranging than others. Eclipse has no way of knowing of whether a configuration requires a clean build; this is due to inherent limitations in the eCos build system. We therefore recommend that, if you are unsure, you err on the side of caution and force a clean build (ProjectClean) of both your configuration and application projects whenever you change your eCos configuration.

6.2.2. Using a different configuration file

Occasionally you may have more than one eCos configuration file (files with .ecc extensions) within your eCos configuration project. For example, you may have the files release.ecc and debug.ecc which contain identical eCos configurations apart from settings which effect debugging. The CYGBLD_GLOBAL_CFLAGS setting may contain the -O2 flag in release.ecc and -O0 in debug.ecc, which may also have and the CYGPKG_INFRA_DEBUG package enabled.

For example, to create a copy of an existing eCos configuration file, make minor modifications to it, and switch the eCos Configuration Project to use this file, you can use the following process:

  1. Right-click on an existing eCos configuration file and select Copy.

  2. Right-click again on the eCos configuration file and select Paste. Within the Name Conflict popup box, enter the name of the new configuration file (e.g. debug.ecc).

  3. Right-click on eCos Configuration Project and select Properties followed by eCos Configuration in the resulting dialog box.

  4. Select the appropriate .ecc file from the drop- down field next to eCos configuration file name followed by Apply and OK as illustrated in Figure 6.1, “eCos Configuration Properties”.

  5. Clean the eCos application project ( ProjectClean) to be sure that it rebuilds correctly.

6.2.3. Using a different configuration project

Sometimes you may have a number of eCos configuration projects you may wish to choose between, perhaps with differing eCos packages, perhaps for different hardware, or perhaps even an alternative to Section 6.2.2, “Using a different configuration file” where you have one eCos Configuration Project for Release builds in Eclipse and a different one for Debug builds. In this case, you can use the following process to switch to an entirely different eCos configuration project:

  1. Create the new configuration project, if you have not already done so.

  2. Open up the project's properties dialog using FileProperties (Alt+Enter) or by right-clickProperties.

  3. Click on the Project References panel.

  4. Remove (uncheck) the link to the original configuration project and add a link to the new configuration project as illustrated illustrated in Figure 6.2, “Select eCos configuration file”.

    Figure 6.2. Select eCos configuration file

    Select eCos configuration file

  5. Clean your application, ProjectClean, to be sure that it rebuilds correctly.

6.3. Changing the configuration project's profile


While the eCosPro Eclipse plug-in allows you to change the profile of an eCos configuration project, for example to allow you to make use of a newer version of the GNU tools, you must carefully consider the consequences before switching to profiles which contain different eCosPro repositories. .ecc eCos configuration files do not migrate easily between different eCos releases.

The eCosPro profile is initially set when you create a new eCos configuration project as detailed in the Quick Start / Walkthrough chapter but may also be changed in the “Properties” dialog box for the configuration project as illustrated in Figure 6.3, “Select eCosPro profile”.

Figure 6.3. Select eCosPro profile

Select eCosPro profile

The above dialog window can be reached by FileProperties (Alt+Enter) or by right-clickProperties while the eCos Configuration project is selected within the Project Explorer window and selecting eCos Configuration.


A build error is normally expected when you switch to a different eCosPro profile that uses a different eCos repository. This is because eCos configurations contain version information and potentially also can include settings and packages that may not be known in another repository. For example, different eCosPro repositories may range from a simple update to an existing eCosPro release through to an eCosPro release for an entirely different architecture. Developers are therefore advised to follow the instructions in the Upgrading eCosPro Configurations to newer eCosPro releases section of the eCosPro Developer's Kit - Installation and Getting Started Guide to update .ecc files within an eCos configuration project.