What does professional embedded software development look like today?
A quick introduction to the world of real-time operating systems and embedded software programming in EC and EC++.
Based on the software architecture refined in the software design, you as a software developer implement (program) it in a structured, procedural, object-based or object-oriented manner using the programming language C or C++.
In doing so, you adhere to the architectural and design specifications as well as the programming guidelines and confirm this through reviews or static code analysis tools. MISRA C and MISRA C++ are rule sets for programming safety-critical software in the automotive sector. These coding rules also serve as a reference in other areas, such as medical technology.
Coding of embedded and real-time software with Embedded C and Embedded C++
Embedded C (EC) and Embedded C++ (EC++) are not standalone standards, but merely describe the use of the programming languages C and C++ for coding embedded and real-time software.
Real-time means determinism (predictability). A distinction is made between hard and soft real-time. With hard real-time, you guarantee adherence to your time constraints (e.g., deadlines, response times) in all cases, unlike with soft real-time. In the latter case, you develop real-time strategies to meet real-time requirements.
In embedded and real-time programming, as a software developer, you know exactly what you are programming and how: Where is a variable located, and what is the real-time behavior of the software? You understand the consequences for your target with your toolchain (compiler, linker, locator) at the machine code level (assembler code).
As an embedded and real-time software developer, you use programming constructs from the C and C++ programming languages that support typical quality characteristics, such as low resource requirements, high performance, guaranteed response times, functional safety and reliability, and avoid using constructs that are contrary to these.
Low-level programming
In low-level programming, you use Embedded C and Embedded C++ to directly access the peripheral registers of the hardware (driver programming). You also gain a thorough understanding of interrupt programming.
Real-time operating systems (RTOS)
For simple and sequential software, you program the runtime architecture in an endless loop (while(1), a "super loop," or a "main loop"). If the software is more complex and you reach the limits of manageability when controlling the software flow using an endless loop, then the use of an embedded operating system is recommended.
To do this, you divide the software into individual functions (so-called tasks), identify (quasi-)parallel execution paths, define repetition times, timeout times and data dependencies for your software functions (tasks).
The advantage of an operating system is that operating system services are available for all control, communication, and monitoring functions. For example, when defining each task, you can specify when it needs to be processed and whether the processing occurs on time (automatic monitoring of the task timeout).
As a software developer or architect, you select the appropriate operating system based on system requirements, operating system selection criteria (e.g., single-core or multi-core RTOS, with or without a memory protection service, etc.), and an overview of available operating systems. You distinguish between embedded operating systems and real-time operating systems.
Examples of operating systems
Embedded Linux, RT Linux, Linux Kernel, FreeRTOS and CMSIS-RTOS as an Arm operating system.
What is the best operating system?
The best operating system depends on the requirements of your application. Not every operating system is automatically real-time capable. You can also choose to design and program your own operating system or mini-operating system.
Use of the operating system
When using the operating system, you as a software developer will successfully meet the challenges if you know the basics, components, definitions, tasks, functionalities and application use of the following operating system mechanisms:
Process management, task management, thread management, scheduling methods (cooperative scheduling, preemptive, time-based, time-triggered, priority-based, time-slice, round-robin, earliest-deadline-first EDF), synchronization (event, signal), resource management (binary semaphore, counting semaphore, mutex, critical section), interrupt management, time management, internal communication (message queue, mailbox, shared memory, pipe, socket, message-based), memory management and I/O management (input/output management).

Image: Task states and their transitions in the operating system
Multicore in hardware and microcontroller architectures
In modern hardware and microcontroller architectures, the topic of multicore and multiprocessor architectures (homogeneous and heterogeneous) is becoming increasingly important. For most embedded and real-time software developers, this presents a completely new challenge. As a software developer, you know what you absolutely must consider when programming in C and C++ together with one or more operating systems on a multicore or multiprocessor platform.
Furthermore, you can optimize your software in a targeted manner and in the shortest possible time using modern debugging and tracing methods.
Real-time operating systems and embedded software programming are among the key disciplines that embedded developers should master in the age of IoT. Leverage the expertise from our training offers, to learn more about it.
Further information
MicroConsult Training & Coaching on Embedded and Real-Time Programming
MicroConsult Expertise in Embedded and Real-Time Software Development

