|2020ok Directory of FREE Online Books and FREE eBooks|
Embedded Software Development with eCos
by Anthony J. Massa and Anthony Massa
(Respecting the intellectual property of others is utmost important to us, we make every effort to make sure we only link to legitimate sites, such as those sites owned by authors and publishers. If you have any questions about these links, please contact us.)
Embedded Software Development with eCos shows developers and managers the advantages of using eCos -- the Embedded Configurable Operating System from Red Hat - over proprietary or commercial embedded operating systems. As an Open Source solution, eCos provides a low-cost, royalty free option for embedded software development. Anthony Massa shows how eCos, and the eCos development environment, has all of the features and functionality to meet the needs of almost all commercial embedded system requirements. Massa provides an understanding of how to use the open-source licensing and royalty free nature of eCos in order to eliminate high startup and per unit costs associated with many of the proprietary real-time operating systems on the market today. Embedded systems are operating systems that must operate with a very small footprint (usually less than 100KB of space) and must be self-contained. Most companies use either proprietary solutions or expensive commercial solutions. eCos is the first powerful, royalty-free Open Source solution, from Red Hat.
From the Back Cover
Foreword by Michael Tiemann, CTO, Red Hat Software and Co-founder of Cygnus Solutions"Anthony's book is easily the most complete treatment of eCos system development. I believe it is destined to become part of every eCos developer's library."
âMichael Tiemann, CTO, Red Hat Software and Co-founder of Cygnus Solutions
Build low-cost, royalty-free embedded solutions with eCosâstep by step.
The Embedded Configurable Operating System (eCos) gives professionals a low-cost, royalty-free embedded software development solution that works in highly constrained hardware environments, while scaling smoothly to larger products. In this start-to-finish guide to eCos solution building, Anthony Massa covers eCos architecture, installation, configuration, coding, deployment, and the entire eCos open source development system. Additional open source tools are included to configure a complete embedded software development environment. Massa's code examples and application case study illuminate techniques for building virtually any embedded system, from the simplest device to complex Internet-enabled wireless systems. Coverage includes:
The accompanying CD-ROM contains the complete eCos development environment, along with all the code presented in this book.
About the Author
ANTHONY J. MASSA earned a dual B.S./B.A. degree in electrical engineering from the University of San Diego. He has developed embedded software, device drivers, and applications on a wide range of processors and embedded RTOS platforms, for successful products including satellite PC receiver cards and modems, set-top boxes, networking broadcast equipment, and Internet-enabled wireless modems. Massa has written extensively on eCos in many leading publications including Doctor Dobb's Journal, Embedded Systems Programming, and Software Development.
Excerpt. © Reprinted by permission. All rights reserved.
Whether you're working on an existing project or moving on to a new development, eventually you're going to have to decide on what Real-Time Operating System (RTOS) to use. Numerous questions arise, including how much does it cost to get started, are there royalties associated with using the RTOS, what is the quality of the tools, is source code available, what features are available for the RTOS, and so on. In most situations, the lowest-cost solution in both upfront costs and royalties is the best solution, as long as it works. Eliminating royalties is very important for high-volume products, where every nickel counts.
There are also concerns of previous investments made, both in developer knowledge and financially, for the current solution. Anxiety can occur when considering moving existing code to a new software platform, which can be intimidating depending on the size of the project. Porting a new RTOS to your hardware platform can create more trepidation.
Decisions about whether to develop your own RTOS or use an off-the-shelf solution surface in some cases as well; especially when specific functionality is needed for a specialized hardware platform. In some cases, rolling your own RTOS might be the only solution. However, you can put your development way ahead by leveraging software that is already implemented, tested on numerous platforms and in various situations, and, most importantly, proven because it is successfully running on other shipping products. This eliminates the need for implementing functionality that is readily available.
This book focuses on one solution to these concerns: the Embedded Configurable Operating System (eCos). The open-source and royalty-free nature of eCos allows it to be downloaded, set up, and used, and here's the key: at no cost. When finished with this book, you will have a complete embedded software development environmentall the tools necessary to tackle any project.
Since eCos is open source, you, the developer, are in complete control over your embedded software destiny. Even the tools described in the eCos development system are open source, thereby allowing you to become completely self sufficientalthough the eCos development community is out there available to lend help when needed.
Book Layout and Overview
Let's take a look at the layout of the book and get an overview of what is covered and where it is located. This enables you to focus on the specific aspects of eCos that you need to understand.
The layout of the book is intended to build on information covered in earlier chapters. We start with understanding the key components within eCos, then move to additional functionality offered in the system, and finally, get down to using eCos and the development environment.
For developers new to the eCos world, or embedded software altogether, it is helpful to understand the components that make up the eCos system by starting at the beginning. This gives the baseline understanding of the different features provided by eCos. You can then implement these software components in an actual system.
More experienced developers looking for an evaluation of eCos can skip to the later chapters and begin experimenting right away. The format of the development platform installation and examples allow a quick setup of the tools and immediate results. This lets you answer the question, "will eCos work for me?"
Current eCos users can fill in any holes that might be present in their eCos knowledge, by looking at some of the eCos concepts from a different point of view.
Chapter 1, An Introduction to the eCos World, begins with a brief introduction to eCos, which includes a background about the eCos open-source project and the company behind its start. A description of the eCos terminology is detailed as well. This terminology is used throughout the book and in the eCos development community. The beginning of the book is intended to provide developers who are unfamiliar with eCos a means to become acquainted with the eCos open-source project.
Next, we discuss the key components within the eCos system, presenting a closer look under the hood of these major software modules. The key component chapters offer an understanding about how the different software modules work independently and together to provide functionality required by the system.
Chapter 2, The Hardware Abstraction Layer, focuses on the software closest to the hardware that enables higher-level software modules to be unaware of the low-level functioning of the hardware.
In Chapter 3, Exceptions and Interrupts, we detail exceptions and interrupts and show how they are set up and handled in the eCos system. We discuss virtual vectors in Chapter 4, Virtual Vectors, which provide a means to share services between ROM and RAM applications.
The heart of the eCos RTOS, the kernel, is the focus in Chapter 5, The Kernel. The kernel supplies the scheduling functionality and the synchronization mechanisms for the software. Moving on to Chapter 6, Threads and Synchronization Mechanisms, we discuss the basic unit of execution in eCos, the thread, and provide a detailed look at the various synchronization mechanisms supported by eCos.
Chapter 7, Other eCos Architecture Components, continues with our look at the different eCos components by focusing on timing components, asserts and tracing functionality, and the I/O control system.
Chapter 8, Additional Functionality and Third-Party Contributions, includes a broader look at some of the additional features available for eCos developed by the eCos project maintainers and third-party contributors. These include networking support, ROM monitors, file systems, PCI support, USB support, and the GoAhead WebServer.
In Chapter 9, The RedBoot ROM Monitor, we focus on the RedBoot ROM monitor. This standalone program is designed for embedded systems to provide a debugging and bootstrap environment. RedBoot is an eCos-based application and uses the eCos Hardware Abstraction Layer (HAL) for its foundation.
We begin our hands-on experience in Chapter 10, The Host Development Platform, with the installation of the host development tools. We discuss the Cygwin native tools, the GNU cross-development tools, and the eCos development kit. We also cover the installation of a Concurrent Versions System (CVS) client, WinCVS, to enable access to the online eCos source code repository. This gives you the ability to take advantage of any bug fixes or extended functionality contributed to the eCos source code.
In Chapter 11, The eCos Toolset, we delve into the eCos toolset with a detailed look at how the tools operate on the eCos source code, and the layout of the tools. Also included are some other open-source tools to round out and complete our open-source embedded development system. This prepares us for the next step, putting the tools to work to build our application.
Chapter 12, An Example Application Using eCos, lets you put your knowledge to work. The chapter starts with an overview of the eCos build process, followed by a build of the RedBoot ROM monitor. We then do a build of the eCos real-time operating system, and, finally, put it all together by building an application. This chapter provides a baseline on which you can then add additional components to assemble a system to meet your embedded software requirements.
Finally, Chapter 13, Porting eCos, closes with a look at porting eCos onto another hardware platform. This is key to getting your application running on your new target hardware platform, which is typically the main goal in embedded software development.
Development System and Examples
As mentioned previously, in Chapter 10 we go through the process of setting up an eCos development system. This development system includes the native Cygwin tools for Windows, the GNU cross-development tools (binutils, compiler, and debugger), the eCos configuration and management tools, a CVS client, and a lint program.
This system enables you to configure and build the eCos library, which is then linked with an application to run the eCos RTOS. The RedBoot ROM monitor is also built using this system. After following the steps in Chapter 10, a complete open-source embedded software development environment is configured.
We go through examples of building RedBoot, the eCos library, and an application in Chapter 12. Rather than requiring a specific development board to run the examples, a second PC is needed for the target platform. This is a better approach to becoming familiar with the development tools since it's typically pretty easy to find a spare PC lying around.
Although GNU cross-development tools binary files are included on the CD-ROM for the Intel x86 and PowerPC processor architectures, the instructions for configuring and building the GNU cross-development tools for other processor architectures are provided in Appendix D, Building the GNU Cross-Development Tools.
The embedded software development tools are installed, and examples are built, on a Windows development system. However, the necessary files to get an embedded software development system up and running on a Linux system are included on the CD-ROM. Since the eCos configuration tools are able to run on both Linux and Windows, the procedure for building and running the examples applies to both host operating systems.
The CD-ROM accompanying this book contains the files needed to set up the complete embedded software development system for eCos as detailed in Chapter 10. The examples in Chapters 12 and 13 are also contained on the CD-ROM under the examples directory.
A web site is available to download the source code and updates. The site is located online at:
If you find any errors that need correction, feel free to contact me and I will update the source code accordingly.
Some Notes about the Book
All example c...
Related Free eBooks