Embedded Systems Programming in C++
Course Length: 4 Days
Lecture/Exercises: 60%/40%
Topics:
1. Class/Object design
◦ C++ object design in embedded systems
◦ Class definition rules of thumb for embedded systems
◦ Object lifetime
2. Type casting and promotion
◦ Casting and promotion traps
◦ Type inference
◦ auto
◦ Type deduction rules
3. Compile-time evaluation and execution
◦ Enum type in compile-time
◦ constexpr and constexpr if evaluation
4. Lambda expressions
◦ Lambda definitions in depth
◦ Type erasure
5. Templates
◦ Template arguments evaluation
◦ Specialization
◦ Variadic templates
6. Metaprogramming – introduction
◦ Template metaprogramming
◦ Fold expressions
◦ Type traits
7. Static and dynamic polymorphism
◦ CRTP
◦ C++ idioms
8. Smart pointers
◦ unique_ptr, shared_ptr, weak_ptr
◦ Typical and unusual use of smart pointers
9. C++ design patterns and anti-patterns
◦ Observer
◦ Singleton
◦ Visitor
◦ Anti-patterns
◦ Design patterns for embedded systems
10. C++ multithreading – introduction
◦ Thread creation
◦ Asynchronous execution
◦ Future objects
◦ Tasks
11. Concurrency patterns – introduction
◦ Active objects
◦ Thread pool
◦ Monitor object
◦ Reactor and Proactor pattern
12. C++ embedded systems design
◦ Sequential blocking and non-blocking
◦ Active Object Framework
◦ Inversion of control
13. Q&A
Course Code:
sec85