Effective C++ in an Embedded Environment

C++’s flexibility, modelling power, support for object-oriented and generic programming, and extensive tool set, make it attractive for embedded projects, but some developers worry about code bloat and hidden performance penalties. In this seminar, you will learn how to confront those issues directly in this seminar. Additionally, you will learn how C++ can improve the correctness, readability, and efficiency of embedded software-in some cases accomplishing what is literally impossible in C.

Note: You are required to bring your own laptop.


Target Audience

  • Designers and developers who are using or considering using C++ in embedded systems


Expected Duration

2 day

Course Objectives

1. C++ Under the Hood

  • The Efficiency Philosophy Behind C++
  • Detailed Examination of Virtual Function Implementation under Single and Multiple Inheritance
  • Overview of How All Other Language Features Are Implemented
  • Causes of Code Bloat and How To Address Them
  • The Crucial Role of Inlining

2. Three Approaches to Interface-Based Programming

  • Virtual functions and Runtime Polymorphism
  • Separate Compilation and Link-Time Polymorphism
  • Templates and Compile-Time Polymorphism

3. Applying C++ in Embedded Systems

  • Rules for What Can and Cannot Be ROMed
  • Memory Management:
  • Modeling Memory-Mapped IO (MMIO):
  • Implementing Callbacks for C APIs (e.g., ISRs):
  • Overview of TR1 and Boost
  • Interesting Template Applications

4. Considerations for Safety-Critical and Real-Time Systems

5. Sources for Additional Information