AdaCore Blog

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.

Posted in #Ada    #Embedded Development    #Learn   

About Pat Rogers

Pat Rogers

Dr. Patrick Rogers has been a computing professional since 1975, primarily working on embedded real-time applications including high-fidelity flight simulators and Supervisory Control and Data Acquisition (SCADA) systems controlling hazardous materials. He was director of the Ada9X Laboratory for the U.S. Air Force’s Joint Advanced Strike Technology Program, Principal Investigator in distributed systems and fault tolerance research projects using Ada for the U.S. Air Force and Army, and Associate Director for Research at the NASA Software Engineering Research Center. As a member of the Senior Technical Staff at AdaCore, he specializes in supporting real-time/embedded application developers, develops bare-board products and demonstrations for AdaCore, and creates training courses and presentations. He serves as Convenor of ISO/IEC JTC 1/SC 22/WG 9, the group responsible for the Ada standard.