2nd Edition. — O’Reilly Media, Inc., 2024. — 340 р. — ISBN-13: 978-1-098-15154-6.
Interested in developing embedded systems? Since they don't tolerate inefficiency, these systems require a disciplined approach to programming. This easy-to-read guide helps you cultivate good development practices based on classic software design patterns and new patterns unique to embedded programming. You'll learn how to build system architecture for processors, not for operating systems, and you'll discover techniques for dealing with hardware difficulties, changing designs, and manufacturing requirements.
Written by an expert who has created systems ranging from DNA scanners to children's toys, this book is ideal for intermediate and experienced programmers, no matter what platform you use. This expanded second edition includes new chapters on IoT and networked sensors, motors and movement, debugging, data handling strategies, and more.
Embedded software compilers often support only C, or C and C++. In addition, some embedded C++ compilers implement only a subset of the language (multiple inheritance, exceptions, and templates are commonly missing). There is a growing popularity for other languages, but C and C++ remain the most prevalent. Regardless of the language you need to use in your software, you can practice object-oriented design. The design principles of encapsulation, modularity, and data abstraction can be applied to any application in nearly any language. The goal is to make the design robust, maintainable, and flexible. We should use all the help we can get from the object-oriented camp.
Most of the examples in this book are in C or C++. I expect that the language is less important than the concepts, so even if you aren’t familiar with the syntax, look at the code. This book won’t teach you any programming language (except for some assembly language), but good design principles transcend language.
Optimize your system to reduce cost and increase performance
Develop an architecture that makes your software robust in resource-constrained environments
Explore sensors, displays, motors, and other I/O devices
Reduce RAM and power consumption, code space, and processor cycles
Learn how to interpret schematics, datasheets, and power requirements
Discover how to implement complex mathematics and Machine Learning on small processors
Design effective embedded systems for IoT and networked sensors
Contents:Preface
Introduction
Creating a System Architecture
Getting Your Hands on the Hardware
Inputs, Outputs, and Timers
Interrupts
Managing the Flow of Activity
Communicating with Peripherals
Putting Together a System
Getting into Trouble
Building Connected Devices
Doing More with Less
Math
Reducing Power Consumption
Motors and Movement
Index