diff --git a/Documentation/NuttShell.html b/Documentation/NuttShell.html index e03aadc7fde..d1dd3d922bd 100644 --- a/Documentation/NuttShell.html +++ b/Documentation/NuttShell.html @@ -8,7 +8,7 @@
Last Updated: March 7, 2011
+Last Updated: March 18, 2011
- The examples/nsh sub-directory contains the NuttShell (NSH).
+ The apps/nshlib sub-directory contains the NuttShell (NSH)
+ library.
+ This library can easily to linked to produce a NSH application (See as an example apps/nshlib).
NSH is a simple shell application for NuttX.
NSH Start-Up Script.
NSH supports options to provide a start up script for NSH. In general
- this capability is enabled with CONFIG_EXAMPLES_NSH_ROMFSETC, but has
+ this capability is enabled with CONFIG_NSH_ROMFSETC, but has
several other related configuration options as described with the
NSH-specific configuration settings.
This capability also depends on:
@@ -530,7 +532,7 @@ fi
values.
- In this default case, enabling CONFIG_EXAMPLES_NSH_ROMFSETC will cause
+ In this default case, enabling CONFIG_NSH_ROMFSETC will cause
NSH to behave as follows at NSH startup time:
Modifying the ROMFS Image.
- The contents of the /etc directory are retained in the file examples/nsh/nsh_romfsimg.h OR, if CONFIG_EXAMPLES_NSH_ARCHROMFS is defined, include/arch/board/rcs.template).
+ The contents of the /etc directory are retained in the file apps/nshlib/nsh_romfsimg.h OR, if CONFIG_NSH_ARCHROMFS is defined, include/arch/board/rcs.template).
In order to modify the start-up behavior, there are three things to study:
CONFIG_EXAMPLES_NSH_ROMFSETC configuration options
+ The additional CONFIG_NSH_ROMFSETC configuration options
discussed with the other NSH-specific configuration settings.
genromfs tool (available from http://romfs.sourceforge.net).
- - The file
examples/nsh/rcS.template
- (OR, if CONFIG_EXAMPLES_NSH_ARCHROMFS is defined include/arch/board/rcs.template.
+ - The file
apps/nshlib/rcS.template
+ (OR, if CONFIG_NSH_ARCHROMFS is defined include/arch/board/rcs.template.
rcS.template.
- The file examples/nsh/rcS.template contains the general form
+ The file apps/nshlib/rcS.template contains the general form
of the rcS file; configured values are plugged into this
template file to produce the final rcS file.
NOTE:
- examples/nsh/rcS.template generates the standard, default nsh_romfsimg.h file.
- If CONFIG_EXAMPLES_NSH_ARCHROMFS is defined in the NuttX configuration file, then a custom, board-specific nsh_romfsimg.h file residing in configs/<board>/include will be used.
+ apps/nshlib/rcS.template generates the standard, default nsh_romfsimg.h file.
+ If CONFIG_NSH_ARCHROMFS is defined in the NuttX configuration file, then a custom, board-specific nsh_romfsimg.h file residing in configs/<board>/include will be used.
NOTE when the OS is configured, include/arch/board will be linked to configs/<board>/include.
@@ -1817,192 +1819,192 @@ nsh>
[CONFIG_EXAMPLES_NSH_DISABLESCRIPTCONFIG_EXAMPLES_NSH_DISABLE_TESTCONFIG_NSH_DISABLESCRIPTCONFIG_NSH_DISABLE_TESTcatCONFIG_NFILE_DESCRIPTORS > 0CONFIG_EXAMPLES_NSH_DISABLE_CATCONFIG_NSH_DISABLE_CATcdCONFIG_DISABLE_ENVIRON && CONFIG_NFILE_DESCRIPTORS > 0CONFIG_EXAMPLES_NSH_DISABLE_CDCONFIG_NSH_DISABLE_CDcpCONFIG_NFILE_DESCRIPTORS > 0CONFIG_EXAMPLES_NSH_DISABLE_CPCONFIG_NSH_DISABLE_CPddCONFIG_NFILE_DESCRIPTORS > 0CONFIG_EXAMPLES_NSH_DISABLE_DDCONFIG_NSH_DISABLE_DDechoCONFIG_EXAMPLES_NSH_DISABLE_ECHOCONFIG_NSH_DISABLE_ECHOexecCONFIG_EXAMPLES_NSH_DISABLE_EXECCONFIG_NSH_DISABLE_EXECexitCONFIG_EXAMPLES_NSH_DISABLE_EXITCONFIG_NSH_DISABLE_EXITfreeCONFIG_EXAMPLES_NSH_DISABLE_FREECONFIG_NSH_DISABLE_FREEgetCONFIG_NET && CONFIG_NET_UDP &&
CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NET_BUFSIZE >= 5581CONFIG_EXAMPLES_NSH_DISABLE_GETCONFIG_NSH_DISABLE_GEThelpCONFIG_EXAMPLES_NSH_DISABLE_HELPCONFIG_NSH_DISABLE_HELPifconfigCONFIG_NETCONFIG_EXAMPLES_NSH_DISABLE_IFCONFIGCONFIG_NSH_DISABLE_IFCONFIGkillCONFIG_DISABLE_SIGNALSCONFIG_EXAMPLES_NSH_DISABLE_KILLCONFIG_NSH_DISABLE_KILLlosetupCONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0CONFIG_EXAMPLES_NSH_DISABLE_LOSETUPCONFIG_NSH_DISABLE_LOSETUPlsCONFIG_NFILE_DESCRIPTORS > 0CONFIG_EXAMPLES_NSH_DISABLE_LSCONFIG_NSH_DISABLE_LSmb,mh,mwCONFIG_EXAMPLES_NSH_DISABLE_MB,CONFIG_EXAMPLES_NSH_DISABLE_MH,CONFIG_EXAMPLES_NSH_DISABLE_MW
+ CONFIG_NSH_DISABLE_MB,CONFIG_NSH_DISABLE_MH,CONFIG_NSH_DISABLE_MW
mkdirCONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_FS_WRITABLE4CONFIG_EXAMPLES_NSH_DISABLE_MKDIRCONFIG_NSH_DISABLE_MKDIRmkfatfsCONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_FS_FATCONFIG_EXAMPLES_NSH_DISABLE_MKFATFSCONFIG_NSH_DISABLE_MKFATFSmkfifoCONFIG_NFILE_DESCRIPTORS > 0CONFIG_EXAMPLES_NSH_DISABLE_MKFIFOCONFIG_NSH_DISABLE_MKFIFOmkrdCONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_FS_WRITABLE4CONFIG_EXAMPLES_NSH_DISABLE_MKRDCONFIG_NSH_DISABLE_MKRDmountCONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_FS_READABLE3CONFIG_EXAMPLES_NSH_DISABLE_MOUNTCONFIG_NSH_DISABLE_MOUNTpingCONFIG_NET && CONFIG_NET_ICMP &&
CONFIG_NET_ICMP_PING && !CONFIG_DISABLE_CLOCK &&
!CONFIG_DISABLE_SIGNALSCONFIG_EXAMPLES_NSH_DISABLE_PINGCONFIG_NSH_DISABLE_PINGpsCONFIG_EXAMPLES_NSH_DISABLE_PSCONFIG_NSH_DISABLE_PSputCONFIG_NET && CONFIG_NET_UDP &&
CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NET_BUFSIZE >= 5581,2CONFIG_EXAMPLES_NSH_DISABLE_PUTCONFIG_NSH_DISABLE_PUTpwdCONFIG_DISABLE_ENVIRON && CONFIG_NFILE_DESCRIPTORS > 0CONFIG_EXAMPLES_NSH_DISABLE_PWDCONFIG_NSH_DISABLE_PWDrmCONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_FS_WRITABLE4CONFIG_EXAMPLES_NSH_DISABLE_RMCONFIG_NSH_DISABLE_RMrmdirCONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_FS_WRITABLE4CONFIG_EXAMPLES_NSH_DISABLE_RMDIRCONFIG_NSH_DISABLE_RMDIRsetCONFIG_DISABLE_ENVIRONCONFIG_EXAMPLES_NSH_DISABLE_SETCONFIG_NSH_DISABLE_SETshCONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 && !CONFIG_EXAMPLES_NSH_DISABLESCRIPTCONFIG_EXAMPLES_NSH_DISABLE_SHCONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 && !CONFIG_NSH_DISABLESCRIPTCONFIG_NSH_DISABLE_SHsleepCONFIG_DISABLE_SIGNALSCONFIG_EXAMPLES_NSH_DISABLE_SLEEPCONFIG_NSH_DISABLE_SLEEPtestCONFIG_EXAMPLES_NSH_DISABLESCRIPTCONFIG_EXAMPLES_NSH_DISABLE_TESTCONFIG_NSH_DISABLESCRIPTCONFIG_NSH_DISABLE_TESTumountCONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_FS_READABLE3CONFIG_EXAMPLES_NSH_DISABLE_UMOUNTCONFIG_NSH_DISABLE_UMOUNTunsetCONFIG_DISABLE_ENVIRONCONFIG_EXAMPLES_NSH_DISABLE_UNSETCONFIG_NSH_DISABLE_UNSETusleepCONFIG_DISABLE_SIGNALSCONFIG_EXAMPLES_NSH_DISABLE_USLEEPCONFIG_NSH_DISABLE_USLEEPwgetCONFIG_NET && CONFIG_NET_TCP &&
CONFIG_NFILE_DESCRIPTORS > 0CONFIG_EXAMPLES_NSH_DISABLE_WGETCONFIG_NSH_DISABLE_WGETxdCONFIG_EXAMPLES_NSH_DISABLE_XDCONFIG_NSH_DISABLE_XDCONFIG_EXAMPLES_NSH_FILEIOSIZECONFIG_NSH_FILEIOSIZECONFIG_EXAMPLES_NSH_STRERRORCONFIG_NSH_STRERRORCONFIG_EXAMPLES_NSH_LINELENCONFIG_NSH_LINELENCONFIG_EXAMPLES_NSH_STACKSIZECONFIG_NSH_STACKSIZECONFIG_EXAMPLES_NSH_NESTDEPTHCONFIG_NSH_NESTDEPTHif-then[-else]-fi sequences that
are permissable. Default: 3
CONFIG_EXAMPLES_NSH_DISABLESCRIPTCONFIG_NSH_DISABLESCRIPTsh, test, and [ commands and the
@@ -2084,7 +2086,7 @@ nsh>
CONFIG_EXAMPLES_NSH_DISABLEBGCONFIG_NSH_DISABLEBGnice command prefix and
@@ -2093,7 +2095,7 @@ nsh>
CONFIG_EXAMPLES_NSH_MMCSDMINORCONFIG_NSH_MMCSDMINORCONFIG_EXAMPLES_NSH_ROMFSETCCONFIG_NSH_ROMFSETC/etc and provide a startup script
at /etc/init.d/rcS. The default startup script will mount
@@ -2112,25 +2114,25 @@ nsh>
CONFIG_EXAMPLES_NSH_CONSOLECONFIG_NSH_CONSOLECONFIG_EXAMPLES_NSH_CONSOLEis set to y, then a serial
+ If CONFIG_NSH_CONSOLEis set to y, then a serial
console front-end is selected.
CONFIG_EXAMPLES_NSH_TELNETCONFIG_NSH_TELNETCONFIG_EXAMPLES_NSH_TELNET is set to y, then a TELENET
+ If CONFIG_NSH_TELNET is set to y, then a TELENET
server front-end is selected. When this option is provided,
you may log into NuttX remotely using telnet in order to
access NSH.
CONFIG_EXAMPLES_NSH_ARCHINITCONFIG_NSH_ARCHINITCONFIG_EXAMPLES_NSH_ARCHINIT if your board provides architecture
+ Set CONFIG_NSH_ARCHINIT if your board provides architecture
specific initialization via the board-specific function nsh_archinitialize().
This function will be called early in NSH initialization to allow board logic to
do such things as configure MMC/SD slots.
@@ -2139,8 +2141,8 @@ nsh>
- 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
+ One or both of CONFIG_NSH_CONSOLE and CONFIG_NSH_TELNET
+ must be defined. If CONFIG_NSH_TELNET is selected, then there some
other configuration settings that apply:
CONFIG_EXAMPLES_NSH_IOBUFFER_SIZECONFIG_NSH_IOBUFFER_SIZECONFIG_EXAMPLES_NSH_DHCPCCONFIG_NSH_DHCPCCONFIG_EXAMPLES_NSH_IPADDRCONFIG_NSH_IPADDRCONFIG_EXAMPLES_NSH_DHCPC is NOT set, then the static IP
+ If CONFIG_NSH_DHCPC is NOT set, then the static IP
address must be provided.
CONFIG_EXAMPLES_NSH_DRIPADDRCONFIG_NSH_DRIPADDRCONFIG_EXAMPLES_NSH_NETMASKCONFIG_NSH_NETMASKCONFIG_EXAMPLES_NSH_NOMACCONFIG_NSH_NOMAC
- If CONFIG_EXAMPLES_NSH_ROMFSETC is selected, then the following additional
+ If CONFIG_NSH_ROMFSETC is selected, then the following additional
configuration setting apply:
CONFIG_EXAMPLES_NSH_ARCHROMFSCONFIG_NSH_ARCHROMFSconfigs/<board>/include/nsh_romfsimg.h.
CONFIG_EXAMPLES_NSH_ROMFSMOUNTPTCONFIG_NSH_ROMFSMOUNTPT"/etc", but that
can be changed with this setting. This must be a absolute path
@@ -2275,7 +2277,7 @@ nsh>
CONFIG_EXAMPLES_NSH_INITSCRIPTCONFIG_NSH_INITSCRIPT"init.d/rcS". This is a relative path and must not
@@ -2283,14 +2285,14 @@ nsh>
CONFIG_EXAMPLES_NSH_ROMFSDEVNOCONFIG_NSH_ROMFSDEVNO0' corresponding to /dev/ram0.
CONFIG_EXAMPLES_NSH_ROMFSSECTSIZECONFIG_NSH_ROMFSSECTSIZE
- When the default rcS file used when CONFIG_EXAMPLES_NSH_ROMFSETC is
+ When the default rcS file used when CONFIG_NSH_ROMFSETC is
selected, it will mount a FAT FS under /tmp. The following selections
describe that FAT FS.
CONFIG_EXAMPLES_NSH_FATDEVNOCONFIG_NSH_FATDEVNO1' corresponding to /dev/ram1.
CONFIG_EXAMPLES_NSH_FATSECTSIZECONFIG_NSH_FATSECTSIZEcdCONFIG_EXAMPLES_NSH_CONSOLECONFIG_EXAMPLES_NSH_DHCPCCONFIG_EXAMPLES_NSH_DISABLEBGCONFIG_EXAMPLES_NSH_DISABLESCRIPTCONFIG_EXAMPLES_NSH_DRIPADDRCONFIG_EXAMPLES_NSH_FATDEVNOCONFIG_EXAMPLES_NSH_FATMOUNTPTCONFIG_EXAMPLES_NSH_FATNSECTORSCONFIG_EXAMPLES_NSH_FATSECTSIZECONFIG_EXAMPLES_NSH_FILEIOSIZECONFIG_EXAMPLES_NSH_INITSCRIPTCONFIG_EXAMPLES_NSH_IOBUFFER_SIZECONFIG_EXAMPLES_NSH_IPADDRCONFIG_EXAMPLES_NSH_LINELENCONFIG_EXAMPLES_NSH_NESTDEPTHCONFIG_EXAMPLES_NSH_NETMASKCONFIG_EXAMPLES_NSH_NOMACCONFIG_EXAMPLES_NSH_ROMFSDEVNOCONFIG_EXAMPLES_NSH_ROMFSETCCONFIG_EXAMPLES_NSH_ARCHROMFSCONFIG_EXAMPLES_NSH_ROMFSMOUNTPTCONFIG_EXAMPLES_NSH_ROMFSSECTSIZECONFIG_EXAMPLES_NSH_STACKSIZECONFIG_EXAMPLES_NSH_STRERRORCONFIG_EXAMPLES_NSH_TELNETCONFIG_NSH_CONSOLECONFIG_NSH_DHCPCCONFIG_NSH_DISABLEBGCONFIG_NSH_DISABLESCRIPTCONFIG_NSH_DRIPADDRCONFIG_NSH_FATDEVNOCONFIG_NSH_FATMOUNTPTCONFIG_NSH_FATNSECTORSCONFIG_NSH_FATSECTSIZECONFIG_NSH_FILEIOSIZECONFIG_NSH_INITSCRIPTCONFIG_NSH_IOBUFFER_SIZECONFIG_NSH_IPADDRCONFIG_NSH_LINELENCONFIG_NSH_NESTDEPTHCONFIG_NSH_NETMASKCONFIG_NSH_NOMACCONFIG_NSH_ROMFSDEVNOCONFIG_NSH_ROMFSETCCONFIG_NSH_ARCHROMFSCONFIG_NSH_ROMFSMOUNTPTCONFIG_NSH_ROMFSSECTSIZECONFIG_NSH_STACKSIZECONFIG_NSH_STRERRORCONFIG_NSH_TELNETmount() API.
The mount() API binds a block driver instance with a file system and with a mountpoint.
Then the user may use the block driver to access the file system on the underlying media.
- Example: See the cmd_mount() implementation in examples/nsh/nsh_fscmds.c.
+ Example: See the cmd_mount() implementation in apps/nshlib/nsh_fscmds.c.
Accessing a Character Driver as a Block Device.
See the loop device at drivers/loop.c.
- Example: See the cmd_losetup() implementation in examples/nsh/nsh_fscmds.c.
+ Example: See the cmd_losetup() implementation in apps/nshlib/nsh_fscmds.c.
Accessing a Block Driver as Character Device.
See the Block-to-Character (BCH) conversion logic in drivers/bch/.
- Example: See the cmd_dd() implementation in examples/nsh/nsh_ddcmd.c.
+ Example: See the cmd_dd() implementation in apps/nshlib/nsh_ddcmd.c.