From 7870e74ed876ed38aa4fac97d64d28405c98396a Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 4 Sep 2008 14:55:48 +0000 Subject: [PATCH] update NSH docs git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@875 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/ChangeLog | 2 +- nuttx/Documentation/NuttShell.html | 324 ++++++++++++++++++++++-- nuttx/Documentation/NuttX.html | 2 +- nuttx/Documentation/NuttxUserGuide.html | 2 +- nuttx/examples/nsh/README.txt | 156 +++++++++++- 5 files changed, 462 insertions(+), 24 deletions(-) diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 84cf98a9b..8db3fa750 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -448,5 +448,5 @@ ping request logic. * NSH: Add ping command * Correct IP checksum calculation in ICMP and UDP message send logic. - * NSH: Created a more detailed README file for NSH. + * NSH: Created an HTML document and a more detailed README file describing NSH. diff --git a/nuttx/Documentation/NuttShell.html b/nuttx/Documentation/NuttShell.html index 6989688fc..b79f53559 100644 --- a/nuttx/Documentation/NuttShell.html +++ b/nuttx/Documentation/NuttShell.html @@ -254,6 +254,11 @@ 3.2 NSH-Specific Configuration Settings + + + + Index + @@ -415,7 +420,7 @@ fi cd and pwd. All path arguments to commands may be either an absolute path or a path relative to the current working directory. The current working - directory is set using the 'cd' command and can be queried either + directory is set using the cd command and can be queried either by using the pwd command or by using the echo $PWD command. @@ -849,6 +854,33 @@ nsh> +

Command Syntax:

+ +

+ Synopsis. + Create the directory at <path>. + All components of of <path> except the final directory name must exist on a mounted file + system; the final directory must not. +

+

+ Limited to Mounted File Systems. + Recall that NuttX uses a pseudo filesystem for its root file + system. + The mkdir command can only be used to create directories in volumes set up with the + mount command; it cannot be used to create directories in the pseudo filesystem. +

+

Example:

+ +
@@ -857,6 +889,18 @@ nsh>
+

Command Syntax:

+ +

+ Synopsis. + Format a fat file system on the block device specified by <path>. + NSH provides this command to access the mkfatfs() NuttX API. + This block device must reside in the NuttX pseudo filesystem and + must have been created by some call to register_blockdriver() (see include/nuttx/fs.h). +

+
@@ -865,6 +909,36 @@ nsh>
+

Command Syntax:

+ +

+ Synopsis. + Creates a FIFO character device anywhere in the pseudo file system, creating + whatever psuedo directories that may be needed to complete the <path>. + By convention, however, device drivers are place in the standard /dev directory. + After it is created, the FIFO device may be used as any other device driver. + NSH provides this command to access the mkfifo() NuttX API. +

+

Example

+ +
@@ -873,6 +947,65 @@ nsh>
+

Command Syntax:

+ +

+ Synopsis. + The 'm ount' command mounts a file system in the NuttX psuedo + filesystem. 'mount' performs a three way associating, binding: +

+
    +
  1. File system. + The '-t <fstype>' option identifies the type of + file system that has been formatted on the <block-device>. + As of this writing, vfat is the only supported value for <fstype> +
  2. +
  3. Block Device. + The <block-device> argument is the full or relative + path to a block driver inode in the pseudo filesystem. + By convention, this is a name under the /dev sub-directory. + This <block-device> must have been previously formatted with the same file system + type as specified by <fstype> +
  4. +
  5. Mount Point. + The mount point, <dir-path>, is the location in the + pseudo filesystem where the mounted volume will appear. + This mount point can only reside in the NuttX pseudo filesystem. + By convention, this mount point is a subdirectory under /mnt. + The mount command will create whatever psuedo directories that may be needed to complete the + full path but the full path must not already exist. +
  6. +
+

+ After the the volume has been mounted in the NuttX + pseudo filesystem, + it may be access in the same way as other objects in thefile system. +

+

Example

+ +
@@ -944,6 +1077,32 @@ nsh>
+Command Syntax:

+ +

+ Synopsis. + Remove the specified <file-path> name from the mounted file system. + Recall that NuttX uses a pseudo filesystem for its root file + system. + The rm command can only be used to remove (unlink) files in volumes set up with the + mount command; + it cannot be used to remove names in the pseudo filesystem. +

+

Example:

+ +
@@ -952,6 +1111,33 @@ nsh>
+Command Syntax:

+ +

+ Synopsis. + Remove the specified <dir-path> directory from the mounted file system. + Recall that NuttX uses a pseudo filesystem for its root file + system. + The rmdir command can only be used to remove directories from volumes set up with the + mount command; + it cannot be used to remove directories from the pseudo filesystem. +

+

Example:

+ +
@@ -1021,6 +1207,28 @@ sleep <sec>
+Command Syntax:

+ +

+ Synopsis. + Un-mount the file system at mount point <dir-path>. + The umount command can only be used to un-mount volumes previously mounted using + mount command. +

+

Example:

