This advanced training is designed for embedded engineers who want to deepen their expertise in software design specifically for embedded systems using the C programming language. The course takes a practical approach to modern software architecture principles, design patterns, and the effective use of operating system mechanisms and hardware-level control.
Participants will learn how to apply object-oriented concepts in C, build robust state machines, integrate architecture-level patterns, and implement callback structures within complex embedded applications. The training is hands-on and project-based, culminating in the development of a functional measurement device application.
Format of the Course
- Interactive lecture and discussion.
- Lots of exercises and practice.
- Hands-on implementation in a live-lab environment.
Embedded Software Design and Patterns with C - Training
Embedded Software Design - Introduction
- Definition of software design
- Integration in the development process
- The role of a software designer
Object Orientation in C
- Classes and objects
- Relations: dependency, association, aggregation, composition, inheritance
- Interfaces and virtual functions
- Practical exercise: You design and implement classes and objects with different relations, execute them on an embedded target and test them. Each exercise will be part of the set-up of a measurement device application.
Select Design Principles Implemented in C
- DRY, KISS, avoid premature optimization
- SLA, SRP, dependency inversion
- Principle of least surprise
- Open/closed principle, Law of Demeter, YAGNI
- Source code conventions, MISRA
Select Design Patterns
- Software architecture patterns: layer, blackboard, pipes and filters, client server, model view controller (MVC), microkernel
- Software design patterns: builder/manager, facade, strategy
- Hardware access patterns: HW proxy, HW adapter, mediator, observer, debouncing, interrupt, polling
- Safety and reliability, one's complement, CRC, smart data, channel, protected single channel, multi-channel (dual, triple), sanity check, monitor-actuator
- Practical exercise: You use some of the above-mentioned patterns in the measurement device application
State Machines
- Design
- Implementation variants: switch-case, table, state pattern
- Practical exercise: You design and implement the object-oriented state machine in the measurement device application
Operating System
- Overview of mechanisms: task management, scheduler, synchronization, communication, resource management, time management, interrupt management, memory management
- Practical example: Applying the mechanisms in the measurement device application
Callback Structures
- Communication between architecture elements
- Design rules
- Synchronous, asynchronous
- Callback structure procedural and object-oriented
- Callback structure with and without operating system
- Variation options
- High-quality software architecture with callback structures
- Practical exercise: You design and implement an object-oriented callback structure in the measurement device application
Hardware Driver Concepts and Interrupts
- Architecture guidelines
- Software layer patterns
- Practical examples of software layer architectures
- Object-oriented driver concepts
- Interrupt handling
- Practical tips: Standards and sources for driver concepts
- Practical exercise: You design and implement a driver and the related driver access in the measurement device application
Select Refactorings in C
- Preconditions for successful refactoring
- Small steps, big steps
- Smells
- Refactoring patterns
Practical exercise
- Using microcontroller development kit with real hardware