Examples for distortos - object-oriented C++ RTOS for microcontrollers
Makefile C++ CMake
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
distortos @ 87362eb


distortosExamples Build Status

Examples for distortos - object-oriented C++ RTOS for microcontrollers

Configuration & building

  1. Download source package with examples and extract it;
  2. Download source package of distortos and extract it somewhere inside examples;
  3. Configure path to sources of distortos in DISTORTOS_PATH variable in top-level Makefile; You can skip this step if this path is distortos/, as this is the default value;
  4. Configure distortos - you can either create new configuration (with make menuconfig) or use an existing one;
  5. Execute make configure CONFIG_PATH=<path-to-distortosConfiguration.mk> to select the configuration you created/chose above;
  6. Execute make;

Alternatively you can replace steps 1 and 2 with just git clone --recursive https://github.com/DISTORTEC/distortosExamples. In such scenario you can also skip step 3. To update distortos submodule to latest version use git submodule update --remote command.

If you downloaded versioned source package from distortos.org, then you may skip first three steps - releases already contain sources of distortos in default path.

Quick example

Following commands may be executed in POSIX-compatible shell (e.g. Bash).

1. Download

Download and extract latest examples with latest distortos:

$ wget https://github.com/DISTORTEC/distortosExamples/archive/master.zip -O distortosExamples-master.zip
$ unzip -q distortosExamples-master.zip
$ wget https://github.com/DISTORTEC/distortos/archive/master.zip -O distortos-master.zip
$ unzip -q distortos-master.zip -d distortosExamples-master
$ cd distortosExamples-master
$ mv -T distortos-master/ distortos/

or clone the repository:

$ git clone --recursive https://github.com/DISTORTEC/distortosExamples
$ cd distortosExamples

or download and extract latest released project template:

$ wget http://distortos.org/files/distortosExamples-20180701.tar.xz
$ tar -xf distortosExamples-20180701.tar.xz
$ cd distortosExamples-20180701

2. Configure

Either use one of existing configurations:

$ make configure CONFIG_PATH=configurations/ST_STM32F4DISCOVERY

or create a new one from scratch:

$ make menuconfig
... edit some options, save the configuration as distortosConfiguration.mk ...
$ make configure

3. Build

Build the project with make:

$ make

4. Edit configuration & rebuild

To edit any option in the selected configuration just run kconfig tool again:

$ make menuconfig
... edit some options, overwrite configuration file ...

You can rebuild the project immediatelly by running make:

$ make