Table of Contents
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
.eccfiles, build and install directories, as well as an Eclipse link to the source repository.
If there are multiple
.eccfiles, 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.
Providing the default behaviour has not been changed, double-clicking on a
.eccfile opens it in the eCos Configuration Tool; when this tool exits, the plug-in checks if the
.ecchas 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
.eccfile 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.
Eclipse normally builds eCos configurations automatically in the background if the Project -> Build Automatically option is selected. However, there is a per-project inhibit 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:
Builds of project XXX are inhibited. To enable building, select the project and uncheck “Inhibit configuration build” in the eCos menu.
A wizard is used in order to create eCos configuration projects. This wizard allows you to either import an existing configuration (
.eccfile), or create an entirely new eCos configuration project. If importing an existing configuration, the
.eccfile is copied into your project, and the original will not be modified. Bear in mind this also means any changes you make to the
.eccfile within your configuration project will similarly not be reflected in the original
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
.eccfile 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.
This can be done in three ways.
Your 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
When you close the eCos Configuration Tool,
the 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 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 File->Properties or by right-clicking) then selecting Inhibit building this project in the eCos Configuration panel.
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 (Project->Clean) of both your configuration and application projects whenever you change your eCos configuration.
Sometimes you may have more than one eCos configuration file
.ecc extensions) within your eCos
configuration project. For example, you may have the files
which contain identical eCos configurations apart from settings
which effect debugging. The
setting may contain the
-O2 flag 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:
Right-click on an existing eCos configuration file and select Copy.
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.
Right-click on eCos Configuration Project and select Properties followed by eCos Configuration in the resulting dialogue box.
Select the appropriate
.eccfile from the drop-down field next to eCos configuration file name followed by Apply and OK as illustrated in Figure 5.1, “Select eCos configuration file”.
Clean the eCos application project (Project -> Clean) to be sure that it rebuilds correctly.
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 (ii) above 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:
Create the new configuration project, if you have not already done so.
Open up the project's properties dialog (right-click, Properties).
Click on the Project References panel.
Remove (uncheck) the link to the original configuration project and add a link to the new configuration project as illustrated illustrated in Figure 5.2, “Select eCos configuration file”.
Clean your application (Project -> Clean) to be sure that it rebuilds correctly.
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.
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 dialogue box for the configuration project as illustrated in Figure 5.3, “Select eCos configuration file”.
The above dialogue window can be reached by right-clicking on the eCos configuration project and selecting Properties or by selecting Properties from the Project menu while the eCos Configuration project is selected within the Project Explorer window.
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 are not 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
Copyright © 2010, 2011, 2012, 2013 eCosCentric Limited
Copyright © 2010, 2011, 2012, 2013 eCosCentric Limited