New Learn Course: Introduction To Embedded Systems Programming
by Pat Rogers –
A new online Learn course has been published offering an Introduction To Embedded Systems Programming.
The course is based directly on decades of embedded systems development experience using Ada. Although an introduction, it is both in-depth and extensive, with numerous code examples and real-world issues addressed.
In the course, we dedicate a lot of time to low-level programming, such as how to specify the layout of types, how to map variables of those types to specific addresses, when and how to do unchecked programming (and how not to), and how to determine the validity of incoming data. Ada has considerable support for this activity so there is much to explore.
Likewise, we cover development using Ada in combination with other languages, a not uncommon approach today. Specifically, we show how to interface with code and data written in other languages, and how (and why) to work with assembly language. Development in just one language is becoming less common over time so these are important aspects to know.
One of the more distinctive activities of embedded programming involves interacting with the outside world via embedded devices, such as A/D converters, timers, actuators, sensors, and so forth. (This can be one of the more entertaining activities as well.) We cover how to interact with these memory-mapped devices using specifications for their representation, data structures that simplify the functional code, and time-honored aspects of software engineering, including abstract data types.
Finally, we explore how to handle interrupts in Ada, another distinctive part of embedded systems programming. We explain the canonical interrupt handling model, that model's correspondence to the model described by the Ada standard, and how Ada provides direct support for the resulting functionality. As we explain, Ada has extensive support for handling interrupts, using the same building blocks used in concurrent programming. These constructs provide a way to handle interrupts that is as portable as possible, in what is otherwise a very hardware-specific endeavor. Two primary idioms, compatible with Ravenscar, are included.