Chapter 6. Environment Variables

When configuring and building eCos and eCos applications from a shell on Linux or a DOS command line on Windows without profile support, or from a shell or command line that was not invoked from the menu items created by an eCosPro installation, you must ensure that the following two environment variables are set:


The PATH environment variable must include the bin directory of the GNU Toolchain at its installed location (e.g. /opt/ecospro/gnutools-arm-eabi-4.4.5c/bin on Linux or C:\eCosPro\gnutools-arm-eabi-4.4.5c\bin on Windows) as well as the bin directory of the eCos host tools at their installed location (e.g. /opt/ecospro/ecoshosttools/bin on Linux or C:\eCosPro\ecoshosttools\bin on Windows).


The ECOS_REPOSITORY environment variable must point to the packages subdirectory of the eCosPro installation (e.g. /opt/ecospro/ecos-3.1.29/packages on Linux or C:\eCosPro\ecos-3.1.29\packages on Windows).

More advanced users will note that ECOS_REPOSITORY may in fact point to multiple eCos component repositories by adding each repository to the ECOS_REPOSITORY environment variable seperated by the PATH seperator of the host O/S. (i.e. a colon on Linux and a semi-colon on Windows).

For example, within a bash shell on Linux:

Figure 6-1. Linux Bash Environment variables

test@ubuntu:~$ export PATH=/opt/ecospro/gnutools-arm-eabi-4.4.5c/bin:/opt/ecospro/ecoshosttools/bin:${PATH}
test@ubuntu:~$ export ECOS_REPOSITORY=/opt/ecospro/ecos-3.1.29/packages

and within a Windows/DOS Command Line:

Figure 6-2. Windows Command Line Environment Variables

C:\> SET PATH=C:\eCosPro\gnutools-arm-eabi-4.4.5c\bin;C:\eCosPro\ecoshosttools\bin;%PATH%
C:\> SET ECOS_REPOSITORY=C:\eCosPro\ecos-3.1.29\packages

Note: These two environment variables are effectively set within Eclipse and the eCos Configuration Tool through the use of eCosPro Profiles. An eCosPro Profile is essentially an eCosPro Installation which matches a version of eCosPro to a version of the GNUTools, Host Tools and Eclipse. The environment variables are also explicitly set according to the corresponding eCosPro Profile/Installation when the Shell/Command Line menu items are invoked. For additional details please read the section Environment Variables in the eCos and eCosPro User Guide.

Documentation license for this page: eCosPro License