The Artima Developer Community


Effective C++ in an Embedded Environment cover

Last revised
April 2, 2015
320 pages
(View a free sample)

Presentation Materials: Effective C++ in an Embedded Environment

by Scott Meyers
Single-user license (personal use only)

This PDF document contains the presentation materials from Scott Meyers' two-day training course Effective C++ in an Embedded Environment. It provides an in-depth examination of how C++ can be applied in embedded systems, including costs of language features, ROMing, ISRs, memory management, safety-critical and real-time considerations, and more.

In Stock.
The PDF is ready for immediate download.

Buy it now

Quantity Volume
Discounts
Effective C++ in an Embedded Environment PDF $24.95

Features

  • Same content as the training course: The PDF you'll get is an exact snapshot of Scott's full-color training materials on the day he generates the PDF. You'll get not only the slides Scott shows in class, you'll also get the accompanying notes—the very ones Scott uses. To see exactly what you'll get you can view a free sample.

  • No DRM: You may copy the PDF to as many devices as you like, annotate it in any way you want, print it in part or in full as many times as you choose. Because the PDF is for your personal use only, you are not permitted to provide copies to friends or colleagues, may not install it on servers for public access, can't use it as the basis for presentations, etc., but we trust you to adhere to these restrictions; the PDF itself doesn't try to prevent unauthorized uses. (For more permissive usage options, consider licensing the materials.)

  • Free updates for life: You are entitled to free updates to the materials as long as Scott produces them. Major revisions are included, so you won't have to pay again later for a "new edition."

  • Volume discounts: Want a copy for every member of your team or department? Discounts of 30-50% off single-PDF prices apply to purchases of as few as 10 copies. As the saying goes, the more you buy, the more you save! Consult the discount schedule for details.

About the course

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.

Detailed topic outline

  • 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
      • Specifying finite state machines (FSMs)
  • Considerations for safety-critical and real-time systems
  • Sources for Additional Information

About the author

Scott Meyers is one of the world's foremost authorities on C++ software development. He provides training and consulting services to clients worldwide.

Scott wrote the best-selling Effective C++ series (Effective C++, More Effective C++, and Effective STL), is consulting editor for Addison Wesley's Effective Software Development Series, was a founding member of the Advisory Board for The C++ Source, and has served as a technical advisor to several start-up companies. In 2009 he received the Dr. Dobb's Excellence in Programming Award.

He received his PhD in Computer Science from Brown University in 1993.

Copyright © 2021 Artima, Inc. All rights reserved.