Chapter 6. Hints, Tips and Tricks

Keyboard shortcuts

Pressing Ctrl+Shift+L within Eclipse will display a popup window with all the current keyboard bindings. If you press Ctrl+Shift+L again, you will be taken to the Keys preferences page from which you can change or set keyboard bindings for various Commands within Eclipse and its installed plug-ins.

Build Automatically

If this option is set and you change, add or delete a file within a project, the builder will automatically attempt to build that project in the background. This option is set by default and can be found in the C/C++ perspective within the Project sub-menu.

Build Order

The order in which projects are built is important. For example, eCos configuration projects must be built before the eCos application projects or static libraries which refer to them are built. Normally the Eclipse Workbench will build all pre-requisites first but occassionally it may be desirable to build projects in a specific order. The Workbench allows users to explicitly define the order in which projects are built through the Build Order Window which can be reached through Window->Preferences and selecting General->WorkSpace->Build Order. The build order is applied for both building the entire workspace or for a group of projects.

Clean Project

The Clean... option within the Project sub-menu will remove all artifacts created by Eclipse for all or just selected projects. If you have the Build Automatically option set, the artifacts of the chosen projects will be rebuilt automatically following a clean. If the option is off, clean will remove the artifacts and stop, allowing you invoke Build manually later.

The Clean option within a project context (i.e. right-click a project) will automatically clean the selected project and all the projects referenced. For example, if this option is selected in an eCos application project that also refers to a static library, all of the application project, eCos configuration project and static library project will be cleaned. If you also have the Project -> Build Automatically option set, all those projects will be rebuilt after they have been cleaned.

Eclipse discovery - “Program gcc not found in path

This issue arises typically when an eCos application project has been moved from the Helios Eclipse release to Juno and also may appear as “Program g++ not found in path”. Discovery Options settings from the Helios release of Eclipse have been deprecated and are no longer supported by the Juno release of Eclipse. To resolve this problem, please follow the steps in the “Migrating existing projects” section further on in this document.

Eclipse and the eCos Configuration Tool

As described in the “eCos configuration projects” section, the eCos Configuration Tool is used by Eclipse as a standalone tool to create and edit eCos configurations. However, when editing an eCos configuration with the eCos Configuration Tool in this manner, certain features of the eCos Configuration Tool are disabled which will tie the tool to the specific eCos configuration file that is being edited. This is known as the Eclipse Lockdown Mode of the eCos Configuration Tool. For example, you cannot Save As or Open other configuration projects, nor can you change Profiles, alter the eCos Repository or modify the Path to the host or GNU tools. This ensures that the Eclipse workspace as well as the eCos configuration and its elements remain consistent with the state Eclipse believes the eCos configuration project to be in.

When the eCos Configuration Tool is started normally from the command line, the Desktop or a Desktop menu, it is run in its normal Default mode with all its normal functionality available to you. However, you should not use the eCos Configuration Tool in this mode to edit or create eCos configurations, or build eCos configurations within an Eclipse Workspace as this may result in unexpected consequences and inconsistent behaviour. Always use Eclipse to start the eCos Configuration Tool when you wish to modify an eCos configuration file that is part of an Eclipse eCos Configuration Project.