Project Setup

Software Requirements

The following software is required to build the project:

Windows

  • Arduino installation with Teensyduino add-on

  • Git for Windows (Bash)

  • MinGW (make)

  • Visual Studio 2017 (for Management UI builds)

  • Qt 5 (for Management UI builds)

This project uses Makefile, however build tools and board files are copied from an Arduino/Teensyduino installation.

If needed, copy MinGW/bin/mingw32-make.exe to MinGW/bin/make.exe, as this documentation refers to the command as make.

Requirements to regenerate protobuf (nanopb) sources:

  1. Extract zip, fe. c:\share\protoc-3.11.4

  2. Add protoc (fe., c:\share\protoc-3.11.4\bin) to PATH

Ubuntu 18.04

  • Arduino installation with Teensyduino add-on

  • apt install build-essential

  • Qt 5 (for Management UI builds)

This project uses Makefile, however build tools and board files are copied from an Arduino/Teensyduino installation.

Requirements to regenerate protobuf (nanopb) sources:

  • apt install protobuf libprotobuf-dev python-protobuf

To communicate with the Teensy hardware as a non-root user, install the Teensy udev rule:

sudo cp teensy_fan_controller/tools/49-teensy.rules /etc/udev/rules.d/

Fetching sources

Use git to clone the root project (TeensyFanController).

You must initialize and pull the git sub-modules/sub-repositories:

git clone https://github.com/mstrthealias/TeensyFanController.git
git submodule init
git submodule update

Use the ui_qt5 sub-directory underneath the root project directory for Management UI builds.

Setup project build environment

Change directory to the project root, and use Makefile:

cd TeensyFanController
ARDUINO_DIR=/opt/Arduino make

Root Make targets:

  • make alias for make setup

  • make setup alias for make clean setup-toolchain setup-libs setup-nanopb protos

  • make setup-toolchain copy toolchain and Teensy3 cores from Teensyduino into project

  • make setup-libs copy Teensyduino libraries into project

  • make setup-nanopb copy nanopb into project libraries

  • make protos alias for make runtime_config_v1.pb.c

  • make runtime_config_v1.pb.c generate RuntimeConfigV1 protobuf sources

  • make clean alias for make clean-build clean-setup

  • make clean-build delete builds produced by teensy_fan_controller/Makefile

  • make clean-setup delete files produced by this Makefile

Last updated