US / UK-EMEA / Contact Ask DevelopMentor a Question800.699.1932

Effective C++ in an Embedded Environment Training

(FW293) 2 Day Course, $1595
 
Upcoming Classes:

What You Will Learn

Course Highlights

Course Details

Dates & Locations

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. This seminar begins by confronting those issues directly, then moves on to demonstrate how C++ can improve the correctness, readability, and efficiency of embedded software, in some cases accomplishing what is literally impossible in C.

What You Will Learn

Course Highlights

Course Details

Dates & Locations

Participants will gain:
  • An understanding of how compilers implement virtually every part of the language.
  • Knowledge of how to avoid code bloat from templates, exceptions, and other language features.
  • Familiarity with how to use C++ with ROM, memory-mapped IO, ISRs and signal handlers, and custom memory management schemes.
  • Examples of how C++ templates can provide powerful functionality difficult or impossible to implement in C.
  • An overview of issues related to the use of C++ in safety-critical and real-time systems.
Format: Lecture and question/answer. There are no hands-on exercises, but participants are welcome to use their computers to experiment with the course material as it is presented.

What You Will Learn

Course Highlights

Course Details

Dates & Locations

  • Overview of "Embedded C++."
  • 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
  • Three approaches to interface-based programming:
    • Virtual functions and runtime polymorphism
    • Separate compilation and link-time polymorphism
    • Templates and compile-time polymorphism
  • Applying C++ in Embedded Systems:
    • Rules for what can and cannot be ROMed
    • Memory management:
      • Issues: speed, fragmentation, leaks, exhaustion
      • Static allocation
      • Dynamic allocation:
        • Writing custom versions of new and delete
        • LIFO allocation
        • Pool allocation
        • Block allocation
        • Other options: regions and variable-sized allocators
    • Modeling memory-mapped IO (MMIO):
      • Putting objects at specific addresses:
        • Placement new
        • reinterpret_cast
        • Compiler extensions
      • Modeling MMIO registers directly vs. indirectly
        • Creating shadow registers
      • Preventing common usage errors
      • Generalizing via templates
    • Implementing callbacks for C APIs (e.g., ISRs):
      • C++ functions C APIs can call
      • Linkage and exception issues
      • Approaches and their pros/cons:
        • Using virtual functions
        • Using std::tr1::function objects
    • Overview of TR1 and Boost
    • Interesting template applications:
      • Generating cost-free type-safe wrappers for void*-based code
      • Performing compile-time dimensional unit compatibility analysis
      • Expressing binary literals
      • Specifying finite state machines (FSMs)
  • Considerations for safety-critical and real-time systems
  • Sources for Additional Information

What You Will Learn

Course Highlights

Course Details

Dates & Locations

Upcoming Dates & Locations

There are no upcoming scheduled engagments of this course. We can schedule an on-site event at your convenience.
Ready?
Connect
Signup for our Free Newsletter!
Latest news
Twitter Feed MORE
Got an email from a developer in Holland about my Onion Architecture blog post http://t.co/Z5DTvJob Nice to have a worldwide audience! #dm
1 day ago (details)
There is something to this statement: Why Quit? Because They Have Bigger Monitors http://t.co/9FrGETG5 #dm (via @mkennedy)
2 days ago (details)
Testimonials
  • Llewellyn Falco’s visit was nothing short of magnificent. His expertise has me tracking much straighter now - doing things faster than I dreamed possible. Phil H.