Compile Manually

Back to Getting the Sources Manually.

Compile and install EEROS for the host as follows:

$ mkdir build-x86
$ cd build-x86
$ mkdir eeros
$ cd eeros
$ cmake -DCMAKE_INSTALL_PREFIX=../../install-x86 ..
$ make
$ make install

If your target architecture is different from the host platform we suggest to use a SDK. If you don't use a SDK, you have to specify a toolchain file with as given in Cross Compilation. An example of such a toolchain file can be found in https://github.com/eeros-project/eeros-build-scripts.git.

Per default, debug information will be included in the code. For maximum efficiency make sure to change the cmake command to:

$ cmake -DCMAKE_INSTALL_PREFIX=../../install-x86 -DCMAKE_BUILD_TYPE=Release ..

Compile Hardware Wrapper Libraries

As soon as you access dedicated hardware on your system you have to install one of the Hardware Libraries. You do this in a similar fashion as you did with the EEROS library itself, e.g. fetch the code of the simulator

$ git clone https://github.com/eeros-project/sim-eeros.git sim-eeros

Build and install it

$ cd build-x86
$ mkdir sim-eeros
$ cd sim-eeros
$ cmake -DCMAKE_INSTALL_PREFIX=../../install-x86 ..
$ make
$ make install

Continue with Deploy Manually.

Compile Additional Libraries

Some blocks of the control system use further libraries such as CANOpen, LibUSB, MODBUS and so on. You have to fetch, make and install these libraries first. Then you must build EEROS with some additional switches so that when building EEROS these libraries will be found and linked. Change the cmake command as follows

$ cmake -DCMAKE_INSTALL_PREFIX=../../install-x86 -DUSE_CAN=TRUE ..

when using the CANOpen library. These will also compile the EEROS examples which demonstrate the use of CAN.