diff --git a/Documentation/NuttShell.html b/Documentation/NuttShell.html index 5ee579995f1..dae6f3019fb 100644 --- a/Documentation/NuttShell.html +++ b/Documentation/NuttShell.html @@ -8,7 +8,7 @@
Last Updated: June 6, 2017
+Last Updated: June 13, 2017
nsh> is the NSH prompt and indicates that you may enter a command from the console.
++ USB console startup. + When using a USB console, the start-up sequence differs a little: In this case, you are required to press ENTER three times. Then NSH prompt will appear as described above. + This is required for the following reasons: +
+
Extended Command Line Editing.
By default, NuttX uses a simple command line editor that allows command entry after the nsh> and supports only the backspace key for editing.
@@ -752,7 +778,7 @@ nsh>
<file>
`--init.d/
`-- rcS
@@ -976,7 +1002,7 @@ done
Where rcS is the NSH start-up script.
/etc, resulting in:
+ NSH will then mount the ROMFS file system at /etc, resulting in:
|--dev/ | `-- ram0 @@ -1352,7 +1378,7 @@ cp <source-path> <dest-path>Synopsis. Copy of the contents of the file at
<source-path>to the location - in the filesystem indicated by<dest-path>. + in the file system indicated by<dest-path>.
- 2.37 Create a FAT Filesystem (mkfatfs)+2.37 Create a FAT File System (mkfatfs) |
NSH provides this command to access the mkfatfs() NuttX API.
- This block device must reside in the NuttX pseudo filesystem and
+ This block device must reside in the NuttX pseudo file system and
must have been created by some call to register_blockdriver() (see include/nuttx/fs/fs.h).
<dir-
mount performs a three way association, binding:
- - File system.
+
- 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>
- Block Device.
The
<block-device> argument is the full or relative
- path to a block driver inode in the pseudo filesystem.
+ path to a block driver inode in the pseudo file system.
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>
- 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.
+ pseudo file system where the mounted volume will appear.
+ This mount point can only reside in the NuttX pseudo file system.
By convention, this mount point is a subdirectory under /mnt.
The mount command will create whatever pseudo directories that may be needed to complete the
full path but the full path must not already exist.
@@ -2346,7 +2372,7 @@ mount -t <fstype> [-o <options>] <block-device> <dir-
After the volume has been mounted in the NuttX
- pseudo filesystem,
+ pseudo file system,
it may be access in the same way as other objects in the file system.
Examples:
@@ -2395,7 +2421,7 @@ mv <old-path> <new-path>
Synopsis.
Rename the file object at <old-path> to <new-path>.
- Both paths must reside in the same mounted filesystem.
+ Both paths must reside in the same mounted file system.
@@ -2628,11 +2654,11 @@ rm <file-path>
Synopsis.
Remove the specified <file-path> name from the mounted file system.
- Recall that NuttX uses a pseudo filesystem for its root file
+ Recall that NuttX uses a pseudo file system 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.
+ it cannot be used to remove names in the pseudo file system.
Example:
@@ -2662,11 +2688,11 @@ rmdir <dir-path>
Synopsis.
Remove the specified <dir-path> directory from the mounted file system.
- Recall that NuttX uses a pseudo filesystem for its root file
+ Recall that NuttX uses a pseudo file system 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.
+ it cannot be used to remove directories from the pseudo file system.
Example:
@@ -3563,11 +3589,11 @@ nsh>
creation of files for the correct operation of the put command.
3
CONFIG_FS_READABLE is not a user configuration but is set automatically
- if any readable filesystem is selected. At present, this is either CONFIG_FS_FAT
+ if any readable file system is selected. At present, this is either CONFIG_FS_FAT
or CONFIG_FS_ROMFS.
4
CONFIG_FS_WRITABLE is not a user configuration but is set automatically
- if any writable filesystem is selected. At present, this is only CONFIG_FS_FAT.
+ if any writable file system is selected. At present, this is only CONFIG_FS_FAT.
5
Verbose help output can be suppressed by defining CONFIG_NSH_HELP_TERSE.
In that case, the help command is still available but will be slightly smaller.
@@ -3625,7 +3651,7 @@ nsh>
CONFIG_NSH_FILEIOSIZE
Size of a static I/O buffer used for file access (ignored if
- there is no filesystem). Default is 1024.
+ there is no file system). Default is 1024.
@@ -3698,7 +3724,7 @@ set FOOBAR ABC_${FOO}_${BAR}
CONFIG_NSH_NESTDEPTH
The maximum number of nested if-then[-else]-fi sequences that
- are permissable. Default: 3
+ are permissible. Default: 3
@@ -3746,7 +3772,7 @@ set FOOBAR ABC_${FOO}_${BAR}
CONFIG_NSH_ROMFSETC
- Mount a ROMFS filesystem at /etc and provide a startup script
+ Mount a ROMFS file system at /etc and provide a startup script
at /etc/init.d/rcS. The default startup script will mount
a FAT FS RAMDISK at /tmp but the logic is
easily extensible.
@@ -3975,7 +4001,7 @@ set FOOBAR ABC_${FOO}_${BAR}
CONFIG_NSH_NOMAC
- Set if your ethernet hardware has no built-in MAC address.
+ Set if your Ethernet hardware has no built-in MAC address.
If set, a bogus MAC will be assigned.
@@ -4248,7 +4274,7 @@ mount -t vfat /dev/ram1 /tmp
-
- Mount the FAT filesystem at a configured mountpoint, /tmp.
+ Mount the FAT file system at a configured mountpoint, /tmp.
@@ -4666,7 +4692,7 @@ CONFIG_SCHED_WAITPID=y
You replace the sample code at apps/examples/nsh/nsh_main.c with whatever start-up logic that you want.
NSH is a library at apps/nshlib.
- apps.examplex/nsh is just a tiny, example start-up function (CONFIG_USER_ENTRYPOINT()) that that runs immediately and illustrates how to start NSH
+ apps.examples/nsh is just a tiny, example start-up function (CONFIG_USER_ENTRYPOINT()) that that runs immediately and illustrates how to start NSH
If you want something else to run immediately then you can write your write your own custom CONFIG_USER_ENTRYPOINT() function and then start other tasks from your custom CONFIG_USER_ENTRYPOINT().
-
@@ -4723,7 +4749,7 @@ CONFIG_SCHED_WAITPID=y
-
- NSH will create a read-only RAM disk (a ROM disk), containing a tiny ROMFS filesystem containing the following:
+ NSH will create a read-only RAM disk (a ROM disk), containing a tiny ROMFS file system containing the following:
`--init.d/
@@ -4734,7 +4760,7 @@ CONFIG_SCHED_WAITPID=y
-
- NSH will then mount the ROMFS filesystem at /etc, resulting in:
+ NSH will then mount the ROMFS file system at /etc, resulting in:
|--dev/
@@ -4841,7 +4867,7 @@ mount -t vfat /dev/ram1 /tmp
To generate a custom rcS file a copy of rcS.template needs to be placed at tools/ and changed according to the desired start-up behaviour.
- Running tools/mkromfsimg.h creates nsh_romfsimg.h which needs to be copied to apps/nhslib OR if CONFIG_NSH_ARCHROMFS is defined to configs/<board>/include.
+ Running tools/mkromfsimg.h creates nsh_romfsimg.h which needs to be copied to apps/nshlib OR if CONFIG_NSH_ARCHROMFS is defined to configs/<board>/include.
@@ -5343,10 +5369,10 @@ xxd -i romfs_img >nsh_romfsimg.h
mkrd
mkromfsimg.sh
mount
+ mv
- mv
nfsmount
nice
- NSH library (
nshlib)
@@ -5403,6 +5429,7 @@ xxd -i romfs_img >nsh_romfsimg.h
up_cxxinitialize()
urldecode
urlencode
+ - USB console startup
useradd
userdel
usleep