Documentation update
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@3505 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
parent
ae6e6bb741
commit
61d99ee51b
|
@ -12,7 +12,7 @@
|
||||||
<h1><big><font color="#3c34ec">
|
<h1><big><font color="#3c34ec">
|
||||||
<i>NuttX RTOS Porting Guide</i>
|
<i>NuttX RTOS Porting Guide</i>
|
||||||
</font></big></h1>
|
</font></big></h1>
|
||||||
<p>Last Updated: April 7, 2011</p>
|
<p>Last Updated: April 14, 2011</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -981,7 +981,11 @@ include/
|
||||||
<ul><pre>
|
<ul><pre>
|
||||||
tools/
|
tools/
|
||||||
|-- Makefile.host
|
|-- Makefile.host
|
||||||
|
|-- README.txt
|
||||||
|-- configure.sh
|
|-- configure.sh
|
||||||
|
|-- cfgparser.c
|
||||||
|
|-- cfgparser.h
|
||||||
|
|-- define.sh
|
||||||
|-- incdir.sh
|
|-- incdir.sh
|
||||||
|-- indent.sh
|
|-- indent.sh
|
||||||
|-- link.sh
|
|-- link.sh
|
||||||
|
@ -990,11 +994,19 @@ tools/
|
||||||
|-- mkimage.sh
|
|-- mkimage.sh
|
||||||
|-- mknulldeps.sh
|
|-- mknulldeps.sh
|
||||||
|-- mkromfsimg.sh
|
|-- mkromfsimg.sh
|
||||||
|
|-- mksyscall.c
|
||||||
|
|-- mkversion.c
|
||||||
|-- unlink.sh
|
|-- unlink.sh
|
||||||
|
|-- version.sh
|
||||||
|-- winlink.sh
|
|-- winlink.sh
|
||||||
`-- zipme
|
`-- zipme.sh
|
||||||
</pre></ul>
|
</pre></ul>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Refer to the README file in the <code>tools</code> directory for more information about the individual files.
|
||||||
|
Some of these tools are discussed below as well in the discussion of <a href="#configandbuild">configuring and building</a> NuttX.
|
||||||
|
</p>
|
||||||
|
|
||||||
<h2>2.16 <a name="topmakefile">nuttx/Makefile</a></h2>
|
<h2>2.16 <a name="topmakefile">nuttx/Makefile</a></h2>
|
||||||
<p>
|
<p>
|
||||||
The top-level <code>Makefile</code> in the <code>${TOPDIR}</code> directory contains all of the top-level control
|
The top-level <code>Makefile</code> in the <code>${TOPDIR}</code> directory contains all of the top-level control
|
||||||
|
@ -1105,13 +1117,58 @@ netutils/
|
||||||
<p>
|
<p>
|
||||||
And if <code>configs/</code><i><board-name></i><code>/[</code><i><config-dir></i><code>/appconfig</code>
|
And if <code>configs/</code><i><board-name></i><code>/[</code><i><config-dir></i><code>/appconfig</code>
|
||||||
exists and your application directory is not in the standard loction (<config>../apps</config>),
|
exists and your application directory is not in the standard loction (<config>../apps</config>),
|
||||||
then you should also specify the location of the application directory on the +command line like:
|
then you should also specify the location of the application directory on the command line like:
|
||||||
</p>
|
</p>
|
||||||
<ul><pre>
|
<ul><pre>
|
||||||
cd tools
|
cd tools
|
||||||
./configure.sh -a <app-dir> <i><board-name></i></i>[/<i><config-dir></i>]
|
./configure.sh -a <app-dir> <i><board-name></i></i>[/<i><config-dir></i>]
|
||||||
</pre></ul>
|
</pre></ul>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<b>Version Files</b>.
|
||||||
|
The NuttX build expects to find a version file located in the top-level NuttX build directory.
|
||||||
|
That version file is called <code>.version</code>.
|
||||||
|
The correct version file is installed in each versioned NuttX released.
|
||||||
|
However, if you are working from an SVN snapshot, then there will be no version file.
|
||||||
|
If there is no version file, the top-level <code>Makefile</code> will create a dummy <code>.version</code> file on the first make.
|
||||||
|
This dummy version file will contain all zeroes for version information.
|
||||||
|
If that is not what you want, they you should run the <code>version.sh</code> script to create a better <code>.version</code> file.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
You can get help information from the <code>version.sh</code> script using the <code>-h</code> option.
|
||||||
|
For example:
|
||||||
|
</p>
|
||||||
|
<ul><pre>
|
||||||
|
$ tools/version.sh -h
|
||||||
|
tools/version.sh is a tool for generation of proper version files for the NuttX build
|
||||||
|
|
||||||
|
USAGE: tools/version.sh [-d|-h] [-b build] -v <major.minor> <outfile-path>
|
||||||
|
|
||||||
|
Where:
|
||||||
|
-d
|
||||||
|
Enable script debug
|
||||||
|
-h
|
||||||
|
show this help message and exit
|
||||||
|
-v <major.minor>
|
||||||
|
The NuttX version number expressed a major and minor number separated
|
||||||
|
by a period
|
||||||
|
<outfile-path>
|
||||||
|
The full path to the version file to be created
|
||||||
|
</pre></ul>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
As an example, the following command will generate a version file for version 6.1 using the current SVN revision number:
|
||||||
|
</p>
|
||||||
|
<ul><pre>
|
||||||
|
tools/version.h -v 6.1 .version
|
||||||
|
</pre></ul>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The <code>.version</code> file is also used during the build process to create a C header file at <code>include/nuttx/version.h</code> that contains the same version information.
|
||||||
|
That version file may be used by your C applications for, as an example, reporting version information.
|
||||||
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<b>Additional Configuration Steps</b>.
|
<b>Additional Configuration Steps</b>.
|
||||||
The remainder of configuration steps will be performed by <a href="#topmakefile"><code>${TOPDIR}/Makefile</code></a>
|
The remainder of configuration steps will be performed by <a href="#topmakefile"><code>${TOPDIR}/Makefile</code></a>
|
||||||
|
@ -1154,7 +1211,8 @@ The system can be re-made subsequently by just typing <code>make</code>.
|
||||||
These additional steps include:
|
These additional steps include:
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Auto-generating the file <code>include/nuttx/config.</code> using the <code>${TOPDIR}/.config</code> file.
|
<li>Auto-generating the file <code>include/nuttx/config.h</code> using the <code>${TOPDIR}/.config</code> file.
|
||||||
|
<li>Auto-generating the file <code>include/nuttx/version.h</code> using the <code>${TOPDIR}/.version</code> file.
|
||||||
<li>Creating a link to <code>${TOPDIR}/arch/</code><i><arch-name></i><code>/include</code> at <code>${TOPDIR}/include/arch</code>.
|
<li>Creating a link to <code>${TOPDIR}/arch/</code><i><arch-name></i><code>/include</code> at <code>${TOPDIR}/include/arch</code>.
|
||||||
<li>Creating a link to <code>${TOPDIR}/configs/</code><i><board-name></i><code>/include</code> at <code>${TOPDIR}/include/arch/board</code>.
|
<li>Creating a link to <code>${TOPDIR}/configs/</code><i><board-name></i><code>/include</code> at <code>${TOPDIR}/include/arch/board</code>.
|
||||||
<li>Creating a link to <code>${TOPDIR}/configs/</code><i><board-name></i><code>/src</code> at <code>${TOPDIR}/arch/</code><i><arch-name></i><code>/src/board</code>
|
<li>Creating a link to <code>${TOPDIR}/configs/</code><i><board-name></i><code>/src</code> at <code>${TOPDIR}/arch/</code><i><arch-name></i><code>/src/board</code>
|
||||||
|
|
|
@ -17,20 +17,33 @@ configure.sh
|
||||||
target board. See configs/README.txt or Documentation/NuttxPortingGuide.html
|
target board. See configs/README.txt or Documentation/NuttxPortingGuide.html
|
||||||
for a description of how to configure NuttX with this script.
|
for a description of how to configure NuttX with this script.
|
||||||
|
|
||||||
mkconfig.c
|
mkconfig.c, cfgparser.c, and cfgparser.h
|
||||||
|
|
||||||
This is C file that is used to build mkconfig program. The mkconfig
|
This is C file that is used to build mkconfig program. The mkconfig
|
||||||
program is used during the initial NuttX build.
|
program is used during the initial NuttX build.
|
||||||
|
|
||||||
When you configure NuttX, you will copy a configuration file called .config
|
When you configure NuttX, you will copy a configuration file called .config
|
||||||
into the top level NuttX directory (See configs/README.txt or
|
in the top level NuttX directory (See configs/README.txt or
|
||||||
Documentation/NuttxPortingGuide.html). The first time you make NuttX,
|
Documentation/NuttxPortingGuide.html). The first time you make NuttX,
|
||||||
the top-level makefile will build the mkconfig executable from mkconfig.c
|
the top-level makefile will build the mkconfig executable from mkconfig.c
|
||||||
(using Makefile.mkconfig). The top-level Makefile will then execute the
|
(using Makefile.host). The top-level Makefile will then execute the
|
||||||
mkconfig program to convert the .config file in the top level directory
|
mkconfig program to convert the .config file in the top level directory
|
||||||
into include/nuttx/config.h. config.h is a another version of the
|
into include/nuttx/config.h. config.h is a another version of the
|
||||||
NuttX configuration that can be included by C files.
|
NuttX configuration that can be included by C files.
|
||||||
|
|
||||||
|
mkversion.c, cfgparser.c, and cfgparser.h
|
||||||
|
|
||||||
|
This is C file that is used to build mkversion program. The mkversion
|
||||||
|
program is used during the initial NuttX build.
|
||||||
|
|
||||||
|
When you build NuttX there should be a version file called .version in
|
||||||
|
the top level NuttX directory (See Documentation/NuttxPortingGuide.html).
|
||||||
|
The first time you make NuttX, the top-level makefile will build th
|
||||||
|
mkversion executable from mkversion.c (using Makefile.host). The top-
|
||||||
|
level Makefile will then execute the mkversion program to convert the
|
||||||
|
.version file in the top level directory into include/nuttx/version.h.
|
||||||
|
version.h provides version information that can be included by C files.
|
||||||
|
|
||||||
mksyscall.c
|
mksyscall.c
|
||||||
|
|
||||||
This is C file that is used to build mksyscall program. The mksyscall
|
This is C file that is used to build mksyscall program. The mksyscall
|
||||||
|
@ -56,7 +69,8 @@ mksyscall.c
|
||||||
Makefile.host
|
Makefile.host
|
||||||
|
|
||||||
This is the makefile that is used to make the mkconfig program from
|
This is the makefile that is used to make the mkconfig program from
|
||||||
the mkconfig.c C file or the mksyscall program from the mksyscall.c file.
|
the mkconfig.c C file, the mkversion program from the mkconfig.c C file,
|
||||||
|
or the mksyscall program from the mksyscall.c file.
|
||||||
|
|
||||||
mkromfsimg.sh
|
mkromfsimg.sh
|
||||||
|
|
||||||
|
@ -80,7 +94,13 @@ mknulldeps.sh
|
||||||
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
||||||
|
|
||||||
The mknulldeps.sh is a stub script that does essentially nothing.
|
The mknulldeps.sh is a stub script that does essentially nothing.
|
||||||
|
|
||||||
|
define.sh
|
||||||
|
|
||||||
|
Different compilers have different conventions for specifying pre-
|
||||||
|
processor definitions on the compiler command line. This bash
|
||||||
|
script allows the build system to create create command line definitions
|
||||||
|
without concern for the particular compiler in use.
|
||||||
|
|
||||||
incdir.sh
|
incdir.sh
|
||||||
|
|
||||||
|
|
|
@ -57,8 +57,7 @@ while [ ! -z "$1" ]; do
|
||||||
VERSION=$1
|
VERSION=$1
|
||||||
;;
|
;;
|
||||||
-h )
|
-h )
|
||||||
echo "$progname is a tool for flexible generation of include path arguments for a"
|
echo "$0 is a tool for generation of proper version files for the NuttX build"
|
||||||
echo "variety of different compilers in a variety of compilation environments"
|
|
||||||
echo ""
|
echo ""
|
||||||
echo $USAGE
|
echo $USAGE
|
||||||
echo ""
|
echo ""
|
||||||
|
|
Loading…
Reference in New Issue