When you invoke the eCosConfiguration Tool, it accesses the Component
Repository, a read-only location of configuration
information. For an explanation of “Component
Repository” see Chapter 20.
eCosPro 3.1 introduced support for
profiles, which make it easier to have more than
one version of eCosPro present at the same time.
Each installation defines its own profile which declares
what it is, where its component repository is located,
what toolchain it requires and its default hardware target.
The Configuration Tool looks in two places for profile definitions, a
system-wide file and a
per-user file.
Any definitions present in the per-user file override those in the
system-wide file.
Table 11-1. Profile definition file locations
Platform
System-wide
Per-user
Windows
%ALLUSERSPROFILE%\ecospro.ini
%LOCALAPPDATA%\ecospro.ini or %APPDATA%\ecospro.ini
Linux
/etc/ecospro.conf
$HOME/.ecospro.conf
At startup, the Configuration Tool reads the profile definitions and checks
them for validity. If only one valid profile is found, that is selected
unconditionally; otherwise, you will be prompted to select the one to use.
The currently-selected profile is always indicated in the status bar at the
bottom of the Configuration Tool window.
Figure 11-2. Profile selection dialog
If you invoke the Configuration Tool from the command line,
you can specify the profile to use with the --profile option.
Older installations of eCosPro
created ecosenv.sh
and/or ecosenv-<version>.sh files which
set the ECOS_REPOSITORY
environment variable for you.
In order to co-exist with such installations, this version of the
Configuration Tool also examines the value of
ECOS_REPOSITORY when it starts up:
if it is set,
it is treated as defining
a further profile. In this case, an extra entry
env:ECOS_REPOSITORY
appears in the profile selection dialog.
Alternatively, if an eCos repository is passed on the command line
to the configuration tool, this will also result in the profile
entry env:ECOS_REPOSITORY appearing. In this case
the environment variable ECOS_REPOSITORY is
overwritten by the argument, allowing the argument to take precedence
over the environment variable.
Note: When using this backwards compatibility mode, you may need to set up
the path to the appropriate toolchain for your target hardware using the
Tools->Paths->Build tools
menu item. Alternatively, you can ensure the toolchain is on the PATH
before starting the Configuration Tool. Older releases will have used the files
ecosenv.sh and/or
ecosenv-<version>.sh
in order to configure appropriate settings.
It is possible to migrate a configuration from one profile to another
which provides the same set of packages (for example, when upgrading
to another release of eCosPro which targets the same hardware platform).
To do this, first open the configuration in its current profile, then
use the
Build->Profile
menu item to select a different profile.
You will be prompted to save the configuration, if necessary,
before selecting the new profile; the Configuration Tool then
attempts to migrate the configuration to the new profile.
The migration process will result in a number of warnings
from CDL, mostly to the effect that the
previously-selected versions of eCos packages were not found and that
the available versions were used instead. There may also be conflicts
arising, which you will be prompted to resolve in the usual way.
If the configuration could not be automatically migrated, the
action is aborted and you are warned that that save file was
"invalid" for that profile. This normally indicates that a package
loaded by the existing configuration was not present in the new
repository; details will appear in the error output.
You can check the location of the current repository, the current save file
path, and the current hardware template and default package,
by selecting Help->Repository Information.
A summary will be displayed.