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:

PATH
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.7.3j/bin on Linux or C:\eCosPro\gnutools-arm-eabi-4.7.3j\bin on Windows) as well as the bin directory of the eCos host tools at their installed location (e.g. /opt/ecospro/ecoshosttools-4.0.2/bin on Linux or C:\eCosPro\ecoshosttools\bin on Windows).
ECOS_REPOSITORY

The ECOS_REPOSITORY environment variable must point to the packages subdirectory of the eCosPro installation (e.g. /opt/ecospro/ecos-4.1.3/packages on Linux or C:\eCosPro\ecos-4.1.3\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.7.3j/bin:/opt/ecospro/ecoshosttools-4.0.2/bin:${PATH}
test@ubuntu:~$ export ECOS_REPOSITORY=/opt/ecospro/ecos-4.1.3/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.7.3j\bin;C:\eCosPro\ecoshosttools-4.0.2\bin;%PATH%
C:\> SET ECOS_REPOSITORY=C:\eCosPro\ecos-4.1.3\packages
    

[Note]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 eCosPro User Guide.