C++
embedded developers, architects
5 days
lecture
workshop

Every month, more embedded C projects switch to the C++ programming language. This trend is caused by the fact that C++ tends to be faster and provide much better and safer abstractions without sacrificing either the performance or ability to control underlying hardware.

Embedded development is a specific subject. In most cases, due to underlying small-factor physical architectures, embedded projects often can't use C++ exceptions and have problems with dynamic memory usage. That makes most parts of the C++ Standard Library unusable in that domain. Also, most C developers have a good understanding of pointer types, which is why pointers are heavily overused by them in the C++ code, causing many stability and security issues. Embedded engineers need to understand the basics of so-called Modern C++, which makes the language much friendlier, easier, and safer to use.

C++ is a big and complicated programming language, so it is often not easy for embedded C developers to master it. That training was built from the ground up with such an audience in mind. It covers only a common subset of Modern C++ and the features that can be used in embedded programming. It also addresses significant differences between C and C++ programming languages. Upon completing that training, every embedded engineer knows how to use C++ templates to create powerful abstractions that are easy and safe to use but hard to abuse.

This training should be considered mandatory training for all bare-metal C++ engineers and code architects.

TRAINING HIGHLIGHTS

  • Emphasis on understanding the philosophy and mechanisms of C++ programming language and learning how to reuse this knowledge in own code
  • A detailed description of the differences between C and C++ programming languages with the focus on the embedded development
  • Particular focus on the usage of C++ templates in practical tasks
  • Development of error-proof code
  • Selection of useful patterns and techniques that prove in an embedded production code

TRAINING AGENDA

The following plan is an initial proposal for the training material. The final agenda is always created based on the individual pre-training analysis of the client's requirements and constraints.

  1. C++ Basics for Embedded Developers
    1. Identifiers and naming conventions
    2. Namespaces
    3. C++ types and their properties
    4. Value vs reference semantics
    5. Pointers vs references
    6. Unscoped vs scoped enumerations
    7. Classes and friends
    8. Special member functions
    9. Rule of Three, Five, and Zero
    10. Value categories
    11. Automatic type deduction
    12. Type conversions
    13. Objects
    14. Alignment
    15. Scope
    16. Lifetime
    17. ODR and inline
    18. Storage duration
    19. Stack vs Heap vs Free Store
    20. Customizing free store allocations
    21. Initialization
    22. Name lookup
    23. Overload resolution
    24. Customization points
    25. Range-based for loop
    26. Mixing C and C++
  2. Coding with performance in mind
    1. Things to avoid on a fast path
    2. Copy elision
    3. Move Semantics
    4. Ref-qualifiers
    5. noexcept
    6. constexpr
    7. Source code vs hardware - introduction
  3. Good practices and useful tools
    1. Lambda expression
    2. std::function
    3. Algorithms
    4. Pointless Pointers
    5. std::string_view
    6. std::span
    7. RAII
    8. Smart pointers
    9. std::optional
    10. std::variant
    11. std::expected
    12. std::tuple
  4. Introduction to C++ Templates
    1. Class, function, variable, and alias templates
    2. Implicit instantiation
    3. Template argument deduction
    4. Variadic templates
    5. Fold-expressions
    6. Dependent names
    7. Partial and Full specialization
    8. SFINAE overview
C++
embedded developers, architects
5 days
lecture
workshop

Trainer

Mateusz Pusz
FOUNDER / C++ TRAINER
Active Voting WG21 Member and Contributor to the C++ Standard