4.15. Zephyr

4.15.1. Setting up and running EcMasterDemo

  1. Prerequisites
    • Up Squared board

    • Docker

  2. Clone the Zephyr repository and checkout the sha: d489765be4e57ca0d836d391dbda23284ac09e7f
    git clone https://github.com/zephyrproject-rtos/zephyr
    cd zephyr
    git checkout d489765be4e57ca0d836d391dbda23284ac09e7f
  3. Download the latest Docker container of the build environment
    docker pull zephyrprojectrtos/zephyr-build:latest
  4. Start the Docker Container (On Windows make sure to use absolute paths with forward slashes)
    docker run -ti -v <ZEPHYR_REPO_PATH>:/workdir -v <EC_MASTER_BASE_PATH>:/Master zephyrprojectrtos/zephyr-build:latest
  5. Inside the Container change the directory
  6. Build the EcMasterDemo
    mkdir build && cd build
    cmake .. -DBOARD=up_squared -DRELEASE_MODE=Release
    make install
  7. The stripped project file can be found in
  8. To run the demo place the stripped project file on the Up Squared board and connect to the serial console on UART 1. After booting into the Application it will prompt for command line arguments on the serial console.

4.15.2. OS Compiler settings

Besides the general settings from Compiling the EcMasterDemo the following settings are necessary to build the example application for Zephyr.

Extra include paths
Extra source paths
Extra library paths to the main EtherCAT components