Profiles and the Component Repository

When you invoke the eCos Configuration Tool, it accesses the Component Repository, a read-only location of configuration information. For an explanation of “Component Repository” see Chapter 22.

Profiles

eCosPro 3.1 introduced support for repository profiles (profiles) which make it easier to have more than one component repository (i.e. eCos repository or eCosPro installation) present at the same time. Each eCosPro installation defines its own system profile which declares what it is, where its component repository is located, what toolchain it requires and its default hardware target and template. Version 4.0 of the eCosPro Configuration Tool introduced user profiles to allow users to define their own “Component Repository” and toolchain set.

Note: Editing of system profiles and the active profile is not permitted.

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

PlatformSystem-widePer-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, or a profile is specified on startup using the --profile=<profile> command line option, or an eCosPro configuration file is specified on startup which contains information regarding the profile against which that configuration was created, that profile is selected unconditionally. If none of the above conditions are satisfied, you will be prompted to select or create a profile to use.

To select a profile, highlight the descriptive name of the profile, the details of which will then appear in the Preview area, and then select OK.

Once selected, the descriptive name of the currently active profile is displayed in the status bar at the bottom right of the Configuration Tool window.

Figure 11-4. Profile selection dialog

Note: You cannot Edit the current active profile.

Compatibility with eCosPro v2.0.x and 3.0.x

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.

Migrating configurations to a new repository profile

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 (Alt+P) 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, the current hardware template, package deplate and any packages added or removed from your configuration by selecting Help->Repository Information (Ctrl+I). A summary will be displayed along with any licensing information (this feature was added in eCosPro 4.0).

Profile Dialog

The creation and editing of user profiles is done through the Profile Dialog selection window (see Figure 11-4). This dialog may be reached either on startup of the configuration tool when prompted to select a profile, or through the profile selection menu option Build->Profile (Alt+P).

Creating or editing user profiles

To create a new profile, within the profile selection dialog select the <NEW> profile from the list of profiles and press EDIT. Similarly, to edit or copy an existing profile, select the profile from the list and select either EDIT or COPY respectively.

  • Only user profiles that are not also the active profile (used by the current configuration) may be edited.

  • Invoking the configtool with the argument --edit-profiles will allow you to edit all user profiles and exit the eCos Configuration Tool immediately after editing.

Figure 11-5. Profile editing dialog

This will open the new dialog window illustrated above. The fields are as follows:

Name

The descriptive name that appears at the bottom right of the Configuration Tool and in the Profile selection dialog.

Description

A textual description of the profile to appear in the preview field of the Profile selection dialog.

Repositories

The list of directories containing eCos repositories, in the order in which they are to be used. For normal eCosPro installations this will contain a single directory. Multiple directories may be specified from which packages can be selected when creating an eCos configuration. If the same package, as determined by the macro name, appears in multiple directories, the package within the highest directory repository of the list will be used.

The order of the repositories may be altered by selecting a directory from the list and using the up/down arrows to the right of the list to move the directory up or down in the list order.

The order of the repositories may be altered by selecting a directory from the list and using the up/down arrows to the right of the list to move the directory up or down in the list order.

Adding a repository

A new repository may be added by entering the path to the packages directory containing the ecos.db file in the input field below the list of repositories, or by choosing the directory using the selector to the right of this input field.

The ADD button will become enabled once a valid directory has been entered and must be pressed to add the respository directory to the list.

Deleting a repository

To delete a directory from the list of repositories, select the directory in the list and press the DELETE button.

Changing a repository

To alter a directory in the list of repositories, select the directory in the list, alter the name of the directory in the field above or select the new packages directory and press the UPDATE button. This button will only become enabled when the direcory field contains a valid path to a directory containing an ecos.db file.

Toolchain

eCosPro profiles include the GNU toolchain to be used to build an eCos configuration. GNU toolchains (compiler, debugger and utilities) are provided with eCosPro Developers Kits which may be periodically updated. User profiles allow the developer to select a newer or different GNU toolchain, including a GNU toolchain from a different source, for use when building an eCos configuration.

