2007-03-21 21:02:52 +01:00
|
|
|
examples
|
|
|
|
^^^^^^^^
|
|
|
|
|
2007-07-01 20:23:03 +02:00
|
|
|
The examples directory contains several sample applications that
|
|
|
|
can be linked with nuttx. The specific example is selected in the
|
|
|
|
configs/<board-name>/defconfig file via the CONFIG_EXAMPLE setting.
|
|
|
|
For example,
|
|
|
|
|
|
|
|
CONFIG_EXAMPLE=ostest
|
|
|
|
|
|
|
|
Selects the examples/ostest example.
|
|
|
|
|
2007-03-21 21:02:52 +01:00
|
|
|
examples/ostest
|
2007-07-01 20:23:03 +02:00
|
|
|
^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
This is the NuttX 'qualification' suite. It attempts to exercise
|
|
|
|
a broad set of OS functionality. Its coverage is not very extensive
|
|
|
|
as of this writing, but it is used to qualify each NuttX release.
|
2007-03-21 21:02:52 +01:00
|
|
|
|
2007-07-01 20:23:03 +02:00
|
|
|
The behavior of the ostest can be modified with the following
|
|
|
|
settings in the configs/<board-name>/defconfig file:
|
|
|
|
|
2008-06-01 19:50:07 +02:00
|
|
|
* CONFIG_EXAMPLES_OSTEST_LOOPS
|
|
|
|
Used to control the number of executions of the test. If
|
|
|
|
undefined, the test executes one time. If defined to be
|
|
|
|
zero, the test runs forever.
|
|
|
|
* CONFIG_EXAMPLES_OSTEST_STACKSIZE
|
2007-07-01 20:23:03 +02:00
|
|
|
Used to create the ostest task. Default is 8192.
|
2007-03-21 21:02:52 +01:00
|
|
|
|
|
|
|
examples/nsh
|
2007-07-01 20:23:03 +02:00
|
|
|
^^^^^^^^^^^^
|
|
|
|
|
2008-02-07 15:41:11 +01:00
|
|
|
This directory contains the NuttShell (NSH). This is a simple
|
2007-07-01 20:23:03 +02:00
|
|
|
shell-like application. With some additional development, NSH will
|
2007-12-11 15:24:49 +01:00
|
|
|
someday be a great NuttX application debugger. At present, NSH
|
|
|
|
supports the following commands:
|
|
|
|
|
|
|
|
Command Depends on Configuration
|
|
|
|
---------- --------------------------
|
|
|
|
cat CONFIG_NFILE_DESCRIPTORS > 0
|
|
|
|
cp CONFIG_NFILE_DESCRIPTORS > 0
|
|
|
|
echo --
|
|
|
|
exec --
|
|
|
|
exit --
|
|
|
|
help --
|
|
|
|
ifconfig CONFIG_NET && CONFIG_NSOCKET_DESCRIPTORS > 0
|
|
|
|
ls CONFIG_NFILE_DESCRIPTORS > 0
|
|
|
|
mkdir !CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0
|
2008-08-16 20:39:46 +02:00
|
|
|
mkfatfs !CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_FS_FAT
|
|
|
|
mkfifo !CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0
|
|
|
|
mount !CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_FS_FAT
|
2007-12-11 15:24:49 +01:00
|
|
|
ps --
|
|
|
|
set !CONFIG_DISABLE_ENVIRON
|
2008-08-16 20:39:46 +02:00
|
|
|
sleep !CONFIG_DISABLE_SIGNALS
|
|
|
|
sh CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0
|
2007-12-11 15:24:49 +01:00
|
|
|
rm !CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0
|
|
|
|
rmdir !CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0
|
2008-08-16 20:39:46 +02:00
|
|
|
umount !CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_FS_FAT
|
2007-12-11 15:24:49 +01:00
|
|
|
unset !CONFIG_DISABLE_ENVIRON
|
2008-08-16 20:39:46 +02:00
|
|
|
usleep !CONFIG_DISABLE_SIGNALS
|
2007-12-11 15:24:49 +01:00
|
|
|
|
|
|
|
Other behavior of NSH can be modified with the following settings in
|
2007-07-01 20:23:03 +02:00
|
|
|
the configs/<board-name>/defconfig file:
|
2007-03-21 21:02:52 +01:00
|
|
|
|
2008-08-12 01:07:26 +02:00
|
|
|
* CONFIG_EXAMPLES_NSH_FILEIOSIZE
|
2007-07-01 20:23:03 +02:00
|
|
|
Size of a static I/O buffer used for file access (ignored if
|
|
|
|
there is no filesystem).
|
2007-03-21 21:02:52 +01:00
|
|
|
|
2008-08-12 01:07:26 +02:00
|
|
|
* CONFIG_EXAMPLES_NSH_STRERROR
|
2008-02-21 13:37:19 +01:00
|
|
|
strerror(errno) makes more readable output but strerror() is
|
|
|
|
very large and will not be used unless this setting is 'y'
|
|
|
|
|
2008-08-12 01:07:26 +02:00
|
|
|
* CONFIG_EXAMPLES_NSH_LINELEN
|
2008-08-13 01:59:32 +02:00
|
|
|
The maximum length of one command line and of one output line.
|
|
|
|
Default: 80
|
2008-08-12 01:07:26 +02:00
|
|
|
|
2008-08-16 20:39:46 +02:00
|
|
|
* CONFIG_EXAMPLES_NSH_STACKSIZE
|
|
|
|
The stack size to use when spawning new threads or tasks. Such
|
|
|
|
new threads are generated when a command is executed in background
|
|
|
|
or as new TELNET connections are established.
|
|
|
|
|
2008-08-20 01:16:45 +02:00
|
|
|
* CONFIG_EXAMPLES_NSH_NESTDEPTH
|
|
|
|
The maximum number of nested if-then[-else]-fi sequences that
|
|
|
|
are permissable. Default: 3
|
|
|
|
|
2008-08-16 20:39:46 +02:00
|
|
|
* CONFIG_EXAMPLES_NSH_CONSOLE
|
|
|
|
If CONFIG_EXAMPLES_NSH_CONSOLE is set to 'y', then a serial
|
|
|
|
console front-end is selected.
|
|
|
|
|
2007-12-10 14:28:01 +01:00
|
|
|
* CONFIG_EXAMPLES_NSH_TELNET
|
|
|
|
If CONFIG_EXAMPLES_NSH_TELNET is set to 'y', then a TELENET
|
|
|
|
server front-end is selected. When this option is provided,
|
2008-08-16 20:39:46 +02:00
|
|
|
you may log into NuttX remotely using telnet in order to
|
2007-12-10 14:28:01 +01:00
|
|
|
access NSH.
|
|
|
|
|
2008-08-16 20:39:46 +02:00
|
|
|
One or both of CONFIG_EXAMPLES_NSH_CONSOLE and CONFIG_EXAMPLES_NSH_TELNET
|
|
|
|
must be defined. If CONFIG_EXAMPLES_NSH_TELNET is selected, then there some
|
|
|
|
other configuration settings that apply:
|
2007-12-10 14:28:01 +01:00
|
|
|
|
|
|
|
* CONFIG_EXAMPLES_NSH_IOBUFFER_SIZE
|
|
|
|
Determines the size of the I/O buffer to use for sending/
|
|
|
|
receiving TELNET commands/reponses
|
|
|
|
|
|
|
|
* CONFIG_EXAMPLES_NSH_DHCPC
|
|
|
|
Obtain the the IP address via DHCP.
|
|
|
|
|
|
|
|
* CONFIG_EXAMPLES_NSH_IPADDR
|
|
|
|
If CONFIG_EXAMPLES_NSH_DHCPC is NOT set, then the static IP
|
|
|
|
address must be provided.
|
|
|
|
|
|
|
|
* CONFIG_EXAMPLES_NSH_DRIPADDR
|
|
|
|
Default router IP address
|
|
|
|
|
|
|
|
* CONFIG_EXAMPLES_NSH_NETMASK
|
|
|
|
Network mask
|
|
|
|
|
|
|
|
* CONFIG_EXAMPLES_NSH_NOMAC
|
|
|
|
Set if your ethernet hardware has no built-in MAC address.
|
|
|
|
If set, a bogus MAC will be assigned.
|
|
|
|
|
2007-05-13 23:47:36 +02:00
|
|
|
examples/mount
|
2007-07-01 20:23:03 +02:00
|
|
|
^^^^^^^^^^^^^^
|
2007-05-13 23:47:36 +02:00
|
|
|
|
2007-07-01 20:23:03 +02:00
|
|
|
This contains a simple test of filesystem mountpoints.
|
2008-06-01 22:08:20 +02:00
|
|
|
|
|
|
|
* CONFIG_EXAMPLES_MOUNT_DEVNAME
|
2008-08-10 16:50:27 +02:00
|
|
|
The name of the user-provided block device to mount.
|
|
|
|
If CONFIG_EXAMPLES_MOUNT_DEVNAME is not provided, then
|
|
|
|
a RAM disk will be configured.
|
|
|
|
|
|
|
|
* CONFIG_EXAMPLES_MOUNT_NSECTORS
|
|
|
|
The number of "sectors" in the RAM disk used when
|
|
|
|
CONFIG_EXAMPLES_MOUNT_DEVNAME is not defined.
|
|
|
|
|
|
|
|
* CONFIG_EXAMPLES_MOUNT_SECTORSIZE
|
|
|
|
The size of each sectors in the RAM disk used when
|
|
|
|
CONFIG_EXAMPLES_MOUNT_DEVNAME is not defined.
|
|
|
|
|
|
|
|
* CONFIG_EXAMPLES_MOUNT_RAMDEVNO
|
|
|
|
The RAM device minor number used to mount the RAM disk used
|
|
|
|
when CONFIG_EXAMPLES_MOUNT_DEVNAME is not defined. The
|
|
|
|
default is zero (meaning that "/dev/ram0" will be used).
|
2007-05-13 23:47:36 +02:00
|
|
|
|
2007-03-21 21:02:52 +01:00
|
|
|
examples/null
|
2007-07-01 20:23:03 +02:00
|
|
|
^^^^^^^^^^^^^
|
2007-03-21 21:02:52 +01:00
|
|
|
|
2007-07-01 20:23:03 +02:00
|
|
|
This is the do nothing application. It is only used for bringing
|
2007-11-22 00:30:24 +01:00
|
|
|
up new NuttX architectures.
|
|
|
|
|
|
|
|
examples/uip
|
|
|
|
^^^^^^^^^^^^
|
|
|
|
|
|
|
|
This is a port of uIP example application. It includes
|
|
|
|
conditionally compiled logic to exercise the uIP webserver,
|
|
|
|
webclient, telnet, smtp, dncpc, and resolver.
|
|
|
|
|
|
|
|
examples/netttest
|
|
|
|
^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
This is a simple network test for verifying client- and server-
|
|
|
|
functionality in a TCP/IP connection.
|
|
|
|
|
2007-11-23 14:31:28 +01:00
|
|
|
examples/udp
|
|
|
|
^^^^^^^^^^^^
|
|
|
|
|
|
|
|
This is a simple network test for verifying client- and server-
|
|
|
|
functionality over UDP.
|
|
|
|
|
2008-02-01 15:32:56 +01:00
|
|
|
examples/pashello
|
|
|
|
^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
This is "Hello, World" implemented via the Pascal P-Code interpreter
|
|
|
|
|
2008-07-22 12:58:30 +02:00
|
|
|
examples/pipe
|
|
|
|
^^^^^^^^^^^^^
|
|
|
|
|
2008-08-10 16:50:27 +02:00
|
|
|
A test of the mkfifo() and pipe() APIs.
|
2008-02-01 15:32:56 +01:00
|
|
|
|
2008-08-10 16:50:27 +02:00
|
|
|
* CONFIG_EXAMPLES_PIPE_STACKSIZE
|
|
|
|
Sets the size of the stack to use when creating the child tasks.
|
|
|
|
The default size is 1024.
|