C++ Basics
In order to complement the C++ knowledge required for this lecture, lessons are made available through CLion EduTools lessons. For this purpose, you must install CLion on your computer. Alternatively, you may also install the application using the IntelliJ Toolbox app.
The lessons are available here. Follow the Getting Started guidelines for starting the C++ course.
Note that the distributed lessons were developed and tested with CLion 2023.2.
Why C++ for Embedded programming?
C++ is a powerful programming language that is a combination of high level programming (Java) and low level programming (C). It was developed in 1979 at Bell Labs as an enhancement to the C programming language, while maintaining backward compatibility with C.
The C++ programming language is fast, just like C, and is the preferred programming language with C for embedded systems. Like Java, it provides object oriented programming mechanisms, like classes, polymorphism, exception handling, strong typing, or templates. Among differences as compared to Java, it also offers operator overloading and does not provide built-in memory management (Garbage collector). It is also not meant for running programs through a virtual machine.
The programs for embedded systems are usually developed at a relatively low level. The lowest level would be the Assembly language. However, for improved portability and development efficiency, C++ is often preferred. It is easier to learn, portable and allows easy handling of data structures. Although direct control and access to instructions and memory may be an advantage, it is rarely required. In addition to the advantages of the C programming language, C++ also offers the advantages of object oriented programming, in particular encapsulation of low level concepts in portable and easy-to-use classes.
What you’ll learn
- How to apply the basic C++ principles for efficient and well designed embedded programming.
What you’ll need
- CLion for performing the EduTools lessons made available to you.