Embedded C++
Embedded programming is more intensive than other forms of programming because it must handle specific requirements:
- High-performance requirements up to real-time requirements
- Safety-critical systems
- Reduced resources as memory and CPU power
- More Tasks that should be accomplished in parallel
C++ has been a popular general purpose programming language for many years. Recent developments in microcontroller technology, increasing application complexity and enhancements made in later versions of the C++ standard mean that C++ is now replacing C as the preferred language for many embedded systems.
This course teaches the C++ programming language in the context of real-time and embedded systems, highlighting the resource and performance implications of using key C++ features and programming styles.
The course is suitable for anyone wishing to develop applications within an Embedded Linux environment. It provides practical experience of programming a modern embedded microcontroller using real-time development tools. 50% of the time is dedicated to hands-on exercises working with a real embedded system.
In the course you will learn:
- The syntax and semantics of the C++ language
- The principles of object-oriented modelling, embedded software programming and real-time programming
- How to program an embedded microcontroller in C++
- A practical introduction to real-time development tools
- How to debug a C++ program on a target device
- How to access memory-mapped peripherals using C++
- How to write interrupt handlers in C++
- An introduction to real-time operating systems and scheduling
- Best practices for embedded programming
Prerequisites
You should have previous programming knowledge. The course in snot suitable as a first course in computer programming.
Language
Swedish or english.
Course length:
4 days.
Innehåll
1. What’s an Embedded System?
- Simple Definition
- Characteristics
- Why using C++?
2. Comparison with C
- C: A subset of C++ – almost
- Performance
- Added “Free” Functionality
- Why not using C++?
3. Classes
- Rvalue references and Move Semantics – avoiding unnecessary deep copy
- Package/Namespace
5. Polymorphism
- Virtual Function
- Virtual Destructor
- Implementation
- Runtime Type Information, RTTI
- Performance
6. Templates
- Function Template Class Template
- Variadic Templates
- Code Bloat
- Implementation Strategies
- Template versus Inheritance?
7. Error Handling
- Exception Handling
- Performance Issues
- Implementation
8. Inline Code
- When to Use?
- Strategies
10. Standard Library
- Standard Template Library, STL
- iostream Library
- STL Major Extensions due to Modern C++:
- Rvalue References – Move semantics
- Variadic Templates
- Concurrency
11. Memory Management
- The C++ Memory Model
- Standardized Word Widths – The stdint-types
- Strongly Typed Enumerations
- Atomic Types and their Operations
- constexpr
- std::byte
- Standard Library Allocator API
- Strategies
- Variables
- Placement new
- User Defined Memory Management
12. Interoperation between C and C++
- Name Mangling
- Static Initialization
- Dynamic Memory
- structContents
- POD – Plain Old Data type
13. Design Patterns
- RAII – Resource Acquisition Is Initialization
- Memory-mapped I/O
- Interrupt
- Initialization of Static Objects
Mer information
För mer information kontakta Åsa Detterfelt, 070-659 58 12, alternativt maila asa.detterfelt@mindroad.se.