"I sincerely wish (this book) had been available when I had to learn all this stuff the hard way."
"An excellent job of introducing and defining the jargon associated with embedded systems. This makes the text extremely easy to read."--David Cuka
An Embedded Software Primer is a clearly written, insightful manual for engineers interested in writing embedded-system software. The example-driven approach puts you on a fast track to understanding embedded-system programming and applying what you learn to your projects. This book will give you the necessary foundation to work confidently in this field.
Building on a basic knowledge of computer programming concepts, this book will help you to:
After reading this book, you will be able to tackle the challenges of embedded system programming and quickly reap the benefits of your new skills.
About This Book and the Accompanying CD-ROM.
1. A First Look at Embedded Systems.
Examples of Embedded Systems.
A Few Other Basic Considerations.
Direct Memory Access.
Other Common Parts.
Built-Ins on the Microprocessor.
Conventions Used on Schematics.
A Sample Schematic.
A Last Word about Hardware.
The Shared-Data Problem.
Round-Robin with Interrupts.
Real-Time Operating System Architecture.
Selecting an Architecture.
Tasks and Task States.
Tasks and Data.
Semaphores and Shared Data.
Message Queues, Mailboxes, and Pipes.
Interrupt Routines in an RTOS Environment.
Encapsulating Semaphores and Queues.
Hard Real-Time Scheduling Considerations.
Saving Memory Space.
Host and Target Machines.
Linker/Locators for Embedded Software.
Getting Embedded Software into the Target System.
Testing on Your Host Machine.
Instruction Set Simulators.
The assert Macro.
Using Laboratory Tools.
What the Program Does.
Environment in Which the Program Operates.
A Guide to the Source Code.
This book is to help you learn the basic principles of writing software for embedded systems. It surveys the issues and discusses the various techniques for dealing with them. In particular, it discusses approaches to the appropriate use of the real-time operating systems upon which much embedded software is based. In addition to explaining what these systems do, this book points out how you can use them most effectively.
You need know nothing about embedded-systems software and its problems to read this book; we'll discuss everything from the very beginning. You should be familiar with basic computer programming concepts: you might be a software engineer with a year or more of experience, or perhaps a student with a few programming courses under your belt. You should understand the problems involved in writing application programs. This book requires a reading knowledge of the C programming language; since C is the lingua franca of embedded systems, you will have to learn it sooner or later if you hope to get into the field. A little knowledge of assembly language will also be helpful.
You have no doubt seen many books about software that are 800 or 900 or even 1000 pages long. Presumably you have noticed by now that this book is much smaller than that. This is intentional--the idea is that you might actually want to read all the way through it. This book is not entitled Everything There Is to Know about Embedded Systems Software. Nobody could write that book, and if someone could and did, you wouldn't want to read it anyway. This book is more like What You Need to Know to Get Started in Embedded Systems Software, telling you enough that you'll understand the issues you will face and getting you started on finding the information about your particular system so that you can resolve those issues.
This book is not specific to any microprocessor or real-time operating system nor is it oriented towards any particular software design methodology. The principles are the same, regardless of which microprocessor and which realtime operating system and which software design methodology you use. We will concentrate on the principles--principles that you can apply to almost any embedded system project. When you need to know the specifics of your microprocessor and your real-time operating system, look in the voluminous manuals that hardware and software vendors provide with their products. This book will help you know what information to look for.
This book is not academic or theoretical; it offers engineering information and engineering advice. In short, this book is the cornerstone of the knowledge that you'll need for writing embedded-systems software.David E. Simon