⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 using-ecosconfig-on-linux.html

📁 有关ecos2。0介绍了实时嵌入式的结构以及线程调度的实现和内存的管理等
💻 HTML
字号:
<!-- Copyright (C) 2003 Red Hat, Inc.                                --><!-- 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 is obtained from the copyright holder.               --><HTML><HEAD><TITLE>Ecosconfig on Windows and Linux Quick Start</TITLE><meta name="MSSmartTagsPreventParsing" content="TRUE"><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+"><LINKREL="HOME"TITLE="eCos User Guide"HREF="ecos-user-guide.html"><LINKREL="UP"TITLE="Configuring and Building eCos from Source"HREF="configuring-and-building-ecos-from-source.html"><LINKREL="PREVIOUS"TITLE="Configuration Tool on Windows and Linux Quick Start"HREF="using-configtool-windows-linux.html"><LINKREL="NEXT"TITLE="Running an eCos Test Case"HREF="running-an-ecos-test-case.html"></HEAD><BODYCLASS="SECT1"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLESUMMARY="Header navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">eCos User Guide</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="using-configtool-windows-linux.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Chapter 11. Configuring and Building <SPANCLASS="PRODUCTNAME">eCos</SPAN> from Source</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="running-an-ecos-test-case.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECT1"><H1CLASS="SECT1"><ANAME="USING-ECOSCONFIG-ON-LINUX">Ecosconfig on Windows and Linux Quick Start</H1><P>As an alternative to using the graphical<SPANCLASS="APPLICATION">Configuration Tool</SPAN>, it is still possible toconfigure and build a kernel by editing a configuration file manuallyand using the <BCLASS="COMMAND">ecosconfig</B> command. </P><P>Manual configuration and the <BCLASS="COMMAND">ecosconfig</B> command aredescribed in detail in <AHREF="manual-configuration.html">Chapter 28</A>.</P><P>To use the <BCLASS="COMMAND">ecosconfig</B> command you need to start ashell. In Windows you need to start a<SPANCLASS="PRODUCTNAME">CygWin</SPAN> <BCLASS="COMMAND">bash</B> shell, not aDOS command line.</P><P>The following instructions assume that the<TTCLASS="LITERAL">PATH</TT> and <TTCLASS="LITERAL">ECOS_REPOSITORY</TT>environment variables have been setup correctly as described in <AHREF="user-guide-installation-linux.html">Chapter 7</A>.  They also assume Linuxusage but equally well apply to Windows running Cygwin.</P><P>Before invoking <BCLASS="COMMAND">ecosconfig</B> you need tochoose a directory in which to work. For the purposes of this tutorial,the default path will be <TTCLASS="FILENAME"><TTCLASS="REPLACEABLE"><I>BASE_DIR</I></TT>/ecos-work</TT>.Create this directory and change to it by typing: </P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">$ mkdir <TTCLASS="REPLACEABLE"><I>BASE_DIR</I></TT>/ecos-work$ cd <TTCLASS="REPLACEABLE"><I>BASE_DIR</I></TT>/ecos-work</PRE></TD></TR></TABLE><P>To see what options can be used with <BCLASS="COMMAND">ecosconfig</B>,type: </P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">$ ecosconfig --help</PRE></TD></TR></TABLE><P>The available packages, targets and templates may be listedas follows:</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">$ ecosconfig list</PRE></TD></TR></TABLE><P>Here is sample output from <BCLASS="COMMAND">ecosconfig</B> showingthe usage message.</P><DIVCLASS="EXAMPLE"><ANAME="AEN683"><P><B>Example 11-1. Getting  help from ecosconfig</B></P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">$ ecosconfig --helpUsage: ecosconfig [ qualifier ... ] [ command ]  commands are:    list                                       : list repository contents    new TARGET [ TEMPLATE [ VERSION ] ]        : create a configuration    target TARGET                              : change the target hardware    template TEMPLATE [ VERSION ]              : change the template    add PACKAGE [ PACKAGE ... ]                : add package(s)    remove PACKAGE [ PACKAGE ... ]             : remove package(s)    version VERSION PACKAGE [ PACKAGE ... ]    : change version of package(s)    export FILE                                : export minimal config info    import FILE                                : import additional config info    check                                      : check the configuration    resolve                                    : resolve conflicts    tree                                       : create a build tree  qualifiers are:    --config=FILE                              : the configuration file    --prefix=DIRECTORY                         : the install prefix    --srcdir=DIRECTORY                         : the source repository    --no-resolve                               : disable conflictresolution    --version                                  : show version and copyright$</PRE></TD></TR></TABLE></DIV><DIVCLASS="EXAMPLE"><ANAME="AEN686"><P><B>Example 11-2. ecosconfig output &#8212; list of available packages, targets and templates</B></P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">$ ecosconfig listPackage CYGPKG_CYGMON (CygMon support via eCos): aliases: cygmon versions: &#60;version&#62; Package CYGPKG_DEVICES_WALLCLOCK_DALLAS_DS1742 (Wallclock driver for Dallas 1742): aliases: devices_wallclock_ds1742 device_wallclock_ds1742 versions: &#60;version&#62; Package CYGPKG_DEVICES_WALLCLOCK_SH3 (Wallclock driver for SH3 RTC module): aliases: devices_wallclock_sh3 device_wallclock_sh3 versions: &#60;version&#62; Package CYGPKG_DEVICES_WATCHDOG_ARM_AEB (Watchdog driver for ARM/AEB board): aliases: devices_watchdog_aeb device_watchdog_aeb versions: &#60;version&#62; Package CYGPKG_DEVICES_WATCHDOG_ARM_EBSA285 (Watchdog driver for ARM/EBSA285 board): aliases: devices_watchdog_ebsa285 device_watchdog_ebsa285 versions: &#60;version&#62; &#8230;</PRE></TD></TR></TABLE></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN689">Selecting a  Target</H2><P>To configure for a listed target, type: </P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">$ ecosconfig new &lt;target&#62;</PRE></TD></TR></TABLE><P>For example, to configure for the ARM PID development board,type: </P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">$ ecosconfig new pid</PRE></TD></TR></TABLE><P>You can then edit the generated file,<TTCLASS="FILENAME">ecos.ecc</TT>, setting the options as required for thetarget (endianess, CPU model, Startup type, etc.).  For detailedinformation about how to edit the <TTCLASS="FILENAME">ecos.ecc</TT> file,see the <ICLASS="CITETITLE">CDL Writer's Guide</I> and <AHREF="editing-an-ecos-savefile.html">the Section called <I>Editing an <SPANCLASS="PRODUCTNAME">eCos</SPAN> Savefile</I> in Chapter 28</A>.</P><P>Create a build tree for the configured target by typing:</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">$ ecosconfig tree</PRE></TD></TR></TABLE><P>If there are any problem with the configuration,<BCLASS="COMMAND">ecosconfig</B> will tell you. The most likely cause ofthis is mistakes when editing the <TTCLASS="FILENAME">ecos.ecc</TT> file.You can check whether the configuration you have made is correct,without building the tree with the following command:</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">$ ecosconfig check</PRE></TD></TR></TABLE><P>If this reports any conflicts you can get<BCLASS="COMMAND">ecosconfig</B> to try and resolve them itself by typing:</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">$ ecosconfig resolve</PRE></TD></TR></TABLE><P>See <AHREF="conflicts-and-constraints.html">the Section called <I>Conflicts and constraints</I> in Chapter 28</A> for more details.</P><P>You can now run the command <BCLASS="COMMAND">make</B> or <BCLASS="COMMAND">maketests</B>, after which you will be at the same point youwould be after running the <SPANCLASS="APPLICATION">Configuration Tool</SPAN>&#8212; you can start developing your own applications,following the steps in <AHREF="building-and-running-sample-appliations.html">Chapter 13</A>. </P><P>The procedure shown above allows you to do very coarse-grainedconfiguration of the <SPANCLASS="PRODUCTNAME">eCos</SPAN> kernel: you can select which packagesto include in your kernel, and give target and start-up options.But you cannot select components within a package, or set the veryfine-grained options. </P><P>To select fine-grained configuration options you will need toedit the configuration file <TTCLASS="FILENAME">ecos.ecc</TT> in thecurrent directory and regenerate the build tree.</P><DIVCLASS="CAUTION"><P></P><TABLECLASS="CAUTION"BORDER="1"WIDTH="100%"><TR><TDALIGN="CENTER"><B>Caution</B></TD></TR><TR><TDALIGN="LEFT"><P>You should follow the manual configuration process describedabove very carefully, and you should read the comments in each fileto see when one option depends on other options or packages beingenabled or disabled. If you do not, you might end up with an inconsistentlyconfigured kernel which could fail to build or might executeincorrectly.</P></TD></TR></TABLE></DIV></DIV></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="using-configtool-windows-linux.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="ecos-user-guide.html"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="running-an-ecos-test-case.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Configuration Tool on Windows and Linux Quick Start</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="configuring-and-building-ecos-from-source.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Running an <SPANCLASS="PRODUCTNAME">eCos</SPAN> Test Case</TD></TR></TABLE></DIV></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -