Installation#

Prerequisites#

XTC Tools 15.2.1 or newer and CMake 3.21 or newer are required for building the example applications. If necessary, download and follow the installation instructions for those components.

Windows#

A standard C/C++ compiler is required to build applications for the host PC. Windows users may use Build Tools for Visual Studio command-line interface.

Host build should also work using other Windows GNU development environments like GNU Make, MinGW or Cygwin.

libusb#

The DFU example requires dfu-util which requires libusb v1.0. libusb requires the installation of a driver for use on a Windows host. Driver installation should be done using a third-party installation tool like Zadig.

macOS#

A standard C/C++ compiler is required to build applications for the host PC. Mac users may use the Xcode command-line tools.

Install Steps#

Follow the following steps to install and setup XCORE-IOT:

Step 1. Cloning the repository#

Clone the XCORE-IOT repository with the following command:

git clone --recurse-submodules git@github.com:xmos/xcore_iot.git

Step 2. Install Host Applications#

XCORE-IOT includes utilities that run on the PC host. Run the following command to build and install these utilities:

Linux and MacOS#

cmake -B build_host
cd build_host
sudo make install

This command installs the applications at /opt/xmos/bin/ directory. You may wish to append this directory to your PATH variable.

export PATH=$PATH:/opt/xmos/bin/

Some host applications require that the location of xscope_endpoint.so be added to your LD_LIBRARY_PATH environment variable. This environment variable will be set if you run the host application in the XTC Tools command-line environment. For more information see Configuring the command-line environment.

Or, you may prefer to set this environment variable manually.

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<path-to-XTC-Tools>/lib

Windows#

Windows users must run the x86 native tools command prompt from Visual Studio

cmake  -G "NMake Makefiles" -B build_host
cd build_host
nmake install

This command installs the applications at <USERPROFILE>\.xmos\bin\ directory. You may wish to add this directory to your PATH variable.

Some host applications require that the location of xscope_endpoint.dll be added to your PATH. This environment variable will be set if you run the host application in the XTC Tools command-line environment. For more information see Configuring the command-line environment.

Optional Step 3. Install Python and Python Requirements#

XCORE-IOT does not require installing Python, however, several example applications do utilize Python scripts. To run these scripts, Python 3 is needed, we recommend and test with Python 3.8. Install Python and install the dependencies using the following commands:

Note

You can also setup a Python virtual environment using Conda or other virtual environment tool.

Install pip if needed:

python -m pip install --upgrade pip

Then use pip to install the required modules.

pip install -r tools/install/requirements.txt

Build & Run Your First Application#

Once your have installed XCORE-IOT, the next step is to build and run your first xcore application.