Start date: 22 August 2023
Duration: 3 Days
Location: 3 days, 9am to 5pm each day
Cost: Members € 600, Non-Members €900
Course code: N/A
C++ has been a popular general purpose programming language for many years. Recent developments in microcontroller technology (such as Arm Cortex®-M), increasing application complexity and enhancements made in the C++ 2011 standard mean that C++ is now replacing C as the preferred language for many embedded systems. The course schedule below will be interspersed with relevant labs using the NXP KL46Z development board.
At the end of the course, students will understand the essentials of programming Embedded Systems in C and C++.
Who is the course for?
C++ for Embedded Systems is aimed at electronic hardware, software and system-on-chip engineers who need to gain a working knowledge of the C++ language to build an embedded system.
The course is also suitable as a general introduction to C++ programming. Delegates need a basic understanding of embedded systems, microcontroller architecture and how to read a datasheet.
A prior good working knowledge of C is essential. Delegates should either have:
• attended C for Embedded Systems
• or have had 2 to 3 years of hands-on C coding experience
This course is not suitable as a first course in computer programming or on the C language. Take this SELF-ASSESSMENT TEST to find out whether you know enough C.
Requirements for C++ in an Embedded System
Embedded system characteristics • Language choice • Memory mapped peripherals • Volatile variables • Compilation • System boot-up • Best Practices
From C to C++, C++11 and Beyond
The features added to C by C++ and the ANSI C-1999 standard, highlighting features useful to an embedded system • inline • const • Enhanced enumerations • constant expressions • auto • Overview of I/O streams • Function prototypes • Pass-by-reference • Default arguments • Function and operator overloading • String class • User-defined literals • Lambda functions and capture lists • Additional operators
Linkage and Storage
Learn some tricky features often overlooked in C, but necessary for C++ • Scope • Linkage • Linking C and C++ • Namespaces • Static, automatic and dynamic storage • new and delete • Placement new • Arrays and Pointers • Vectors
Classes and Objects
Introduction to modeling and abstraction • Information hiding • Abstract data types • Classes and objects • Public and private class members • Member functions • Scope resolution • this pointer
How to ensure that objects are properly initialised, and how to tidy up afterwards • Constructors • Destructors • Delegating constructors • Copy constructors • Pointers and objects • Move semantics
Members and Friends
More features of C++ classes • Friends • Operator overloading • Overloading assignment • Move assignment • Memory fragmentation • Working with memory pools • Static members • Constant objects and members
Derived classes • Inheritance • Protected members • Casting pointers • Order of initialization
Virtual Functions (Optional Topic):
Inheriting common behavior • Overriding methods • Virtual functions • Polymorphism • Late binding • Virtual destructors • Vtable • Cost of virtual functions • Abstract base classes and pure virtual functions • Interface classes
Dr. Des Howlett is a Senior Member of the Doulos Technical Staff and joined the company in 2017. He has worked as a Senior Field Applications Engineer for Microchip Technology and Silicon Laboratories, all over the EMEA region. Immediately prior to Doulos, he was Technical Marketing Manager, EMEA, for Software at Avnet Silica and was responsible for liaising between processor manufacturers and customers to ensure that supplied software was suitable for market needs.
Des has taught embedded C programming and Verilog logic design at the University of Reading and now is an instructor for embedded C and C++, Embedded System Security and Python as well as Xilinx courses at Doulos.