<!-- Copyright (C) 2003 Red Hat, Inc. -->
|
<!-- Copyright (C) 2003 Red Hat, Inc. -->
|
<!-- This material may be distributed only subject to the terms -->
|
<!-- This material may be distributed only subject to the terms -->
|
<!-- and conditions set forth in the Open Publication License, v1.0 -->
|
<!-- and conditions set forth in the Open Publication License, v1.0 -->
|
<!-- or later (the latest version is presently available at -->
|
<!-- or later (the latest version is presently available at -->
|
<!-- http://www.opencontent.org/openpub/). -->
|
<!-- http://www.opencontent.org/openpub/). -->
|
<!-- Distribution of the work or derivative of the work in any -->
|
<!-- Distribution of the work or derivative of the work in any -->
|
<!-- standard (paper) book form is prohibited unless prior -->
|
<!-- standard (paper) book form is prohibited unless prior -->
|
<!-- permission is obtained from the copyright holder. -->
|
<!-- permission is obtained from the copyright holder. -->
|
<HTML
|
<HTML
|
><HEAD
|
><HEAD
|
><TITLE
|
><TITLE
|
>Building the System</TITLE
|
>Building the System</TITLE
|
><meta name="MSSmartTagsPreventParsing" content="TRUE">
|
><meta name="MSSmartTagsPreventParsing" content="TRUE">
|
<META
|
<META
|
NAME="GENERATOR"
|
NAME="GENERATOR"
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
|
"><LINK
|
"><LINK
|
REL="HOME"
|
REL="HOME"
|
TITLE="eCos User Guide"
|
TITLE="eCos User Guide"
|
HREF="ecos-user-guide.html"><LINK
|
HREF="ecos-user-guide.html"><LINK
|
REL="UP"
|
REL="UP"
|
TITLE="Manual Configuration"
|
TITLE="Manual Configuration"
|
HREF="manual-configuration.html"><LINK
|
HREF="manual-configuration.html"><LINK
|
REL="PREVIOUS"
|
REL="PREVIOUS"
|
TITLE="Conflicts and constraints"
|
TITLE="Conflicts and constraints"
|
HREF="conflicts-and-constraints.html"><LINK
|
HREF="conflicts-and-constraints.html"><LINK
|
REL="NEXT"
|
REL="NEXT"
|
TITLE="Packages"
|
TITLE="Packages"
|
HREF="ecos-packages.html"></HEAD
|
HREF="ecos-packages.html"></HEAD
|
><BODY
|
><BODY
|
CLASS="SECT1"
|
CLASS="SECT1"
|
BGCOLOR="#FFFFFF"
|
BGCOLOR="#FFFFFF"
|
TEXT="#000000"
|
TEXT="#000000"
|
LINK="#0000FF"
|
LINK="#0000FF"
|
VLINK="#840084"
|
VLINK="#840084"
|
ALINK="#0000FF"
|
ALINK="#0000FF"
|
><DIV
|
><DIV
|
CLASS="NAVHEADER"
|
CLASS="NAVHEADER"
|
><TABLE
|
><TABLE
|
SUMMARY="Header navigation table"
|
SUMMARY="Header navigation table"
|
WIDTH="100%"
|
WIDTH="100%"
|
BORDER="0"
|
BORDER="0"
|
CELLPADDING="0"
|
CELLPADDING="0"
|
CELLSPACING="0"
|
CELLSPACING="0"
|
><TR
|
><TR
|
><TH
|
><TH
|
COLSPAN="3"
|
COLSPAN="3"
|
ALIGN="center"
|
ALIGN="center"
|
>eCos User Guide</TH
|
>eCos User Guide</TH
|
></TR
|
></TR
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="10%"
|
WIDTH="10%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
><A
|
><A
|
HREF="conflicts-and-constraints.html"
|
HREF="conflicts-and-constraints.html"
|
ACCESSKEY="P"
|
ACCESSKEY="P"
|
>Prev</A
|
>Prev</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="80%"
|
WIDTH="80%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
>Chapter 28. Manual Configuration</TD
|
>Chapter 28. Manual Configuration</TD
|
><TD
|
><TD
|
WIDTH="10%"
|
WIDTH="10%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
><A
|
><A
|
HREF="ecos-packages.html"
|
HREF="ecos-packages.html"
|
ACCESSKEY="N"
|
ACCESSKEY="N"
|
>Next</A
|
>Next</A
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
><HR
|
><HR
|
ALIGN="LEFT"
|
ALIGN="LEFT"
|
WIDTH="100%"></DIV
|
WIDTH="100%"></DIV
|
><DIV
|
><DIV
|
CLASS="SECT1"
|
CLASS="SECT1"
|
><H1
|
><H1
|
CLASS="SECT1"
|
CLASS="SECT1"
|
><A
|
><A
|
NAME="BUILDING-THE-SYSTEM">Building the System</H1
|
NAME="BUILDING-THE-SYSTEM">Building the System</H1
|
><P
|
><P
|
>Once a build tree has been generated with
|
>Once a build tree has been generated with
|
<B
|
<B
|
CLASS="COMMAND"
|
CLASS="COMMAND"
|
>ecosconfig</B
|
>ecosconfig</B
|
>, building <SPAN
|
>, building <SPAN
|
CLASS="PRODUCTNAME"
|
CLASS="PRODUCTNAME"
|
>eCos</SPAN
|
>eCos</SPAN
|
> is straightforward:</P
|
> is straightforward:</P
|
><TABLE
|
><TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="SCREEN"
|
CLASS="SCREEN"
|
>$ make</PRE
|
>$ make</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
><P
|
><P
|
>The build tree contains the subdirectories, makefiles,
|
>The build tree contains the subdirectories, makefiles,
|
and everything else that is needed to generate the default
|
and everything else that is needed to generate the default
|
configuration for the selected architecture and platform.
|
configuration for the selected architecture and platform.
|
The only requirement is that the tools needed for that
|
The only requirement is that the tools needed for that
|
architecture, for example
|
architecture, for example
|
<B
|
<B
|
CLASS="COMMAND"
|
CLASS="COMMAND"
|
>powerpc-eabi-g++</B
|
>powerpc-eabi-g++</B
|
>,
|
>,
|
are available using the standard search path. If this is not
|
are available using the standard search path. If this is not
|
the case then the <B
|
the case then the <B
|
CLASS="COMMAND"
|
CLASS="COMMAND"
|
>make</B
|
>make</B
|
> will
|
> will
|
fail with an error message. If you have a multiprocessor
|
fail with an error message. If you have a multiprocessor
|
system then it may be more efficient to use:</P
|
system then it may be more efficient to use:</P
|
><TABLE
|
><TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="SCREEN"
|
CLASS="SCREEN"
|
>$ make -j <TT
|
>$ make -j <TT
|
CLASS="REPLACEABLE"
|
CLASS="REPLACEABLE"
|
><I
|
><I
|
>n</I
|
>n</I
|
></TT
|
></TT
|
></PRE
|
></PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
><P
|
><P
|
>where <TT
|
>where <TT
|
CLASS="REPLACEABLE"
|
CLASS="REPLACEABLE"
|
><I
|
><I
|
>n</I
|
>n</I
|
></TT
|
></TT
|
> is equal to the
|
> is equal to the
|
number of processors on your system.</P
|
number of processors on your system.</P
|
><P
|
><P
|
>Once the <B
|
>Once the <B
|
CLASS="COMMAND"
|
CLASS="COMMAND"
|
>make</B
|
>make</B
|
> process
|
> process
|
has completed, the install tree will contain the header
|
has completed, the install tree will contain the header
|
files and the target library that are needed for application
|
files and the target library that are needed for application
|
development. </P
|
development. </P
|
><P
|
><P
|
>It is also possible to build the system’s test cases
|
>It is also possible to build the system’s test cases
|
for the current configuration:</P
|
for the current configuration:</P
|
><TABLE
|
><TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="SCREEN"
|
CLASS="SCREEN"
|
>$ make tests</PRE
|
>$ make tests</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
><P
|
><P
|
>The resulting test executables will end up in a
|
>The resulting test executables will end up in a
|
<TT
|
<TT
|
CLASS="FILENAME"
|
CLASS="FILENAME"
|
>tests</TT
|
>tests</TT
|
> subdirectory of the
|
> subdirectory of the
|
install tree. </P
|
install tree. </P
|
><P
|
><P
|
>If disk space is scarce then it is possible to make the copy
|
>If disk space is scarce then it is possible to make the copy
|
of the install tree for application development purposes, and then
|
of the install tree for application development purposes, and then
|
use: </P
|
use: </P
|
><TABLE
|
><TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="SCREEN"
|
CLASS="SCREEN"
|
>$ make clean</PRE
|
>$ make clean</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
><P
|
><P
|
>The build tree will now use up a minimum of disk space — the
|
>The build tree will now use up a minimum of disk space — the
|
bulk of what is left consists of configuration header files that
|
bulk of what is left consists of configuration header files that
|
you may have edited and hence should not be deleted automatically.
|
you may have edited and hence should not be deleted automatically.
|
However, it is possible to rebuild the system at any time without
|
However, it is possible to rebuild the system at any time without
|
re-invoking <B
|
re-invoking <B
|
CLASS="COMMAND"
|
CLASS="COMMAND"
|
>ecosconfig</B
|
>ecosconfig</B
|
>, just by
|
>, just by
|
running <B
|
running <B
|
CLASS="COMMAND"
|
CLASS="COMMAND"
|
>make</B
|
>make</B
|
> again. </P
|
> again. </P
|
><P
|
><P
|
>Under exceptional circumstances it may be necessary to run <B
|
>Under exceptional circumstances it may be necessary to run <B
|
CLASS="COMMAND"
|
CLASS="COMMAND"
|
>make
|
>make
|
clean</B
|
clean</B
|
> for other reasons, such as when a new release
|
> for other reasons, such as when a new release
|
of the toolchain is installed. The toolchain includes a number of
|
of the toolchain is installed. The toolchain includes a number of
|
header files which are closely tied to the compiler, for example <TT
|
header files which are closely tied to the compiler, for example <TT
|
CLASS="FILENAME"
|
CLASS="FILENAME"
|
>limits.h</TT
|
>limits.h</TT
|
>,
|
>,
|
and these header files are not and should not be duplicated by <SPAN
|
and these header files are not and should not be duplicated by <SPAN
|
CLASS="PRODUCTNAME"
|
CLASS="PRODUCTNAME"
|
>eCos</SPAN
|
>eCos</SPAN
|
>.
|
>.
|
The makefiles perform header file dependency analysis, so that when
|
The makefiles perform header file dependency analysis, so that when
|
a header file is changed all affected sources will be rebuilt during
|
a header file is changed all affected sources will be rebuilt during
|
the next <B
|
the next <B
|
CLASS="COMMAND"
|
CLASS="COMMAND"
|
>make</B
|
>make</B
|
>. This is very useful
|
>. This is very useful
|
when the configuration header files are changed, but it also means
|
when the configuration header files are changed, but it also means
|
that a build tree containing information about the locations of
|
that a build tree containing information about the locations of
|
header files must be rebuilt. If a new version of the toolchain
|
header files must be rebuilt. If a new version of the toolchain
|
is installed and the old version is removed then this location information
|
is installed and the old version is removed then this location information
|
is no longer accurate, and <B
|
is no longer accurate, and <B
|
CLASS="COMMAND"
|
CLASS="COMMAND"
|
>make</B
|
>make</B
|
> will
|
> will
|
complain that certain dependencies cannot be satisfied. Under such circumstances
|
complain that certain dependencies cannot be satisfied. Under such circumstances
|
it is necessary to do a <B
|
it is necessary to do a <B
|
CLASS="COMMAND"
|
CLASS="COMMAND"
|
>make clean</B
|
>make clean</B
|
> first. </P
|
> first. </P
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="NAVFOOTER"
|
CLASS="NAVFOOTER"
|
><HR
|
><HR
|
ALIGN="LEFT"
|
ALIGN="LEFT"
|
WIDTH="100%"><TABLE
|
WIDTH="100%"><TABLE
|
SUMMARY="Footer navigation table"
|
SUMMARY="Footer navigation table"
|
WIDTH="100%"
|
WIDTH="100%"
|
BORDER="0"
|
BORDER="0"
|
CELLPADDING="0"
|
CELLPADDING="0"
|
CELLSPACING="0"
|
CELLSPACING="0"
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="conflicts-and-constraints.html"
|
HREF="conflicts-and-constraints.html"
|
ACCESSKEY="P"
|
ACCESSKEY="P"
|
>Prev</A
|
>Prev</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="34%"
|
WIDTH="34%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="ecos-user-guide.html"
|
HREF="ecos-user-guide.html"
|
ACCESSKEY="H"
|
ACCESSKEY="H"
|
>Home</A
|
>Home</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="ecos-packages.html"
|
HREF="ecos-packages.html"
|
ACCESSKEY="N"
|
ACCESSKEY="N"
|
>Next</A
|
>Next</A
|
></TD
|
></TD
|
></TR
|
></TR
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="top"
|
VALIGN="top"
|
>Conflicts and constraints</TD
|
>Conflicts and constraints</TD
|
><TD
|
><TD
|
WIDTH="34%"
|
WIDTH="34%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="manual-configuration.html"
|
HREF="manual-configuration.html"
|
ACCESSKEY="U"
|
ACCESSKEY="U"
|
>Up</A
|
>Up</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="top"
|
VALIGN="top"
|
>Packages</TD
|
>Packages</TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></DIV
|
></DIV
|
></BODY
|
></BODY
|
></HTML
|
></HTML
|
|
|