Documentation update

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3914 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2011-08-25 16:44:11 +00:00
parent e6fea28fd5
commit 07292be9c0
5 changed files with 198 additions and 31 deletions
+20 -8
View File
@@ -291,8 +291,10 @@
<td><br></td> <td><br></td>
<td> <td>
<p> <p>
<li>Easily extensible to new processor architectures, SoC architecture, or board architectures. <li>
A <a href="NuttxPortingGuide.html">Porting Guide</a> is in development.</li> Easily extensible to new processor architectures, SoC architecture, or board architectures.
A <a href="NuttxPortingGuide.html">Porting Guide</a> is available.
</li>
</p> </p>
</tr> </tr>
@@ -395,7 +397,9 @@
<td><br></td> <td><br></td>
<td> <td>
<p> <p>
<li>Network, USB (host), USB (device), serial, CAN, driver architectures.</li> <li>
Network, USB (host), USB (device), serial, CAN, ADC, DAC driver architectures.
</li>
</p> </p>
</tr> </tr>
@@ -403,35 +407,43 @@
<td><br></td> <td><br></td>
<td> <td>
<p> <p>
<li>RAMDISK, pipes, FIFO, <code>/dev/null</code>, <code>/dev/zero</code> drivers.</li> <li>
RAMDISK, pipes, FIFO, <code>/dev/null</code>, <code>/dev/zero</code>, and loop drivers.
</li>
</p> </p>
</tr> </tr>
<tr> <tr>
<td><br></td> <td><br></td>
<td> <td>
<p> <p>
<li>Mount-able volumes. Bind mountpoint, filesystem, and block device driver.</li> <li>
Mount-able volumes. Bind mountpoint, filesystem, and block device driver.
</li>
</p> </p>
</tr> </tr>
<tr> <tr>
<td><br></td> <td><br></td>
<td> <td>
<p> <p>
<li>FAT12/16/32 filesystem support with optional FAT long file name support<small><sup>1</sup></small>.</li> <li>
FAT12/16/32 filesystem support with optional FAT long file name support<small><sup>1</sup></small>.
</li>
</p> </p>
</tr> </tr>
<tr> <tr>
<td><br></td> <td><br></td>
<td> <td>
<p> <p>
<li>NXFFS. the NuttX wear-leveling FLASH file system.</li> <li>
NXFFS. The tiny NuttX wear-leveling FLASH file system.
</li>
</p> </p>
</tr> </tr>
<tr> <tr>
<td><br></td> <td><br></td>
<td> <td>
<p> <p>
<li>Generic driver for SPI-based MMC/SD/SDH cards.</li> <li>Generic driver for SPI-based or SDIO-based MMC/SD/SDH cards.</li>
</p> </p>
</tr> </tr>
<tr> <tr>
+160 -19
View File
@@ -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: August 19, 2011</p> <p>Last Updated: August 25, 2011</p>
</td> </td>
</tr> </tr>
</table> </table>
@@ -59,10 +59,10 @@
<a href="#DirStructSched">2.13 nuttx/sched/</a><br> <a href="#DirStructSched">2.13 nuttx/sched/</a><br>
<a href="#DirStructSyscall">2.14 nuttx/syscall/</a><br> <a href="#DirStructSyscall">2.14 nuttx/syscall/</a><br>
<a href="#DirStructTools">2.15 nuttx/tools/</a><br> <a href="#DirStructTools">2.15 nuttx/tools/</a><br>
<a href="#topmakefile">2.16 nuttx/Makefile</a> <a href="#topmakefile">2.16 nuttx/Makefile</a><br>
<a href="#DirStructNetUtils">2.17 apps/netutils</a><br> <a href="#DirStructNetUtils">2.17 apps/netutils</a><br>
<a href="#DirStructNshLib">2.18 apps/nshlib</a><br> <a href="#DirStructNshLib">2.18 apps/nshlib</a><br>
<a href="#DirStructExamples">2.19 apps/examples/</a><br> <a href="#DirStructExamples">2.19 apps/examples/</a>
</ul> </ul>
<a href="#configandbuild">3.0 Configuring and Building</a> <a href="#configandbuild">3.0 Configuring and Building</a>
<ul> <ul>
@@ -126,6 +126,7 @@
<a href="#sdiodrivers">6.3.8 SDIO Device Drivers</a><br> <a href="#sdiodrivers">6.3.8 SDIO Device Drivers</a><br>
<a href="#usbhostdrivers">6.3.9 USB Host-Side Drivers</a><br> <a href="#usbhostdrivers">6.3.9 USB Host-Side Drivers</a><br>
<a href="#usbdevdrivers">6.3.10 USB Device-Side Drivers</a><br> <a href="#usbdevdrivers">6.3.10 USB Device-Side Drivers</a><br>
<a href="#analogdrivers">6.3.11 Analog (ADC/DAC) Drivers</a>
</ul> </ul>
</ul> </ul>
<a href="#apndxconfigs">Appendix A: NuttX Configuration Settings</a><br> <a href="#apndxconfigs">Appendix A: NuttX Configuration Settings</a><br>
@@ -1000,22 +1001,43 @@
<ul><pre> <ul><pre>
drivers/ drivers/
|-- Makefile |-- Makefile
|-- analog/
| |-- Make.defs
| `-- <i>(Common ADC and DAC driver source files)</i>
|-- bch/ |-- bch/
| |-- Make.defs | |-- Make.defs
| `-- <i>(bch driver source files)</i> | `-- <i>(bch driver source files)</i>
|-- input/
| |-- Make.defs
| `-- <i>(Common touchscreen and keypad driver source files)</i>
|-- lcd/
| |-- Make.defs
| `-- <i>(Common LCD driver source files)</i>
|-- mmcsd/ |-- mmcsd/
| |-- Make.defs | |-- Make.defs
| `-- <i>(mmcsd driver source files)</i> | `-- <i>(Common MMC/SD card driver source files)</i>
|-- mtd/
| |-- Make.defs
| `-- <i>(Common memory technology device driver source files)</i>
|-- net/ |-- net/
| |-- Make.defs | |-- Make.defs
| `-- <i>(net driver source files)</i> | `-- <i>(Common network driver source files)</i>
|-- sensors/
| |-- Make.defs
| `-- <i>(Common sensor driver source files)</i>
|-- serial/
| |-- Make.defs
| `-- <i>(Common front-end character drivers for chip-specific UARTs)</i>
|-- usbdev/ |-- usbdev/
| |-- Make.defs | |-- Make.defs
| `-- <i>(USB device driver source files)</i> | `-- <i>(Common USB device driver source files)</i>
|-- usbhost/ |-- usbhost/
| |-- Make.defs | |-- Make.defs
| `-- <i>(USB host driver source files)</i> | `-- <i>(Common USB host driver source files)</i>
`-- <i>(common driver source files)</i> |-- wirelss/
| |-- Make.defs
| `-- <i>(Common wireless driver source files)</i>
`-- <i>(Various common driver source files)</i>
</pre></ul> </pre></ul>
<h2>2.6 <a name="DirStructFs">nuttx/fs</a></h2> <h2>2.6 <a name="DirStructFs">nuttx/fs</a></h2>
@@ -1029,13 +1051,16 @@ fs/
|-- Makefile |-- Makefile
|-- fat/ |-- fat/
| |-- Make.defs | |-- Make.defs
| `-- <i>(fat file system source files)</i> | `-- <i>(FAT file system source files)</i>
|-- mmap/
| |-- Make.defs
| `-- <i>(RAM-based file mapping source files)</i>
|-- nxffs/ |-- nxffs/
| |-- Make.defs | |-- Make.defs
| `-- <i>(NXFFS file system source files)</i> | `-- <i>(NuttX Flash File System (NXFFS) source files)</i>
|-- romfs/ |-- romfs/
| |-- Make.defs | |-- Make.defs
| `-- <i>(romfs file system source files)</i> | `-- <i>(ROMFS file system source files)</i>
`-- <i>(common file system source files)</i> `-- <i>(common file system source files)</i>
</pre></ul> </pre></ul>
@@ -1047,12 +1072,21 @@ fs/
<ul><pre> <ul><pre>
graphics/ graphics/
|-- Makefile |-- Makefile
|-- nxbe/
| |-- Make.defs
| `-- <i>(NuttX graphics back-end (NXBE) source files)</i>
|-- nxfont/
| |-- Make.defs
| `-- <i>(NuttX graphics font-related (NXFONT) source files)</i>
|-- nxglib/ |-- nxglib/
| |-- Make.defs | |-- Make.defs
| `-- <i>(NuttX graphics library source files)</i> | `-- <i>(NuttX graphics library (NXGL) source files)</i>
|-- nx/ |-- nxmu/
| |-- Make.defs | |-- Make.defs
| `-- <i>(NuttX X-server source files)</i> | `-- <i>(NuttX graphics multi-user (NXMU) server source files)</i>
|-- nxsu/
| |-- Make.defs
| `-- <i>(NuttX graphics single-user (NXSU) source files)</i>
`-- <i>(common file system source files)</i> `-- <i>(common file system source files)</i>
</pre></ul> </pre></ul>
@@ -1073,16 +1107,18 @@ graphics/
include/ include/
|-- <i>(standard header files)</i> |-- <i>(standard header files)</i>
|-- arpa/ |-- arpa/
| `-- <i>(standard header files)</i> | `-- <i>(Standard header files)</i>
|-- cxx/
| `-- <i>(C++ standard header files)</i>
|-- net/ |-- net/
| `-- uip/ | `-- uip/
| `-- <i>(uIP specific header files)</i> | `-- <i>(uIP specific header files)</i>
|-- netinet/ |-- netinet/
| `-- <i>(standard header files)</i> | `-- <i>(Standard header files)</i>
|-- nuttx/ |-- nuttx/
| `-- <i>(nuttx specific header files)</i> | `-- <i>(NuttX specific header files)</i>
`- sys/ `- sys/
`-- <i>(more standard header files)</i> `-- <i>(More standard header files)</i>
</per></ul> </per></ul>
<h2>2.9 <a name="DirStructLib">nuttx/lib</a></h2> <h2>2.9 <a name="DirStructLib">nuttx/lib</a></h2>
@@ -1090,6 +1126,48 @@ include/
This directory holds a collection of standard libc-like functions with custom This directory holds a collection of standard libc-like functions with custom
interfaces into NuttX. interfaces into NuttX.
</p> </p>
<p>
Normally the logic in this file builds to a single library (<code>liblib.a</code>).
However, if NuttX is built as a separately compiled kernel (with <code>CONFIG_NUTTX_KERNEL=y</code>), then the contents of this directory are built as two libraries:
One for use by user programs (<code>libulib.a</code>) and one for use only within the &lt;kernel&gt; space (<code>libklib.a</code>).
</p>
<p>
These user/kernel space libraries (along with the sycalls of <a href="#DirStructSyscall"><code>nuttx/syscall</code></a>) are needed to support the two differing protection domains.
</p>
<p>
Directory structure:
</p>
<ul><pre>
lib/
|-- libgen/
| `-- <i>(Implementation of functions from libgen.h)</i>
|-- math/
| `-- <i>(Implementation of functions from fixedmath.h)</i>
|-- misc/
| `-- <i>(Implementation of miscellaneous library functions)</i>
|-- mqueue/
| `-- <i>(Implementation of some functions from mqueue.h)</i>
|-- net/
| `-- <i>(Implementation of network-related library functions)</i>
|-- queue/
| `-- <i>(Implementation of functions from queue.h)</i>
|-- sched/
| `-- <i>(Implementation of some functions from sched.h)</i>
|-- semaphore/
| `-- <i>(Implementation of some functions from semaphore.h)</i>
|-- signal/
| `-- <i>(Implementation of some functions from signal.h)</i>
|-- stdio/
| `-- <i>(Implementation of functions from stdio.h)</i>
|-- stdlib/
| `-- <i>(Implementation of functions from stdlib.h)</i>
|-- string/
| `-- <i>(Implementation of functions from string.h)</i>
|-- time/
| `-- <i>(Implementation of some functions from time.h)</i>
`-- unistd/
`-- <i>(Implementation of some functions from unistd.h)</i>
</per></ul>
<h2>2.10 <a name="DirStructLibXX">nuttx/libxx</a></h2> <h2>2.10 <a name="DirStructLibXX">nuttx/libxx</a></h2>
<p> <p>
@@ -1115,7 +1193,7 @@ include/
<h2>2.14 <a name="DirStructSyscall">nuttx/syscall</a></h2> <h2>2.14 <a name="DirStructSyscall">nuttx/syscall</a></h2>
<p> <p>
If NuttX is built as a separately compiled kernel (with CONFIG_NUTTX_KERNEL=y), If NuttX is built as a separately compiled kernel (with <code>CONFIG_NUTTX_KERNEL=y</code>),
then the contents of this directory are built. then the contents of this directory are built.
This directory holds a syscall interface that can be used for communication This directory holds a syscall interface that can be used for communication
between user-mode applications and the kernel-mode RTOS. between user-mode applications and the kernel-mode RTOS.
@@ -3036,6 +3114,69 @@ extern void up_ledoff(int led);
</li> </li>
</ul> </ul>
<h3><a name="analogdrivers">6.3.11 Analog (ADC/DAC) Drivers</a></h3>
<ul>
<li>
General header files for the NuttX analog reside in <code>include/nuttx/analog/</code>.
</li>
<li>
Common analog logic and share-able analog drivers reside in the <code>drivers/analog/</code>.
</li>
<li>
Platform-specific drivers reside in <code>arch/</code><i>&lt;architecture&gt;</i><code>/src/</code><i>&lt;chip&gt;</i> directory for the specific processor <i>&lt;architecture&gt;</i> and for the specific <i>&lt;chip&gt;</i> analog peripheral devices.
</li>
</ul>
<h4><a name="adcdrivers">6.3.11.1 ADC Drivers</a></h4>
<ul>
<li>
<code>include/nuttx/analog/adc.h</code>.
All structures and APIs needed to work with ADC drivers are provided in this header file.
This header file includes:
<ol>
<li>
Structures and interface descriptions needed to develop a low-level,
architecture-specific, ADC driver.
</li>
<li>
To register the ADC driver with a common ADC character driver.
</li>
<li>
Interfaces needed for interfacing user programs with the common ADC character driver.
</li>
</ol>
</li>
<li>
<code>drivers/analog/adc.c</code>.
The implementation of the common ADC character driver.
</li>
</ul>
<h4><a name="dacdrivers">6.3.11.2 DAC Drivers</a></h4>
<ul>
<li>
<code>include/nuttx/analog/dac.h</code>.
All structures and APIs needed to work with DAC drivers are provided in this header file.
This header file includes:
<ol>
<li>
Structures and interface descriptions needed to develop a low-level,
architecture-specific, DAC driver.
</li>
<li>
To register the DAC driver with a common DAC character driver.
</li>
<li>
Interfaces needed for interfacing user programs with the common DAC character driver.
</li>
</ol>
</li>
<li>
<code>drivers/analog/dac.c</code>.
The implementation of the common DAC character driver.
</li>
</ul>
<table width ="100%"> <table width ="100%">
<tr bgcolor="#e4e4e4"> <tr bgcolor="#e4e4e4">
<td> <td>
+15 -1
View File
@@ -38,12 +38,23 @@ rwbuffer.c
Subdirectories of this directory: Subdirectories of this directory:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
analog/
This directory holds implementations of analog device drivers.
This includes drivers for Analog to Digital Conversion (ADC) as
well as drivers for Digital to Analog Conversion (DAC).
See include/nuttx/analog/*.h for registration information.
bch/ bch/
Contains logic that may be used to convert a block driver into Contains logic that may be used to convert a block driver into
a character driver. This is the complementary conversion as that a character driver. This is the complementary conversion as that
performed by loop.c. See include/nuttx/fs.h for registration performed by loop.c. See include/nuttx/fs.h for registration
information. information.
analog/
This directory holds implementations of input device drivers.
This includes such things as touchscreen and keypad drivers.
See include/nuttx/input/*.h for registration information.
lcd/ lcd/
Drivers for parallel and serial LCD and OLED type devices. These Drivers for parallel and serial LCD and OLED type devices. These
drivers support interfaces as defined in include/nuttx/lcd/lcd.h drivers support interfaces as defined in include/nuttx/lcd/lcd.h
@@ -74,7 +85,7 @@ sensors/
Drivers for various sensors Drivers for various sensors
serial/ serial/
Front-ends character drivers for chip-specific UARTs. This provide Front-end character drivers for chip-specific UARTs. This provide
some TTY-like functionality and are commonly used (but not required for) some TTY-like functionality and are commonly used (but not required for)
the NuttX system console. See also include/nuttx/serial.h the NuttX system console. See also include/nuttx/serial.h
@@ -84,6 +95,9 @@ usbdev/
usbhost/ usbhost/
USB host drivers. See also include/nuttx/usb/usbhost.h USB host drivers. See also include/nuttx/usb/usbhost.h
wireless/
Drivers for various wireless devices.
Skeleton Files Skeleton Files
^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
+1 -1
View File
@@ -39,7 +39,7 @@
ifeq ($(CONFIG_DAC),y) ifeq ($(CONFIG_DAC),y)
# Include the common ADC character driver # Include the common DAC character driver
CSRCS += dac.c CSRCS += dac.c
+2 -2
View File
@@ -19,7 +19,7 @@ switch from user-mode to kernel-mode is accomplished using software
interrupts (SWIs). SWIs are implemented differently and named differently interrupts (SWIs). SWIs are implemented differently and named differently
by different manufacturers but all work essentially the same: A special by different manufacturers but all work essentially the same: A special
instruction is executed in user-mode that causes a software generated instruction is executed in user-mode that causes a software generated
interrupt. The software generated interrrupt is caught within the kernel interrupt. The software generated interrupt is caught within the kernel
and handle in kernel-mode. and handle in kernel-mode.
Header Files Header Files
@@ -117,7 +117,7 @@ database. Here the following definition is used:
Proxy - A tiny bit of code that executes in the user space. A proxy Proxy - A tiny bit of code that executes in the user space. A proxy
has exactly the same function prototype as does the "real" function has exactly the same function prototype as does the "real" function
for which it proxies. However, it only serves to map the function for which it proxies. However, it only serves to map the function
call into a syscall, marshalling all of the system call parameters call into a syscall, marshaling all of the system call parameters
as necessary. as necessary.
Stub - Another tiny bit of code that executes within the NuttX kernel Stub - Another tiny bit of code that executes within the NuttX kernel