diff --git a/Documentation/NuttShell.html b/Documentation/NuttShell.html index af8eeba20b0..5ee579995f1 100644 --- a/Documentation/NuttShell.html +++ b/Documentation/NuttShell.html @@ -8,7 +8,7 @@
Last Updated: April 5, 2017
+Last Updated: June 6, 2017
Optional Syntax Extensions - Because these features commit significant resources, it is disabled by default. + Because these features commit significant resources, they are disabled by default.
FOO to XYZ, BAR to 123 and FOOBAR to ABC_XYZ_123.
- If CONFIG_NSH_ARGCAT is not selected, then a slightly small FLASH footprint results but then also only simple environment variables like $FOO can be used on the command line.
+ If CONFIG_NSH_ARGCAT is not selected, then a slightly smaller FLASH footprint results but then also only simple environment variables like $FOO can be used on the command line.
@@ -820,7 +820,7 @@ set FOOBAR ABC_${FOO}_${BAR}
An if-then[-else]-fi construct is also supported in order to
support conditional execution of commands. This works from the
command line but is primarily intended for use within NSH scripts
- (see the sh commnd). The syntax is as follows:
+ (see the sh command). The syntax is as follows:
if <cmd> @@ -1058,7 +1058,7 @@ mount -t vfat /dev/ram1 /tmp All of the startup-behavior is contained inrcS.template. The role ofmkromfsimg.shis to (1) apply the specific configuration settings torcS.templateto create the finalrcS, and (2) to - generate the header filensh_romfsimg.hcontaing the ROMFS + generate the header filensh_romfsimg.hcontaining the ROMFS file system image. @@ -1139,7 +1139,7 @@ addroute <target> <netmask> <router>Synopsis. This command adds an entry in the routing table. - The new entry will map the IP address of a router on a local network(<router>) to an external network characterized by the <target> IP address and a network mask <netmask> + The new entry will map the IP address of a router on a local network (<router>) to an external network characterized by the <target> IP address and a network mask <netmask>
Example: @@ -1274,7 +1274,7 @@ cat
<path>[<path>[<path>Synopsis. - This command copies and concatentates all of the files at
@@ -1425,7 +1425,7 @@ nsh> dd if=/dev/zero of=/dev/ram0<path>+ This command copies and concatenates all of the files at<path>to the console (or to another file if the output is redirected).
exec command) and you would like to have NSH out of the
- way. For the telnet front-end, exit terminates the telenet session.
+ way. For the telnet front-end, exit terminates the telnet session.
-b|-n |
- Selects either binary ("octet") or test ("netascii") transfer + Selects either binary ("octet") or text ("netascii") transfer mode. Default: text. |
skip=<bytes> |
+ Will skip <bytes> number of bytes from the beginning.
+ |
count=<bytes> |
+ Will stop after dumping <bytes> number of bytes.
+ |
+The skip and count options are only available if CONFIG_NSH_CMDOPT_HEXDUMP is defined in the NuttX configuration.
+
- 2.30 List to a File or Directory (ln)+2.30 Link to a File or Directory (ln) |
Command Syntax:
-link [-s] <target> <link> +ln [-s] <target> <link>
Synopsis.
- The link command will create a new symbolic link at <link> for the existing file or directory, <target>.
- This implementation is simplied for use with NuttX in these ways:
+ The ln command will create a new symbolic link at <link> for the existing file or directory, <target>.
+ This implementation is simplified for use with NuttX in these ways:
<hex-address>. |
+ <hex-address> |
Specifies the address to be accessed. The current value at that address will always be read and displayed. |
<hex-address>=<hex-value>. |
+ <hex-address>=<hex-value> |
Read the value, then write <hex-value>
to the location.
|
<hex-byte-count>. |
+ <hex-byte-count> |
Perform the mb, mh, or mw operation on a total
- of <hex-byte-count> bytes, increment the <hex-address> appropriately
- after each access
+ of <hex-byte-count> bytes, increment the <hex-address> appropriately after each access.
|
Example:
@@ -2307,8 +2319,8 @@ mount -t <fstype> [-o <options>] <block-device> <dir-
If no parameters are provided on the command line after the mount command, then the mount command will enumerate all of the current mountpoints on the console.
- If the mount parameters are provied on the command after the mount command, then the mount command will mount a file system in the NuttX pseudo-file system.
- mount' performs a three way association, binding:
+ If the mount parameters are provided on the command after the mount command, then the mount command will mount a file system in the NuttX pseudo-file system.
+ mount performs a three way association, binding:
<dir-
After the volume has been mounted in the NuttX
pseudo filesystem,
- it may be access in the same way as other objects in thefile system.
+ it may be access in the same way as other objects in the file system.
Examples:
Using mount to mount a file system:
@@ -2527,7 +2539,7 @@ put [-b|-n] [-f <remote-path>] -h <ip-address> <local-path>
-b|-n
- Selects either binary ("octet") or test ("netascii") transfer
+ Selects either binary ("octet") or text ("netascii") transfer
mode. Default: text.
@@ -2712,10 +2724,7 @@ set [{+|-}{e|x|xe|ex}] [<name> <value>]
Synopsis.
- Set the environment variable <name> to the string <value> and or set NSH
- parser control options. For example,
-
- For example,
+ Set the environment variable <name> to the string <value> and or set NSH parser control options. For example,
nsh> echo $foobar @@ -2728,7 +2737,7 @@ nsh>- Example 3 - will exit on command not found, and print a trace of the script commmands + Example 3 - will exit on command not found, and print a trace of the script commandsSet the 'exit on error control' and/or 'print a trace' of commands when parsing - scripts in NSH. The settinngs are in effect from the point of exection, until + scripts in NSH. The settings are in effect from the point of execution, until they are changed again, or in the case of the init script, the settings are returned to the default settings when it exits. Included child scripts will run with the parents settings and changes made in the child script will effect the @@ -2740,9 +2749,8 @@ nsh>
Use 'set -x' to enable and 'set +x' to disable (silence) printing a trace of the script - commands as they are ececuted. - The default is +x. No printing of a trace of script commands as they are executed. - + commands as they are executed. + The default is +x: no printing of a trace of script commands as they are executed.
Example 1 - no exit on command not found @@ -2757,16 +2765,16 @@ nsh> notacommand
set -ex
- Example 4 - will exit on command not found, and print a trace of the script commmands
+ Example 4 - will exit on command not found, and print a trace of the script commands
and set foobar to foovalue.
set -ex foobar foovalue
- nsh> echo $foobar
+ nsh> echo $foobar
foovalue
@@ -2855,8 +2863,7 @@ nsh> time "sleep 2"
nsh>
- The additional 10 millseconds in this example is due to the way that the sleep command works: It always waits one system clock tick longer than requested and this test setup used a 10 millisecond periodic system - timer. + The additional 10 milliseconds in this example is due to the way that the sleep command works: It always waits one system clock tick longer than requested and this test setup used a 10 millisecond periodic system timer. Sources of error could include various quantization errors, competing CPU usage, and the additional overhead of the time command execution itself which is included in the total.
@@ -2949,7 +2956,7 @@ uname [-a | -imnoprsv]
-nCONFIG_NET=y)
+ Print the network node hostname (only available if CONFIG_NET=y)
- Note that in addition to general NuttX configuation settings, each NSH command can be + Note that in addition to general NuttX configuration settings, each NSH command can be individually disabled via the settings in the rightmost column. All of these settings make the configuration of NSH potentially complex but also allow it to squeeze into very small memory footprints. @@ -3336,13 +3343,13 @@ nsh>
lnCONFIG_NFILE_DESCRIPTORS > 0CONFIG_NSH_DISABLE_LLCONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_PSEUDOFS_SOFTLINKSCONFIG_NSH_DISABLE_LNlsCONFIG_NFILE_DESCRIPTORS > 0CONFIG_NSH_DISABLE_LS && CONFIG_PSEUDOFS_SOFTLINKSCONFIG_NSH_DISABLE_LSlsmodCONFIG_DISABLE_ENVIRON && CONFIG_NFILE_DESCRIPTORS > 0CONFIG_NSH_DISABLE_PWDreadlinkCONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_PSEUDOFS_SOFTLINKSCONFIG_NSH_DISABLE_READLINKrebootCONFIG_BOARD_RESETtimeCONFIG_NSH_DISABLE_TIMEunameCONFIG_NSH_DISABLE_UNAME1
Because of hardware padding, the actual required packet size may be larger
- So, for you sample commnd, you would add the following the to the
- And finally, the
@@ -4845,7 +4857,7 @@ mount -t vfat /dev/ram1 /tmp
All of the startup-behavior is contained in
- You can see that 9.9KB (62%) of SRAM heap is staill available for further application development while NSH is running.
+ You can see that 9.9KB (62%) of SRAM heap is still available for further application development while NSH is running.
- STMicro STM32F152x/162x(STM32 F1 "EnergyLite" Medium+ Density Family).
- Support for the STM32152 and STM32162 Medium+ density parts from Jussi Kivilinna and Sami Pelkonen was included in NuttX-7.3, extending the basic STM32F152x support.
- This is architecture-only support, meaning that support for the boards with these chips is available, but not support for any publicly available boards is included.
+ STMicro STM32L152x/162x (STM32 L1 "EnergyLite" Medium+ Density Family).
+ Support for the STM32L152 and STM32L162 Medium+ density parts from Jussi Kivilinna and Sami Pelkonen was included in NuttX-7.3, extending the basic STM32L152x support.
+ This is architecture-only support, meaning that support for the boards with these chips is available, but no support for any publicly available boards is included.
2
- Special TFTP server start-up optionss will probably be required to permit
+ Special TFTP server start-up options will probably be required to permit
creation of files for the correct operation of the put command.
3
CONFIG_FS_READABLE is not a user configuration but is set automatically
@@ -3837,7 +3849,7 @@ set FOOBAR ABC_${FOO}_${BAR}
CONFIG_NSH_TELNET
- If CONFIG_NSH_TELNET is set to y, then a TELENET
+ If CONFIG_NSH_TELNET is set to y, then a TELNET
server front-end is selected. When this option is provided,
you may log into NuttX remotely using telnet in order to
access NSH.
@@ -3932,7 +3944,7 @@ set FOOBAR ABC_${FOO}_${BAR}
CONFIG_NSH_IOBUFFER_SIZE
Determines the size of the I/O buffer to use for sending/
- receiving TELNET commands/reponses
+ receiving TELNET commands/responses
@@ -4364,7 +4376,7 @@ struct cmdmap_s
That last string is what is printed when enter "
@@ -2883,9 +2883,9 @@ nsh>
nsh> help".
g_cmdmap[] table:
+ So, for you sample command, you would add the following the to the g_cmdmap[] table:
{ "mycmd", cmd_mycmd, 1, 1, NULL },
@@ -4525,7 +4537,7 @@ int hello_main(int argc, char *argv[])
apps/examples/Makefile will execute the context target in all configured examplesub-directores, getting us finally to apps/examples/Makefile which is covered below.apps/examples/Makefile will execute the context target in all configured examplesub-directories, getting us finally to apps/examples/Makefile which is covered below.
rcS.template.
- The role of mkromfsimg.sh script is to (1) apply the specific configuration settings to rcS.template to create the final rcS, and (2) to generate the header file nsh_romfsimg.h containg the ROMFS file system image.
+ The role of mkromfsimg.sh script is to (1) apply the specific configuration settings to rcS.template to create the final rcS, and (2) to generate the header file nsh_romfsimg.h containing the ROMFS file system image.
To do this, mkromfsimg.sh uses two tools that must be installed in your system:
@@ -5316,13 +5328,13 @@ xxd -i romfs_img >nsh_romfsimg.h
insmodkilllosetuplnlsmblsmodmd5mhmwmkdir
- The other port is for a generic minimual STM32F103CBT6 "blue" board contributed by Alan Carvalho de Assis. + The other port is for a generic minimal STM32F103CBT6 "blue" board contributed by Alan Carvalho de Assis. Alan added support for numerous sensors, tone generators, user LEDs, and LCD support in NuttX 7.18.
STMicro STM32F107x (STM32 F1 "Connectivity Line" family). - Chip support for the STM32 F1 "Connectivity Line" family has been present in NuttX for some time and users have reported that they have successful brought up NuttX on theor proprietary boards using this logic. + Chip support for the STM32 F1 "Connectivity Line" family has been present in NuttX for some time and users have reported that they have successful brought up NuttX on their proprietary boards using this logic.
- STMicro ST Nucleo F303RE board.. + STMicro ST Nucleo F303RE board. Contributed by Paul Alexander Patience.
+ NuttX-7.21. + Additional drivers were added: +
+pthread_mutex_timedlock. lock a mutex.pthread_mutexattr_getprioceiling. get and set the prioceiling attribute of the mutex attributes object.pthread_mutexattr_setprioceiling. get and set the prioceiling attribute of the mutex attributes object.pthread_rwlock_destroy. destroy and initialize a read-write lock object.pthread_rwlock_init. destroy and initialize a read-write lock object.pthread_rwlock_rdlock. lock a read-write lock object for reading.pthread_rwlock_timedrdlock. lock a read-write lock for reading.pthread_rwlock_timedwrlock. lock a read-write lock for writing.pthread_rwlock_tryrdlock. lock a read-write lock object for reading.pthread_rwlock_trywrlock. lock a read-write lock object for writing.pthread_rwlock_unlock. unlock a read-write lock object.pthread_rwlock_wrlock. lock a read-write lock object for writing.pthread_rwlockattr_destroy. destroy and initialize the read-write lock attributes object.pthread_rwlockattr_getpshared. get and set the process-shared attribute of the read-write lock attributes object.pthread_rwlockattr_init. destroy and initialize the read-write lock attributes object.