User Tools

Site Tools


Writing EEROS Applications for cb20 Board

Back to Use on a cb20 Board.

You will use C++ to develop your EEROS applications. For this you need at least some knowledge of the basic language features. A good starting point might be Minimal help can also be found under C++ for Beginners.

What do you want to do next?

Say Hello with EEROS

  1. Fetch the EEROS scripts on your host and checkout the branch for the cb20 board
    $ git clone eeros-project
    $ cd eeros-project
    $ git checkout sdk_cb20
  2. Edit the file as follows
  3. Create a project directory and change into it with
    $ mkdir hello
    $ cd hello 
  4. Create a text file “main.cpp” and copy the following code into it
    #include <iostream>
    #include <eeros/logger/Logger.hpp>
    #include <eeros/logger/StreamLogWriter.hpp>
    int main() {
      using namespace eeros::logger;
      Logger log = Logger::getLogger();
   << "Hello, EEROS";
      return 0;
  5. Create a text file “CMakeLists.txt” and copy the following text into it:
    cmake_minimum_required(VERSION 3.5.1)
    find_package(EEROS REQUIRED)
    add_executable(helloworld main.cpp)
    target_link_libraries(helloworld eeros ucl ${CMAKE_DL_LIBS})
  6. Change back into your parent directory and build the project with
    $ cd ..
    $ ./
  7. Make changes to “main.cpp”, save them and rebuild with
    $ ./

    In order to be able to write your own EEROS programs, you could use any text editor. However, we recommend to use an integrated development environment, see Use KDevelop with Existing Build Configuration.

Continue with Deploy to cb20 Board.

Use Existing Project

As an example we use the Control a Single Motor demo program.

  1. Edit the file as follows
  2. Fetch the code of the application with
    $ ./
  3. Build the project with
    $ ./

Continue with Deploy to cb20 Board.

Test Application

There is a test application for the cb20 board in under the directory /Software. If you wish to use this you can alter as follows


and further down



After this you continue as given above in Use Existing Project.

getting_started/write_app/use_on_cb20.txt · Last modified: 2021/03/31 10:21 by ursgraf