+ + - + - + - + - + - + - + - + - + - + -
@@ -1228,28 +1436,28 @@ usleep <usec> Description

CONFIG_EXAMPLES_NSH_FILEIOSIZE
CONFIG_EXAMPLES_NSH_FILEIOSIZE Size of a static I/O buffer used for file access (ignored if there is no filesystem).

CONFIG_EXAMPLES_NSH_STRERROR
CONFIG_EXAMPLES_NSH_STRERROR strerror(errno) makes more readable output but strerror() is very large and will not be used unless this setting is y

CONFIG_EXAMPLES_NSH_LINELEN
CONFIG_EXAMPLES_NSH_LINELEN The maximum length of one command line and of one output line. Default: 80

CONFIG_EXAMPLES_NSH_STACKSIZE
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 @@ -1257,14 +1465,14 @@ usleep <usec>

CONFIG_EXAMPLES_NSH_NESTDEPTH
CONFIG_EXAMPLES_NSH_NESTDEPTH The maximum number of nested if-then[-else]-fi sequences that are permissable. Default: 3

CONFIG_EXAMPLES_NSH_DISABLESCRIPT
CONFIG_EXAMPLES_NSH_DISABLESCRIPT This can be set to y to suppress support for scripting. This setting disables the sh, test, and [ commands and the @@ -1273,7 +1481,7 @@ usleep <usec>

CONFIG_EXAMPLES_NSH_DISABLEBG
CONFIG_EXAMPLES_NSH_DISABLEBG This can be set to y to suppress support for background commands. This setting disables the nice command prefix and @@ -1282,14 +1490,14 @@ usleep <usec>

CONFIG_EXAMPLES_NSH_CONSOLE
CONFIG_EXAMPLES_NSH_CONSOLE If CONFIG_EXAMPLES_NSH_CONSOLEis set to y, then a serial console front-end is selected.

CONFIG_EXAMPLES_NSH_TELNET
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, @@ -1297,7 +1505,7 @@ usleep <usec> access NSH.
+

One or both of CONFIG_EXAMPLES_NSH_CONSOLE and CONFIG_EXAMPLES_NSH_TELNET @@ -1310,46 +1518,126 @@ usleep <usec> Configuration Description -
CONFIG_EXAMPLES_NSH_IOBUFFER_SIZE + 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 + CONFIG_EXAMPLES_NSH_DHCPC Obtain the the IP address via DHCP. -
CONFIG_EXAMPLES_NSH_IPADDR + CONFIG_EXAMPLES_NSH_IPADDR If CONFIG_EXAMPLES_NSH_DHCPC is NOT set, then the static IP address must be provided. -
CONFIG_EXAMPLES_NSH_DRIPADDR + CONFIG_EXAMPLES_NSH_DRIPADDR Default router IP address -
CONFIG_EXAMPLES_NSH_NETMASK + CONFIG_EXAMPLES_NSH_NETMASK Network mask -
CONFIG_EXAMPLES_NSH_NOMAC + CONFIG_EXAMPLES_NSH_NOMAC Set if your ethernet hardware has no built-in MAC address. If set, a bogus MAC will be assigned. + + + + + +
+

Index

+
+ + + +
+ +
  • Greeting
  • +
  • help
  • +
  • if-then[-else]-fi
  • +
  • ifconfig
  • +
  • ls
  • +
  • mb
  • +
  • mh
  • +
  • mw
  • +
  • mem
  • +
  • mkdir
  • +
  • mkfatfs
  • +
  • mkfifo
  • +
  • mount
  • +
  • nice
  • +
  • OLDPWD
  • +
  • Overview
  • +
  • ping
  • +
  • Prompt
  • +
  • ps
  • +
  • pwd
  • +
  • PWD
  • +
  • Re-directed commands
  • +
  • rm
  • +
  • rmdir
  • +
  • set
  • +
  • sh
  • +
  • Simple commands
  • +
  • sleep
  • +
  • test
  • +
  • umount
  • +
  • unset
  • +
  • usleep
  • +
    + - \ No newline at end of file diff --git a/nuttx/Documentation/NuttX.html b/nuttx/Documentation/NuttX.html index c49c48883..5481f1b1c 100644 --- a/nuttx/Documentation/NuttX.html +++ b/nuttx/Documentation/NuttX.html @@ -1075,7 +1075,7 @@ nuttx-0.3.14 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> ping request logic. * NSH: Add ping command * Correct IP checksum calculation in ICMP and UDP message send logic. - * NSH: Created a more detailed README file for NSH. + * NSH: Created an HTML document and a more detailed README file describing NSH. pascal-0.1.3 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> diff --git a/nuttx/Documentation/NuttxUserGuide.html b/nuttx/Documentation/NuttxUserGuide.html index d97281e78..55eb1ce68 100644 --- a/nuttx/Documentation/NuttxUserGuide.html +++ b/nuttx/Documentation/NuttxUserGuide.html @@ -6093,7 +6093,7 @@ int mkfatfs(FAR const char *pathname, FAR struct fat_format_s *fmt); Description: