Configuring the command-line environment

Configure the environment

The tools use a set of environment variables when searching for header files, libraries and target devices (see Environment). To add the tools to the path and configure the default set of environment variables:

Open a Terminal window, change to the installation directory and enter the following command:

$ source SetEnv
  1. Choose Start‣XMOS‣Command Prompt(15.x.x). This will open a DOS command prompt with the environment variables already set.

  2. Recommendation: Start a bash environment.

    For the sake of brevity, all the command line examples in this documentation assume that the user is using a bash environment. At the DOS command prompt, type:

    > bash
    

    To install bash and the basic Unix tools, see Windows installation.

Open a Terminal window, change to the installation directory and enter the following command:

$ SetEnv.command

Quick check the environment

You may wish to check that your tools environment has been correctly configured using, say, xcc --help. To do this, type:

$ xcc --help

If your environment is working, then this will print some quick help text.

Query the toolkit version

To find the toolkit version:

$ cat "$XMOS_TOOL_PATH"/doc/version.txt

The reported version should be provided in any bug report.

The build version of individual tools within the toolkit can be found using their --version option. For example, xcc --version. At time of writing, most individual tools report the same as the toolkit version.