Home > Articles > Programming

This chapter is from the book

1.2 The Origins of eCos

Initial design discussions for eCos began in the spring of 1997. The primary goal was to bring a cost-effective, high-quality embedded software solution to the marketplace. This new development would also complement the existing GNUPro tools, thereby expanding Cygnus' product offering.

Another essential requirement was that eCos needed to be designed in such a way that a small resource footprint could be constructed. By working with different semiconductor companies, Cygnus was able to architect a real-time operating system (RTOS) that abstracted the hardware layer and was highly configurable. This enabled the RTOS to fit into many diverse embedded systems. The highly configurable nature of eCos also allowed companies to reduce time to market for embedded products.

Reducing cost is always a concern in embedded systems. By using the open-source model, eCos was available with no initial costs. It could be downloaded and "test driven" free of charge. In addition to eliminating startup costs, another attractive cost-saving feature was that eCos had no backend charges—it had to be royalty-free.

Developers have full access to the entire software source code, including the tools, which can be modified as necessary (see Appendix B, eCos License, for the eCos license). There are no up-front license fees for the eCos run-time source code or any of the associated tools; everything needed to set up a complete embedded software development environment can be accomplished for free. Developers do not have to contribute back any additional components or applications developed; however, they are required to contribute back modifications to the eCos code itself. These contributions help the open-source community develop a better product.

Today, numerous companies are using eCos, and many successful products have been launched running eCos, including the Brother HL-2400 CeN network color laser printer, Delphi Communiport, and the Iomega Hip Zip Digital Audio Player.

1.2.1 In a Word: Configurability

In order to get an understanding of the eCos architecture, it is important to appreciate the component framework that makes up the eCos system. This component framework is specifically targeted at embedded systems and meeting the requirements associated in embedded design. Using this framework, an enormous amount of functionality for an application can be built from reusable software components or software building blocks. The eCos component framework has been designed to control components to minimize memory use, allow users to control timing behavior to meet real-time requirements, and use usual programming languages (e.g., C, C++, and assembly for certain implementations in the Hardware Abstraction Layer [HAL]).

Most embedded software today provides more functionality than what might actually be needed for a particular application. Often, extra code is included in a software system that gives generic support for functionality that embedded developers are not concerned with and is not needed. This extra code makes the software unnecessarily more complex. Furthermore, the more code, the greater the chance of something going wrong. An example would be a simple "Hello World" program. With most RTOSes, full support for mutexes, task switching, and other features would be included, even though it is not necessary for such a simplistic application. eCos gives the developer ultimate control over run-time components where functionality that is not needed can easily be removed. eCos can be scaled from a few hundred bytes up to hundreds of kilobytes when features such as networking stacks are included and third-party contributions such as Web servers are used.

Developers are able to select components that satisfy basic application needs, and config-ure that particular component for the specific implementation requirements for the application. This could mean enabling or disabling a particular feature within a component, or selecting a particular implementation for the component. An example of this is in the kernel scheduler con-figuration. eCos offers the developer options such as the ability to select the number of priority levels and whether time slicing is used. Any code unnecessary to meeting the developer's requirements is eliminated in the final image of the application.

Configurability allows a company to build an internal foundation of reusable components with access to the source code of the component. This can reduce development time and time to market because the components are highly portable and can be used in a wide range of applications. The eCos framework encourages third-party development to extend the features and functionality of the core eCos components. As more and more developers work toward extending the functionality on products and contribute these components back to the eCos project, the growth in functionality of eCos is limitless. Moreover, if the functionality is presently not available, the source code is there to accomplish the task yourself.

1.2.2 The eCos Configuration Method

As embedded systems are pushed to be smaller, faster, cheaper, and more sophisticated, control over all software in the system is necessary. There are different methods to control the behavior of components included in an application image. The philosophy of the eCos component control implementation is to reduce the size for systems that have resource limitations, even to the detriment of systems that do not have strict resource constraints. With this design philosophy in mind, minimal systems do not suffer from additional code necessary to support advanced features only used in more complex systems.

