Embedded C++ Advanced Training

Contents „Embedded C++ Advanced Programming Training“

This C++ training teaches advanced C++17 for programming embedded applications.

This embedded C++ training teaches the C++ 17 basics for programming embedded applications.

Embedded programs are often characterized by special requirements. They often have a special program structure (setup, loop), no heap may be used to avoid memory fragmentation, they must react to interrupts, comply with requirements such as the MISRA or AUTOSAR guidelines, etc.

Traditionally, embedded programs are often written in C. With the advancement of compilers, most language elements of C++ today no longer have any disadvantage over C in terms of code size and speed.

  • The new C++ standards (C++11, C++14, C++17, C++20 and C++23) have added new language elements to C++ that result in faster and smaller code than the C alternatives.
  • However, one of the most important arguments in favor of C++ is that embedded programs are becoming more complex and larger. This complexity is often difficult to handle with the C features. Here, C++ offers enormous advantages that save development costs and contribute to the reliability of applications.
  • Essentially all compilers for embedded programs (Espressif, STM32CubeIDE, Arduino usw.) support the new C++ standards..

Seminar Objectives: This advanced Embedded C++ course teaches advanced language elements and concepts of C++, such as templates, lambda expressions, the standard library, containers, pmr containers, and multithreading. The focus is on the new language features of C++11C++14 and C++17 and their possible applications for embedded systems. Numerous examples show their possible use for common microcontroller boards (STM32ESP32ArduinoRasperry Pi etc.). Together with the language elements, the AUTOSAR C++14 and  MISRA rules for safety-related systems are also presented.

The contents can be adapted to the wishes of the participants.

1. Namespaces

  • Defining and using namespaces

2. Exception handling

  • try, catch, throw
  • Exceptions in the Standard Library
  • Releasing Resources (RAII)
  • noexcept

3. Standard library containers

  • Sequential containers, iterators
  • Ordered and unordered associative containers
  • vector, list and deque

4. Functors and lambda expressions

  • The call operator
  • Predicates and comparison functions
  • Lambda expressions

5. Templates

  • Function templates and specializations
  • Non-Type Parameters
  • Recursive Function Templates and Variadic Templates
  • Class templates
  • Type traits
  • Type inference

6. STL algorithms and lambda expressions

  • Iterators: reverse generators, insert functions and insert generators, stream iterators
  • Linear search and counting
  • Searching for subsequences
  • Minimum and maximum
  • Swapping elements
  • Copying ranges
  • Transform, replace and remove elements
  • Partitioning and Sorting
  • Binary search in sorted areas
  • Mixing of sorted areas
  • Set operations on sorted areas

7. Times and calendars with chrono

  • Time and duration
  • clocks

8. Multithreading

  • Starting Functions with async and thread
  • Multithreading with Lambda expressions
  • Exceptions in Threads
  • future and promise
  • Lock critical sections with lock_guard etc.
  • condition variables

9. smart pointer

  • unique_ptr, shared_ptr, weak_ptr

About „Embedded C++ Advanced Programming Training“

Target audience for this C++ training

Software developers who want to write professional programs using C++. In particular, experienced C programmers that want to move to C++.

Requirements: C++ knowledge at the extent of the Embedded C++ basic course.

Teaching style of the C++ course

Lecture with many examples. A balanced combination of theory and practice.

  • At the beginning of a new topic, an overview of applications, basic ideas and syntax is given.
  • The concepts and the syntax are illustrated by using carefully selected and proven examples. Often, best practices“ are presented.
  • The manuscript contains numerous practical exercises.
  • If desired, tasks from the work of the students can also be dealt with. This should be arranged before the start of the training.

Training Materials

Extensive and detailed training materials (approx. 200 pages) – Full text, no PowerPoint slides containing only keywords. Therefore, the course materials can also be used as a reference at work.

Place and time of this C++ training

This seminar is offered as an inhouse seminar (at your site). The implementation as a face-to-face seminar is preferred, but is also possible as an online seminar. Dates by arrangement.

Duration: 5 days

Lecturer

Prof. Richard Kaiser has been conducting seminars for companies for many years, mainly on software development and the programming languages C#, C++ and C. He knows the requirements of practice and addresses them in detail, both in the basic concepts and in the details. His clients include renowned global corporations and small and medium-sized enterprises. He is the author of several books on C++, most recently „C++ mit Visual Studio 2019“. He was a member of the DIN standardization committee Information Technology NI-22 for many years.

Contact Prof. Richard Kaiser