The Toolchain drop-down list within the Tools section of the dialog allows the user to specify the descriptive name of the toolchain for the profile. The path to the executables (gcc, g++, and family) for this toolchain is added to the front of the user's search path to these executables are used when the eCos configuration (and optional tests) is built.

The %PATH% toolchain on Windows or ${PATH} on Linux allow the user to use the first GNU toolchain executables found in the user's search path.

A new toolchain may be specified by selecting the <NEW> followed by pressing the <EDIT> button which will cause a new dialog to be opened that allows the user to specify a new toolchain. Similarly, existing user-specified toolchains may be edited by selecting the toolchain from the drop-down list and pressing the <EDIT> button. See the Section called Creating or editing user-defined toolchains for more details.

Host Tools

Included in eCosPro profiles are the eCosCentric provided Host Tools and Eclipse are to be used within a Profile. The Host Tools drop-down list within the Tools section of the dialog allows the user to specify the descriptive name of the Host Tools installation for the profile. The path to the executables (openocd, ecosconfig, mk_romfs instdump etc. and, on Windows, additional tools such as bash, make, patch) is added to the front of the user's search path when the eCos configuration (and optional tests) is built, by Eclipse when building the eCos library or application, and when a new shell is opened by the configuration tool.

The %PATH% for Host Tools on Windows or ${PATH} on Linux will not assign any Host Tools to the Profile and will user's the seach path.

Note: There is no means within the eCos Configuration Tool to add a new Host Tool definition to the drop down.

Eclipse

Similar to Host Tools, the Eclipse drop-down list within the Tools section of the dialog allows the user to specify the descriptive name of Eclipse installation for the profile.

The %PATH% for Eclipse on Windows or ${PATH} on Linux will not assign any Eclipse installation to the Profile.

Note: This item is not currently used by anything but may be used in future by the eCos Configuration Tool.

Target and Template defaults

When creating a new eCos configuration from the menu using File->New (Ctrl+N) a default <target> and <template> are used. These defaults can be set through the corresponding drop-down selections within the Defaults section of the dialog.

Filters

eCosPro 4.0 introduced CDL attributes to eCos packages and targets as an aid for developers to search for or view packages and targets with specific attributes.

One use of this feature is to restrict the number of targets listed in the drop-down target selection list. This list contained the target names of all eCosPro and public eCos targets provided within eCosPro Developers Kit Releases and can be very long. To reduce this list a profile may restrict the targets displayed to only the targets with specific attributes. For example, for targets tested and supported within the 4.0.1 eCosPro Developers Kit Release, targets displayed may be restricted to those with the attribute release_v4.0.1. Similarly, the attribute target_ecospro may be used to limit targets displayed to those for which commercial support from eCosCentric is available.

Currently only one attribute may be selected for filtering. Filtering may also be disabled by unchecking “Filter targets according to attributes” within the Display Tab of the Settings dialog View->Settings (Ctrl+T).

Creating or editing user-defined toolchains

The Toolchain Edit Dialog illustrated in Figure 11-6 provides a means by which user-defined toolchains can be added, edited or deleted from within eCosPro Profiles.

Figure 11-6. Toolchain editing dialog

Descriptions of the individual fields:

Name

The descriptive name used in the drop-down list of toolchains within the edit profile dialog.

Description

A textual description of the toolchain.

Description

A textual description of the toolchain.

Prefix

The GNU Toolchain prefix associated with this toolchain. The editor will look for executables of the form <prefix>-gcc to validate the toolchain path, and in the event a toolchain is deleted or uninstalled will use this prefix to match prospective alternative toolchains against a target when setting up the paths for a profile.

Path

An input field containing the name of the directory containing the GNU Toolchain executables <prefix>-gcc, <prefix>-g++, <prefix>-ld, <prefix>-gdb and so on.

The button to the right of the input field will allow you to navigate to and select the directory through the host's native interface rather than typing the directory name in the input field.

The Delete button will delete an existing user-defined toolchain, Cancel will undo any changes made and OK will accept the changes.

2017-02-09
Documentation license for this page: Open Publication License