Preface

An embedded system is just a computer buried inside some other product. Surprisingly, you can know a great deal about programming and computing and still get lost in the arcane world of embedded systems. In the world of embedded systems programming, countless details both hardware- and software- related make the development process seem like a path that few have traveled and even fewer have survived. How do software, hardware, and firmware differ ? How in the world does a 100,000-line program end up inside a device smaller than my fingernail? What is flash memory and why do I need a cache? What is the difference between a task and a process? Do I need to worry about reentrancy? As we progress through Embedded Systems Firmware Demystified , you will come to see that these questions are not as complex as they first appear.

Embedded systems programming spans a wide range of activities from building programmable logic at the most concrete end to writing a UNIX process at the most abstract end. Bracketed by these poles, the industry has exploded in the last 20 years . In the late seventies, assemblers were considered luxuries . A typical embedded system used less than 64Kb of system memory (bits, not bytes!). There was no hardware hand-off to the firmware developer. The same person that drew the schematics and soldered the prototype also wrote the firmware that pulled the whole thing together. By the time Intel introduced the 8085 chip, it was clear that those pesky microprocessors were here to stay. In the eighties, the Motorola versus Intel CPU wars started, and C became a popular choice for the elite few who dared to mess with a high-level language and an EPROM programmer. Today, microprocessors are everywhere and range from the 4- and 8-bit workhorses still dominating the industry to 1GHz 64-bit processors that almost need a freezer (microprocessor-controlled, no doubt) to keep them cool.

Over the years, the complexity of these systems has snowballed. The industry has transitioned from programming a DEC PDP machine with binary codes on the front panel to applying object-oriented design to a microcontroller in a toaster. If you let the trend get to you, the changes can seem frazzling. There are microprocessors and microcontrollers; RAM, DRAM, and SDRAM; pipelining and superscalar; EPROM and flash memory; RISC and CISC; and RAS and CAS and cache and thats just the beginning.

Now, everything from toothbrushes (no kidding) to fighter jets are likely to have a version controlled by a microprocessor of some kind. With this trend come tools and technologies. One can easily be overwhelmed by the available choices in hardware (integrated circuits that the firmware must make work) and software (tools that are used to build the firmware application).

The goal of this book is to prepare you for a real embedded systems project by walking you through an entire embedded systems design. Not coincidentally, the project source code included is a piece of firmware an embedded boot platform that can simplify all your future projects. I assume a small hardware design with CPU, memory, and some peripherals. I present a basic schematic and walk you through the method in which instructions are fetched from memory. I discuss devices, as well as concepts. I examine flash memory versus EPROM, SRAM versus DRAM, microcontroller versus microprocessor, and data bus versus address bus. I also explain how you convert your C and assembly language source code to a binary image that ends up in the memory device from which the CPU boots (the boot flash memory).

Several chapters cover the basic steps of starting up an embedded system and getting a working application (including the basic boot in assembler), exception handling, flash memory drivers, a flash file system, and serial and Ethernet connections. The result is an understanding of how an embedded systems project gets started and how to build a platform on which an embedded systems application can reside.

Sound exciting? Great! Sound scary? Its not! The intent of this book is not to discuss the latest superscalar architecture or the antenna effects of copper routes on a printed circuit board, nor does it present a high-level abstract design process. (Advanced architectures and transmission-line effects are certainly important, but they are not the topic of this book.) This book is for those who want to get their hands dirty without being overwhelmed by industry jargon or design-specific technical details. By the end of this book, you will know how to read a basic schematic, know what goes into the boot flash device, and understand the major components of a complete embedded systems development platform.

Who Is the Reader?

At the minimum, I assume the reader has some experience with C and basic assembly language concepts. I do not assume any electronics or hardware background. Thus, readers with a wide range of programming backgrounds will find this book useful.

Computer science or electrical engineering students without a significant background in firmware development, but at least an interest, can obviously benefit from this book.

Low-level firmware developers will find the working example helpful, as it includes documentation and code explanations for an extensible firmware development platform. I explain the details associated with booting new hardware and the way in which the CPU interacts with peripherals. Topics range from the lowest -level boot to a Trivial File Transfer Protocol (TFTP) implementation over Ethernet. You can port the code in this book to your own target system or integrate snippets of this code with your existing firmware platform.

Hardware developers will find the completed platform useful for helping analyze and debug hardware beyond the CPU complex. For those inquisitive enough to step away from hardware to learn more about the firmware process, this book provides a way to get started without getting too far from the hardware. (Hardware designers regularly make the transition to programming in the firmware/software world.)

Project leaders will also find this book useful, as the firmware package presented is a mature platform. The platform is applicable to a wide range of real-time operating systems (RTOS) and target architectures, and it is extremely easy to port to new systems. The fact that the platform is fairly target- and RTOS-independent makes the transition to a different target or RTOS much less painful.



Embedded Systems Firmware Demystified
Embedded Systems Firmware Demystified (With CD-ROM)
ISBN: 1578200997
EAN: 2147483647
Year: 2002
Pages: 118
Authors: Ed Sutter

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net