Design Patterns for Great Software
Elecia White

#Embedded_Systems
#Design_Patterns
#RAM
#DNA
#Math
#hardware
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.
Table of Contents
Chapter 1. Introduction
Chapter 2. Creating a System Architecture
Chapter 3. Getting Your Hands on the Hardware
Chapter 4. Inputs, Outputs, and Timers
Chapter 5. Interrupts
Chapter 6. Managing the Flow of Activity
Chapter 7. Communicating with Peripherals
Chapter 8. Putting Together a System
Chapter 9. Getting into Trouble
Chapter 10. Building Connected Devices
Chapter 11. Doing More with Less
Chapter 12. Math
Chapter 13. Reducing Power Consumption
Chapter 14. Motors and Movement
About This Book
After seeing embedded systems in medical devices, race cars, airplanes, and children’s toys, I’ve found a lot of commonalities. There are things I wish I knew then on how to go about designing and implementing software for an embedded system. This book contains some of what I’ve learned. It is a book about successful software design in resource-constrained environments.
It is also a book about understanding what interviewers look for when you apply for an embedded systems job. Each section ends with an interview question. These are generally not language-specific; instead, they attempt to infer how you think. The most useful interview questions don’t have a single correct answer. Instead of trying to document all the paths, the notes after each question provide hints about what an interviewer might look for in your response. You’ll have to get the job (and the answers) on your own merits.
One note, though: my embedded systems don’t have operating systems (OS). The software runs on the bare metal. When the software says “turn that light on,” it says it to the processor without an intermediary. This isn’t a book about working with an embedded OS. But the concepts translate to processors running OSs, so if you stick around, you may learn about the undersides of OSs too. Working without one helps you really appreciate what an OS does.
This book describes the archetypes and principles that are commonly used in creating embedded system software. I don’t cover any particular platform, processor, compiler, or language, because if you get a good foundation from this book, specifics can come later.
Who This Book Is For
I wrote this for some folks I’ve worked with in the past.
Sarah was a junior software engineer who joined my embedded systems team. She was bright and interested but didn’t know how to handle hardware.
Josh was an experienced electromechanical engineer who needed to write software. He could power through some code but got stuck on designing the system, debugging memory issues, and reusing code.
Usually we only learn software or hardware in school; we don’t learn how to make them work together. My goal is to cantilever off the knowledge you have to fill the gaps.
"Making Embedded Systems has long been my favorite embedded book. With this thoroughly revised second edition, Elecia White has worked her magic to make a great book even better. It remains the definitive book for starting your embedded systems journey, but it is not just for beginners - seasoned professionals are also likely to find new insights within these pages."
— Phillip Johnston, founder of Embedded Artistry
"This is a fantastic book about embedded systems, giving a great overview of both the hardware and the software. Chapter 2 alone is worth the price and the reading time. If you follow that chapter's guidance on creating a system architecture and (lightly) documenting it you will easily double your chances of project success."
— Chris Svec, Director of Robot and Embedded Software at iRobot
"I picked up the first edition of this book when I transitioned into an embedded career and found it to be an invaluable resource. I don't know how, but the second edition is 200% better."
— Ben Henke, creator of Pixelblaze
About the Author
Elecia is a Senior Embedded Systems Consultant at Logical Elegance Inc, in this role she has helped ship many consumer, medical, and industrial products. She is also the author of 'Making Embedded Systems', published by O'Reilly Media, and co-host of the Embedded.FM podcast and blog.