One method to control software components is at run time. In this method, no up-front configuration of the component is done. The code linked to the application provides support for all behaviors of the component whether it is required by the application or not, causing the code size to be much larger. An example of run-time control is an application that runs on a desktop. When the application is executed from the disk drive, the shared libraries (Dynamic Link Libraries [DLL], etc.) needed by the application are loaded when the application starts. Another method for component control is at link time. In this case, the code can use onlythe specific functions of a component that it needs, and the code that supports functionality not needed by the application is left out. Many linkers, such as the GNU linker (ld), offer link-time control, or commonly called, selective linking. With selective linking, unreferenced functions and data are removed from the application image. However, this is still insufficient because only entire functions can be removed—an all-or-nothing approach.

Compile-time control gives the developer control of the component behavior at the earliest stage, allowing the implementation of the component itself to be built for the specific application for which it is intended. Compile-time control gives the best results in terms of code size because the control is at the individual statement level in the source code rather than at the function or object level. This makes compile-time control very well suited for embedded development. eCos uses compile-time control methods for its software components, along with selective linking provided by the GNU linker. Using compile-time control or source-level configuration is achieved by using the C preprocessor. An example of source-level configuration is shown in Code Listing 1.1. The flag INCLUDE_FUNCTIONALITY is either enabled or disabled by the developer. When this section of the code is compiled, only the code that is needed is included in the application image.

Code Listing 1.1 Example code of source-level configuration.

1 #ifdef INCLUDE_FUNCTIONALITY
2
3 ...
4
5 #else
6
7 ...
8
9 #endif

With source-level configuration, very specific options can be applied in the code, which is appropriate for embedded systems since the majority of embedded applications compile into static images.

In addition to generating smaller code, source-level configuration offers many other advantages important in embedded software development:

  • Applications are faster because variables do not have to be checked during run time to determine what action to take.

  • The code is more responsive and latencies are reduced, which aids in creating a more deterministic system that is important in real-time devices.

  • A simpler code base is generated, making verification and testing easier.

  • The code is tailored for the application, creating an application-specific RTOS.

  • Costs can be reduced because resource usage is optimized and processor cycles are efficiently used, thereby enabling less expensive hardware to be specified in the design.

The Configuration Tool, provided with the eCos release, eases the selection and configura-tion of the software components. The tool also provides the capability to build the eCos framework from the software building blocks selected, which are then linked with the application. The Configuration Tool runs on both Windows and Linux platforms. A detailed look at the Configu-ration Tool is presented in Chapter 11, The eCos Toolset.

1.2.3 eCos Core Components

Certain standard functionality is expected in a real-time embedded operating system, including interrupt handling, exception and fault handling, thread synchronization, scheduling, timers, and device drivers. eCos delivers these standard components with the real-time kernel as the central core. The core components are:

  • Hardware Abstraction Layer (HAL)—providing a software layer that gives general access to the hardware.

  • Kernel—including interrupt and exception handling, thread and synchronization support, a choice of scheduler implementations, timers, counters, and alarms.

  • ISO C and math libraries—standard compatibility with function calls.

  • Device drivers—including standard serial, Ethernet, Flash ROM, and others.

  • GNU debugger (GDB) support—provides target software for communicating with a GDB host enabling application debugging.

Both eCos and the application run in supervisor mode. In the eCos system, there is no division between user and kernel mode.

A minimal test infrastructure is included with eCos. The tests are configured in a similar way to the application, which ensures that the exact configuration selected is tested. The Config-uration Tool provides the facilities for administering the tests. Expanding the current test infrastructure is planned in future eCos releases.

1.2.4 Processor and Evaluation Platform Support

eCos supports a wide variety of popular embedded processor architectures. This makes eCos a great choice for companies using many diverse hardware architectures on different product lines. Once the eCos HAL has been ported to a new architecture, the application layer can be moved over seamlessly to support the new application requirements.

