C++ for Embedded Systems

Who should attend?

Software developers with C experience having to develop object oriented applications in C++ for embedded systems.


A good working knowledge of C.


5 days ( including practical exercises )

Course Description:

This course introduces the programming language C++ for use in embedded systems, as well as the fundamentals of the object oriented way of programming. It has been designed for experienced C programmers, who do not only want to learn the syntax of a new programming language, but also want to understand how object-oriented features work and what their advantages are over traditional C programming. Assessments of the language features with respect to memory consumption and execution time detail the benefits and the pitfalls of the object oriented approach, thus allowing the students to develop powerful solutions using the scarce resources of embedded systems efficiently. Additionally, this course illustrates how hardware devices can be mapped into objects for a seamless integration in embedded object oriented applications. The associated practical exercises are performed on an ARM-based target board.
The contents of this course are based on the C++98 standard which is currently the most widespread language standard in use. The language features marked with C++11 require the use of a compiler supporting this newer language standard. Therefore these elements of the course can be booked optionally.  The features of the newer language standards C++11, C++14, C++17 and C++20 are covered in the course "Modern C++"

 Course Outline:

Non-Object-Oriented Language Features and I/O

  • Data type bool
  • References
  • Function overloading
  • Default parameters
  • Namespaces
  • Dynamic memory management
  • Operator overloading
  • Input/output (cin/cout)
  • Range-base for-loop (C++11)
  • Scoped Enumerations (C++11)
  • nullptr (C++11)
  • Automatic type deduction with auto (C++11)
  • constexpr (C++11)
  • Alias type definition with using (C++11)

From Struct to Class

  • Data elements, attributes
  • Member functions, methods
  • Static / non-static elements
  • this-Pointer
  • Access rights public and private
  • Class

Constructors and Destructors

  • Default constructor and copy constructor
  • Global / static objects and arrays
  • Objects containing objects
  • Uniform initialisation (C++11)
  • Direct initialisation of data elements (C++11)
  • Constructor delegation (C++11)

Operators as Class Members

  • Assignment operator
  • Subscript operator
  • Type cast operator

Inheritance and Aggregation

  • Base class and derived class
  • Benefits of inheritance compared to aggregation
  • Modelling the base class functionality
  • Impact on construction and destruction
  • Access right protected
  • Protected and private inheritance
  • Constructor inheritance (C++11)

Virtual Functions and Polymorphism

  • Static and dynamic linking
  • Virtual functions
  • Abstract functions and abstract classes
  • Interfaces
  • override and final (C++11)

Assessment of the Language Features

  • Object model
  • Object creation and deletion
  • Temporary Objects
  • Inheritance
  • Virtual functions
  • Dynamic memory management

Mapping Hardware Devices into Objects

  • Traditional solutions
  • Struct-based solution
  • Hardware device as a C++ object
  • Interrupt handling

Practical Exercises

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.