URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [doc/] [sgml/] [user-guide/] [introduction.sgml] - Rev 174
Compare with Previous | Blame | View Log
<!-- {{{ Banner --><!-- =============================================================== --><!-- --><!-- introduction.sgml --><!-- --><!-- eCos User Guide --><!-- --><!-- =============================================================== --><!-- ####COPYRIGHTBEGIN#### --><!-- --><!-- =============================================================== --><!-- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. --><!-- Copyright (C) 2003 Nick Garnett --><!-- This material may be distributed only subject to the terms --><!-- and conditions set forth in the Open Publication License, v1.0 --><!-- or later (the latest version is presently available at --><!-- http://www.opencontent.org/openpub/) --><!-- Distribution of the work or derivative of the work in any --><!-- standard (paper) book form is prohibited unless prior --><!-- permission obtained from the copyright holder --><!-- =============================================================== --><!-- --><!-- ####COPYRIGHTEND#### --><!-- =============================================================== --><!-- #####DESCRIPTIONBEGIN#### --><!-- --><!-- ####DESCRIPTIONEND#### --><!-- =============================================================== --><!-- }}} --><part ID="user-guide-introduction"><TITLE>Introduction</TITLE><!--<chapter ID="FOREWORD-WHATS-NEW"><TITLE>What's New?</TITLE><para>XXXXX So what is new??? XXXXX</para></chapter>--><!-- ==================================================== --><chapter ID="ecos-key-features"><TITLE>Key Features</TITLE><itemizedlist><listitem><para><productname>eCos</productname> is distributed under the GPLlicense with an exception which permits proprietary application codeto be linked with <productname>eCos</productname> without itself beingforced to be released under the GPL. It is also royalty and buyoutfree.</para></listitem><listitem><para>As an Open Source project, <productname>eCos</productname> isunder constant improvement, with an active developer community, basedaround the <productname>eCos</productname> web site at <ULINKURL="http://sources.redhat.com/ecos/">http://sources.redhat.com/ecos/</ULINK>.</para></listitem><listitem><para>Powerful GUI-based configuration system allowing both large andfine grained configuration of <productname>eCos</productname>. Thisallows the functionality of <productname>eCos</productname> to becustomized to the exact requirements of the application.</para></listitem><listitem><para>Full-featured, flexible, configurable, real time embeddedkernel. The kernel provides thread scheduling, synchronization,timer, and communication primitives. It handles hardware resourcessuch as interrupts, exceptions, memory and caches.</para></listitem><listitem><para>The Hardware Abstraction Layer (HAL) hides the specific featuresof each supported CPU and platform, so that the kernel and otherrun-time components can be implemented in a portable fashion.</para></listitem><listitem><para>Support for µITRON and POSIX Application ProgrammerInterfaces (APIs). It also includes a fully featured, thread-safe ISOstandard C library and math library.</para></listitem><listitem><para>Support for a wide variety of devices including many serialdevices, ethernet controllers and FLASH memories. There is alsosupport for PCMCIA, USB and PCI interconnects.</para></listitem><listitem><para>A fully featured TCP/IP stack implementing IP, IPv6, ICMP, UDPand TCP over ethernet. Support for SNMP, HTTP, TFTP and FTP are alsopresent.</para></listitem><listitem><para>The RedBoot ROM monitor is an application that uses the<productname>eCos</productname> HAL for portability. It providesserial and ethernet based booting and debug services duringdevelopment.</para></listitem><listitem><para>Many components include test programs that validate thecomponents behaviour. These can be used both to check that hardware isfunctioning correctly, and as examples of<productname>eCos</productname> usage.</para></listitem><listitem><para><productname>eCos</productname> documentation included this UserGuide, the Reference Manual and the Components Writer's Guide. Theseare being continually updated as the system develops.</para></listitem></itemizedlist></chapter><!-- ==================================================== --><chapter ID="ecos-overview"><TITLE><productname>eCos</productname> Overview</TITLE><PARA><productname>eCos</productname> is an open source, configurable,portable, and royalty-free embedded real-time operatingsystem. The following text expands on these core aspects thatdefine <productname>eCos</productname>.</PARA><PARA><productname>eCos</productname> is provided as an open sourceruntime system supported by the GNU open source developmenttools. Developers have full and unfettered access to allaspects of the runtime system. No parts of it are proprietaryor hidden, and you are at liberty to examine, add to, andmodify the code as you deem necessary. These rights aregranted to you and protected by the GNU Public License (GPL).An exception clause has been added to the eCos license whichlimits the circumstances in which the license applies to othercode when used in conjunction with eCos. This exception grantsyou the right to freely develop and distribute applicationsbased on <productname>eCos</productname>. You are not expectedor required to make your embedded applications or anyadditional components that you develop freely available solong as they are not derived from<productname>eCos</productname> code. We of course welcome allcontributions back to <productname>eCos</productname> such asboard ports, device drivers and other components, as thishelps the growth and development of<productname>eCos</productname>, and is of benefit to theentire <productname>eCos</productname> community. See <XREFLINKEND="ecos-licensing"> for more details.</PARA><PARA>One of the key technological innovations in<productname>eCos</productname> is the configurationsystem. The configuration system allows the application writerto impose their requirements on the run-time components, bothin terms of their functionality and implementation, whereastraditionally the operating system has constrained theapplication's own implementation. Essentially, this enables<productname>eCos</productname> developers to create their ownapplication-specific operating system and makes<productname>eCos</productname> suitable for a wide range ofembedded uses. Configuration also ensures that the resourcefootprint of <productname>eCos</productname> is minimized asall unnecessary functionality and features are removed. Theconfiguration system also presents<productname>eCos</productname> as a componentarchitecture. This provides a standardized mechanism forcomponent suppliers to extend the functionality of<productname>eCos</productname> and allows applications to bebuilt from a wide set of optional configurable run-timecomponents. Components can be provided from a variety ofsources including: the standard<productname>eCos</productname> release; commercial thirdparty developers or open source contributors.</PARA><PARA>The royalty-free nature of <productname>eCos</productname> means that you can develop anddeploy your application using the standard <productname>eCos</productname> release withoutincurring any royalty charges. In addition, there are no up-frontlicense charges for the <productname>eCos</productname> runtime source code and associatedtools. We provide, without charge, everything necessary for basicembedded applications development.</PARA><PARA><productname>eCos</productname> is designed to be portable to awide range of target architectures and target platforms including 16,32, and 64 bit architectures, MPUs, MCUs and DSPs. The<productname>eCos</productname> kernel, libraries and runtimecomponents are layered on the Hardware Abstraction Layer (HAL), andthus will run on any target once the HAL and relevant device drivershave been ported to the target's processor architecture andboard. Currently <productname>eCos</productname> supports a largerange of different target architectures:</para><itemizedlist><listitem><para>ARM, Intel StrongARM and XScale</para></listitem><listitem><para>Fujitsu FR-V</para></listitem><listitem><para>Hitachi SH2/3/4</para></listitem><listitem><para>Hitachi H8/300H </para></listitem><listitem><para>Intel x86</para></listitem><listitem><para>MIPS</para></listitem><listitem><para>Matsushita AM3x</para></listitem><listitem><para>Motorola PowerPC</para></listitem><listitem><para>Motorola 68k/Coldfire</para></listitem><listitem><para>NEC V850</para></listitem><listitem><para>Sun SPARC</para></listitem></itemizedlist><para>including many of the popular variants of these architecturesand evaluation boards.</PARA><PARA><productname>eCos</productname> has been designed to supportapplications with real-time requirements, providing features such asfull preemptability, minimal interrupt latencies, and all thenecessary synchronization primitives, scheduling policies, andinterrupt handling mechanisms needed for these type ofapplications. <productname>eCos</productname> also provides all thefunctionality required for general embedded application supportincluding device drivers, memory management, exception handling, C,math libraries, etc. In addition to runtime support, the<productname>eCos</productname> system includes all the toolsnecessary to develop embedded applications, including<productname>eCos</productname> software configuration and buildtools, and GNU based compilers, assemblers, linkers, debuggers, andsimulators.</PARA><PARA>To get the most out of <productname>eCos</productname> youshould visit the <productname>eCos</productname> open sourcedevelopers site: <ULINKURL="http://sources.redhat.com/ecos/">http://sources.redhat.com/ecos/</ULINK>.</para><PARA>The site is dedicated to the <productname>eCos</productname>developer community and contains a rich set of resourcesincluding news, FAQ, online documentation, installation guide,discussion and announcement mailing lists, and runtime anddevelopment tools downloads. The site also supports anonymousCVS and WEBCVS access to provide direct access to the latest<productname>eCos</productname> source base. </PARA><PARA><productname>eCos</productname> is released as open sourcesoftware because we believe that this is the most effectivesoftware development model, and that it provides the greatestbenefit to the embedded developer community as a whole. As partof this endeavor, we seek the input and participation of<productname>eCos</productname> developers in its continuingevolution. Participation can take many forms including:</PARA><ITEMIZEDLIST><LISTITEM><PARA>providing us with feedback on how <productname>eCos</productname> might be made moreuseful to you - by taking part in the ongoing mailing list discussionsand by submitting problem reports covering bugs, documentation issues,and missing features</PARA></LISTITEM><LISTITEM><PARA>contributing bug fixes and enhancement patches</PARA></LISTITEM><LISTITEM><PARA>contributing new code including device drivers, boardports, libraries, and other runtime components</PARA></LISTITEM></ITEMIZEDLIST><PARA>Our long term aim is to make <productname>eCos</productname> arich and ubiquitous standard infrastructure for the development ofdeeply embedded applications. This will be achieved with theassistance of the <productname>eCos</productname> developer communitycooperating to improve <productname>eCos</productname> for all. Wewould like to take this opportunity to extend our thanks to the many<productname>eCos</productname> developers who have alreadycontributed feedback, ideas, patches, and code that have augmented andimproved this release.</PARA><para><emphasis>The <productname>eCos</productname> Maintainers</emphasis></para></chapter><!-- ==================================================== --><chapter ID="ecos-licensing"><TITLE><productname>eCos</productname> Licence Overview</TITLE><para>As of May 2002, <productname>eCos</productname> is releasedunder a modified version of the well known <ulinkurl="http://www.gnu.org/copyleft/gpl.html">GNU General Public License(GPL)</ulink>, now making it an <ulinkurl="http://www.gnu.org/philosophy/license-list.html">officialGPL-compatible Free Software License</ulink>. An exception clause hasbeen added to the <productname>eCos</productname> license which limitsthe circumstances in which the license applies to other code when usedin conjunction with <productname>eCos</productname>. The exceptionclause is as follows:</para><programlisting width=72>As a special exception, if other files instantiate templates or use macrosor inline functions from this file, or you compile this file and link itwith other works to produce a work based on this file, this file does notby itself cause the resulting work to be covered by the GNU General PublicLicense. However the source code for this file must still be madeavailable in accordance with section (3) of the GNU General PublicLicense.This exception does not invalidate any other reasons why a work based onthis file might be covered by the GNU General Public License.</programlisting><para>The goal of the license is to serve the<productname>eCos</productname> user community as a whole. It allowsall <productname>eCos</productname> users to develop products withoutpaying anybody anything, no matter how many developers are working onthe product or how many units will be shipped. The license alsoguarantees that the <productname>eCos</productname> source code willalways be freely available. This applies not only to the core<productname>eCos</productname> code itself but also to any changesthat anybody makes to the core. In particular, it should prevent anycompany or individual contributing code to the system and then laterclaiming that all <productname>eCos</productname> users are now guiltyof copyright or patent infringements and have to pay royalties. Itshould also prevent any company from making some small improvements,calling the result a completely new system, and releasing this under anew and less generous license.</para><para>The license does <emphasis>not</emphasis> require users torelease the source code of any <emphasis>applications</emphasis> thatare developed with <productname>eCos</productname>. However, ifanybody makes any changes to code covered by the<productname>eCos</productname> license, or writes new files derivedin any way from <productname>eCos</productname> code, then we believethat the entire user community should have the opportunity to benefitfrom this. The license stipulates that these changes must be madeavailable in source code form to all recipients of binaries based onthe modified code, either by including the sources along with thebinaries you deliver (or with any device containing such binaries) orwith a written offer to supply the source code to the general publicfor three years. It is perhaps most practical for<productname>eCos</productname> developers to make the source codeavailable online and inform those who are receiving binariescontaining <productname>eCos</productname> code, and probably also the<productname>eCos</productname> maintainers, about the location of thecode. See the <ulink url="http://www.gnu.org/copyleft/gpl.html">fulltext of the GPL</ulink> for the most authoritative definition of theobligations.</para><para>Although it is not strictly necessary to contribute the modifiedcode back to the <productname>eCos</productname> open source project,we are always pleased to receive code contributions and hope thatdevelopers will also be keen to give back in return for what theyreceived from the <productname>eCos</productname> project completelyfree of charge. The <productname>eCos</productname> maintainers areresponsible for deciding whether such contributions should be appliedto the public repository. In addition, a <ulinkurl="http://sources.redhat.com/ecos/assign.html">copyrightassignment</ulink> is required for any significant changes to the core<productname>eCos</productname> packages.</para><para>The result is a royalty-free system with minimal obligations onthe part of application developers. This has resulted in the rapiduptake of <productname>eCos</productname>. At the same time,<productname>eCos</productname> is fully open source with all thebenefits that implies in terms of quality and innovation. We believethat this is a winning combination.</para><sect1 id="ecos-licensing-qna"><title>Questions and answers</title><para>The following queries provide some clarification as to theimplications of the <productname>eCos</productname> license. They donot consititute part of the legal meaning of the license.</para><para><emphasis>Q.</emphasis> What is the effect of the<productname>eCos</productname> license?</para><para><emphasis>A.</emphasis> In the simplest terms, when youdistribute anything containing <productname>eCos</productname> code,you must make the source code to <productname>eCos</productname>available under the terms of the GPL.</para><para><emphasis>Q.</emphasis> What if I make changes to<productname>eCos</productname>, or write new code based on<productname>eCos</productname> code?</para><para><emphasis>A.</emphasis> Then you must make those changesavailable as well.</para><para><emphasis>Q.</emphasis> Do I have to distribute the sourcecode to my application? Isn't the GPL "viral"?</para><para><emphasis>A.</emphasis> You do not have to distribute anycode under the terms of the GPL other than<productname>eCos</productname> code or code derived from<productname>eCos</productname>. For example, if you write a HAL portbased on copying an existing <productname>eCos</productname> HAL inany way, you must make the source code available with thebinary. However you would not need to make available any other code,such as the code of a wholly separate application linked with<productname>eCos</productname>.</para><para><emphasis>Q.</emphasis> I would rather stick with theRHEPL code, but I updated my anonymous CVS checkout.</para><para><emphasis>A.</emphasis> You can check out the finalversion of anonymous CVS before the license change using the CVS tag<literal>last-rhepl</literal>. See <ulinkurl="http://sources.redhat.com/ecos/anoncvs.html">the anonymous CVSaccess page</ulink>for details.</para></sect1><sect1 id="ecos-licensing-previous"><title>Previous License</title><para>Prior to May 2002, <productname>eCos</productname> was released underthe <ulink url="http://sources.redhat.com/ecos/old-license.html">RedHat eCos Public License (RHEPL)</ulink>. The RHEPL required anymodifications to <productname>eCos</productname> code to be madeavailable under preferential terms to Red Hat and was thereforeincompatible with code licensed under the GPL. The use of<productname>eCos</productname> source code which was licensed underthe RHEPL is not affected by the switch to the modified GPL for laterrevisions.</para></sect1></chapter><!-- ==================================================== --><chapter id="notation-and-conventions"><title>Notation and Conventions</title><para>Since there are many supported target architectures, notationconventions are used in this manual to avoid repeating instructionsthat are very similar.</para><SECT1 ID="GDB-AND-GCC-COMMAND-NOTATION"><!-- <index></index> --><!-- <xref> --><TITLE>GDB and <!-- <index></index> -->GCC Command Notation</TITLE><para>Cross-development commands like <COMMAND>gcc</COMMAND> and<COMMAND>gdb</COMMAND> will be shown with a<replaceable>TARGET-</replaceable> prefix. You need to replace<replaceable>TARGET-</replaceable> with the correct prefix beforeusing the command. Just using <command>gcc</command> or<command>gdb</command> will use the tools for the host, which is not(usually) what you want.</para><para>For example use <command>arm-elf-gcc</command> and<command>arm-elf-gdb</command> for ARM, Thumb, and StrongARM targets.Use <command>xscale-elf-gcc</command> and<command>xscale-elf-gdb</command> for Intel Xscale targets.Use <command>i386-elf-gcc</command> and<command>i386-elf-gdb</command> for IA32 targets. And so on, the exactprefix to use is shown in the documentation for each target.</para><PARA>Note that some versions of the GCC cross compiler generateexecutable files with the <FILENAME>.exe</FILENAME> suffix on Windows,but not on Linux. The suffix <FILENAME>.exe</FILENAME> will be omittedfrom executable file names, so you will see <FILENAME>hello</FILENAME>instead of <FILENAME>hello.exe</FILENAME>.</PARA></sect1><SECT1 ID="DIRECTORY-AND-FILE-SYSTEM-CONVENTIONS"><!-- <index></index> --><TITLE>Directory and File System Conventions</TITLE><PARA>The default directory for installing<productname>eCos</productname> on Windows (usually<FILENAME>C:/Program Files/eCos</FILENAME>) is different from that onLinux (usually <FILENAME>/opt/ecos</FILENAME>). Since many commandline examples in the tutorials use these paths, this default (base)directory will be cited as <replaceable>BASE_DIR</replaceable>.</PARA><PARA>Windows and Linux have a similar file system syntax, but theMS-DOS command interpreter on Windows uses the backslash character(\) as a path separator, while Linux and POSIX shells (includingthe Cygwin bash shell for windows) use the forward slash (/).</PARA><PARA>This document will use the POSIX shell convention of forwardslashes throughout.</PARA></SECT1><!-- ==================================================== --><SECT1 ID="VERSION-CONVENTIONS"><TITLE>Version Conventions</TITLE><para>This manual does not refer explicitly to any particular version of<productname>eCos</productname>. However, version numbers form part ofmany file path names. In all of these places the version number willbe shown like this: <replaceable>&Version;</replaceable>.</para><para>If you have used anonymous CVS to check<productname>eCos</productname> out of the CVS repository, the versionnumber will always be <literal>current</literal>, since that is thename of the directory in the repository. When a stable release is madethis directory name is changed, in the release, to the number of therelease, for example <literal>v2_0</literal> or<literal>v2_1</literal>.</para></SECT1></chapter><chapter id="documentation-roadmap"><title>Documentation Roadmap</title><para>The <productname>eCos</productname> documentation is divided into athree main parts:</para><VARIABLELIST><VARLISTENTRY><TERM><EMPHASIS>User Guide</EMPHASIS></TERM><LISTITEM><PARA>This document. It includes the following sections:</PARA><VARIABLELIST><VARLISTENTRY><TERM>Installing <productname>eCos</productname></TERM><LISTITEM><para>This section describes how to install the<productname>eCos</productname> software, how to set up yourhardware and how to test that it is all working.</para></listitem></varlistentry><VARLISTENTRY><TERM>Programming Under <productname>eCos</productname></TERM><LISTITEM><para>This section describes how to write programs that run under<productname>eCos</productname> by running through some examples.</para></listitem></varlistentry><VARLISTENTRY><TERM>The <productname>eCos</productname> <application>Configuration Tool</application></TERM><LISTITEM><para>This section describes the <productname>eCos</productname> graphicalconfiguration tool and how to use it to change how<productname>eCos</productname> behaves.</para></listitem></varlistentry><VARLISTENTRY><TERM><productname>eCos</productname> Programming Concepts and Techniques</TERM><LISTITEM><PARA>An explanation of the <productname>eCos</productname> programmingcycle, and a description of some debugging facilities that<productname>eCos</productname> offers.</PARA></listitem></varlistentry><VARLISTENTRY><TERM>Configuration and the PackageRepository</TERM><LISTITEM><PARA>Information on how to configure <productname>eCos</productname>manually, including a reference on the<command>ecosconfig</command> command, memory layouts,and information on how to manage a package repositoryusing the <productname>eCos</productname> Package AdministrationTool.</PARA></LISTITEM></VARLISTENTRY></variablelist></LISTITEM></VARLISTENTRY><VARLISTENTRY><TERM><EMPHASIS>Reference Guide</EMPHASIS></TERM><LISTITEM><PARA>The Reference Guide provides detailed documentation on variousaspects of <productname>eCos</productname>. This document is beingconstantly updated, so the following list just mentions the moreimportant sections, take a look at the guide itself for the fullstory.</PARA><variablelist><VARLISTENTRY><TERM>The <productname>eCos</productname> Kernel</TERM><LISTITEM><PARA>In-depth description of <productname>eCos</productname>"snative C kernel API Important considerations are givenfor programming the <productname>eCos</productname>kernel. The semantics for each kernel function aredescribed, including how they are affected byconfiguration. </PARA></LISTITEM></VARLISTENTRY><VARLISTENTRY><TERM>POSIX and µITRON APIs</TERM><LISTITEM><PARA>A description of the POSIX and µITRON APIs and how theyare supported under <productname>eCos</productname>.</para></LISTITEM></VARLISTENTRY><VARLISTENTRY><TERM>The <productname>eCos</productname> Hardware Abstraction Layer (HAL)</TERM><LISTITEM><PARA>A description of the structure and functionality of the<productname>eCos</productname> HAL. This section also includes aporting guide to help moving <productname>eCos</productname> todifferent platforms.</para></LISTITEM></VARLISTENTRY><VARLISTENTRY><TERM>Device Drivers</TERM><LISTITEM><PARA>A description of the philosophy behind<productname>eCos</productname> device drivers, as well as apresentation of the C language APIs for using the currentdevice drivers. </PARA><para>Device driver support includes serial, ethernet and FLASH devices,and support for PCI, PCMCIA and USB interconnects.</para></LISTITEM></VARLISTENTRY><VARLISTENTRY><TERM>RedBoot User's Guide</TERM><LISTITEM><PARA>This describes RedBoot, which provides a complete bootstrapenvironment for a range of embedded operating systems, such asembedded Linux and <productname>eCos</productname>, andincludes facilities such as network downloading anddebugging. It also provides a simple flash file system forboot images.</para></LISTITEM></VARLISTENTRY><VARLISTENTRY><TERM>TCP/IP Stack Support</TERM><LISTITEM><PARA>This describes the Common Networking for<productname>eCos</productname> package, which providessupport for a complete TCP/IP networking stack. The designallows for the actual stack to be modular and at the currenttime two different implementations, one based on OpenBSD from2000 and a new version based on FreeBSD, are available.</para><para>Other components related to networking, including support forSNMP, DNS, HTTP and FTP, are also described.</para></LISTITEM></VARLISTENTRY></variablelist></LISTITEM></VARLISTENTRY><VARLISTENTRY><TERM><EMPHASIS>Component Writer's Guide</EMPHASIS></TERM><LISTITEM><PARA>The Component Writer's Guide is intended for developers who needto add or modify parts of <productname>eCos</productname> itself. Itdescribes the following things:</PARA><VARIABLELIST><VARLISTENTRY><TERM>Overview</TERM><LISTITEM><PARA>An explanation of the configuration technology used in<productname>eCos</productname>, why it is done this way, how itworks and the terminology used.</para></LISTITEM></VARLISTENTRY><VARLISTENTRY><TERM>Package Organization</TERM><LISTITEM><PARA>A description of the <productname>eCos</productname> packagerepository, how it is organized and how packages themselves areorganized.</para></LISTITEM></VARLISTENTRY><VARLISTENTRY><TERM>The CDL Language</TERM><LISTITEM><PARA>A description of the CDL language and how it is used tocontrol the configuration of <productname>eCos</productname>components. The document also contains a complete specification ofthe language.</para></LISTITEM></VARLISTENTRY><VARLISTENTRY><TERM>The Build Process</TERM><LISTITEM><PARA>A description of what happens once a configuration has beencreated and must be built into a set of executables.</para></LISTITEM></VARLISTENTRY></variablelist></LISTITEM></VARLISTENTRY></variablelist></chapter></part>