The eCos software support is for standard commercial evaluation platforms on the market today. The main processor architectures supported include:

  • ARM
  • Fujitsu FR-V
  • Hitachi H8/300
  • Intel x86
  • Matsushita AM3x
  • MIPS
  • NEC V8xx
  • PowerPC
  • Samsung CalmRISC16/32
  • SPARC
  • SPARClite
  • SuperH

Appendix A, Supported Processors and Evaluation Platforms, lists the specific processor ports and evaluation platforms supported by eCos. Since many ports are contributed back to the eCos project for the benefit of others to use, the eCos Web site, at http://sources.redhat.com/ecos/hardware.html, is the best source for finding the most recent contributions for the eCos project.

1.2.5 eCos Support

Getting support is always a concern when trying to determine whether a certain product should be used. There are different means for getting support with eCos. The route used for obtaining support will greatly depend on the amount of assistance needed.

There are six different mailing lists available for the eCos project:

  • Discussion List—contains support and technical assistance on various topics about the eCos project from developers. The list can be found online at http://sources.redhat.com/ml/ecos-discuss, and the email address for the list is ecos-discuss@sources.redhat.com.

  • Patches List—used for submitting eCos patches for approval by the maintainers before they are committed to the source code repository. The list also hosts discussions about the different patches submitted. This list can be found online at http://sources.redhat.com/ml/ecos-patches, and the email address for posts is ecos-patches@sources.redhat.com.

  • Development List—includes discussions about current enhancements being developed, such as new ports and new features. General requests for help and information about eCos should be kept to the discussion list. This list can be found online at http://sources.redhat.com/ml/ecos-devel, and the email address is ecos-devel@sources .redhat.com.

  • Announcement List—a low-volume list for significant news about eCos that is also used to announce new eCos releases or major feature enhancements. This list can be found online at http://sources.redhat.com/ml/ecos-announce, and the email address is ecos-announce@sources.redhat.com.

  • CVS Web Pages List—contains notifications of changes to the eCos Web pages that are maintained in Concurrent Versions System (CVS). This read-only list can be found online at http://sources.redhat.com/ml/ecos-webpages-cvs.

  • CVS List—a read-only list that gives notifications of changes made to the eCos source code repository. This list can be found online at http://sources.redhat.com/ml/ecos-cvs.

As with all mailing lists, it is generally a good idea to dig in and try to find the answer to your problem before posting a previously reported, and solved, question to the list. To assist with this process, the eCos mailing lists provide a means for searching previous messages posted to the list.

Through my development using eCos, I have found that the discussion list is very responsive, compared to facilities provided by other companies in the past. I have found a two to three-day turnaround on getting answers to questions I have posted to the list from developers in the eCos community. However, it should be understood that not all questions asked on the discussion list are answered. Having questions that are very specific and detailed often helps the maintainers, and other developers, to lend support.

A great advantage of open-source development, and an open discussion list, is that the community for the project is there to assist in answering questions. Quite often, users who have encountered similar problems will post answers to aid their developer colleagues.

Users are able to subscribe to any of the lists and receive emails for all messages posted to a particular list or a digest form that contains a collection of messages from the particular list. Receiving individual messages can be somewhat overwhelming; therefore, subscription to the digest version of the discussion list might be better. To sign up for any of the mailing lists, you can go online at:

http://sources.redhat.com/ecos/intouch.html

Bug tracking for the eCos project is contained in a Bugzilla database. The Bugzilla database has an advanced search engine that allows searches based on keywords, for particular platforms, and specific versions of eCos. The Bugzilla database search engine can be found online at:

http://bugzilla.redhat.com/bugzilla/query.cgi?product=Red%20Hat%20eCos

Additional information about other features about the Bugzilla bug tracking software, including a new bug report form, can be found online at:

http://bugzilla.redhat.com/bugzilla

If there are private technical issues to discuss about eCos development and collaboration, the maintainers have an email address to reach them directly at:

ecos-maintainers@redhat.com

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020