Using C++ in Embedded Systems

Day(s): 3
Dates/City:

Contact us

Price:

17.500 SEK

In software engineering of today, object-oriented methods are commonly used for system analysis and design.

Modelling can for instance be made using the graphical language UML. Despite this, C is by far the most popular programming language used for developing embedded or time-critical systems.

By using C++ right, it is possible to get the advantages of an object-oriented language without the penalty of increased code size and bad performance.

This course describes the differences between C and C++, and which consequences they cause when developing embedded software. The course also covers how the central language constructs should be used in an optimal way.

The course is NOT a beginner’s course. Some previous experience is assumed, see Previous knowledge below.

Goal

The goal is to introduce C++ as an object oriented language alternative in an embedded system context. We will show the similarities – and differences – with the C language.

You will comprehend different memory management strategies and understand what different paradigms in C++ leads to in machine code.

We will provide some useful design patterns especially applicable in an embedded context. To sum up: Using C++ in a correct way.

Participants

The course is for embedded systems designers and programmers, as well as system architects and technical managers.

Previous knowledge

The course requires previous experience of C++ programming. We recommend C++Basic and C++ Continuation.

Practical exercises / Tools

A few exercises in order to practice some concepts are included.

Contact at Nohau

Lena Bernhardsson

phone: +46 (0) 40 59 22 09
phone: +47 (0) 92 44 22 09 (no)
lena.bernhardsson@nohau.se

Content

Introduction - What's an Embedded System?

  • Simple Definition
  • Some Milestones
  • Characteristics
  • Why using C++?

Comparison with C

  • C: A subset of C++ – almost
  • Performance
  • Added "Free" Functionality
  • Why not using C++?

Classes

  • Member Variables
  • Member Functions
  • Implicit Methods
  • Constructor Initialization List
  • Struct in C++
  • Package

Inheritance

  • Realization
  • Performance
  • Multiple Inheritance
  • Virtual Inheritance

Polymorphism

  • Virtual Function
  • Virtual Destructor
  • Implementation
  • RTTI - Runtime Type Information
  • Performance

Templates

  • Function Template
  • Class Template
  • Code Bloat
  • Implementation Strategies
  • Template Meta Programming
  • Template Versus Inheritance?

Error Handling

  • Exception Handling
  • Performance Issues
  • Implementation

Inline Code

  • When to Use?
  • Strategies

Standard Library 

  • STL - Standard Template Library
  • iostream Library

Start-up

  • System Start-up
  • The C Part
  • The C++ Part

Memory Management

  • The C++ Memory Model
  • Strategies
  • Variables
  • Placement new
  • User Defined Memory Management

Using C++ Together with C

  • Name Mangling
  • Static Initialization
  • Dynamic Memory
  • Struct Contents

Multithreading

  • A Thread Class
  • Synchronization
  • A Mutex Class

Design Patterns

  • Initialization of Static Objects
  • RAII - Resource Acquisition Is Initialization

Embedded C++: A de facto Standard

  • Embedded C++ – EC++
  • EC++ Suppliers

 

 
Share |