nuttx-apps/system/nsh/README.md

51 lines
1.3 KiB
Markdown
Raw Normal View History

2020-07-23 15:19:35 +02:00
# System / `nsh` NuttShell (NSH)
2020-07-23 15:19:35 +02:00
## Basic Configuration
2020-07-23 15:19:35 +02:00
This directory provides an example of how to configure and use the NuttShell
(NSH) application. NSH is a simple shell application. NSH is described in its
own README located at `apps/nshlib/README.md`. This function is enabled with:
2020-07-23 15:19:35 +02:00
```conf
CONFIG_SYSTEM_NSH=y
```
2020-07-23 15:19:35 +02:00
Applications using this example will need to provide an `defconfig` file in the
configuration directory with instruction to build the NSH library like:
2020-07-23 15:19:35 +02:00
```conf
CONFIG_NSH_LIBRARY=y
```
2020-07-23 15:19:35 +02:00
## Other Configuration Requirements
2020-07-23 15:19:35 +02:00
**Note**: If the NSH serial console is used, then following is also required to
build the `readline()` library:
2020-07-23 15:19:35 +02:00
```conf
CONFIG_SYSTEM_READLINE=y
```
2020-07-23 15:19:35 +02:00
And if networking is included:
2020-07-23 15:19:35 +02:00
```conf
CONFIG_NETUTILS_NETLIB=y
CONFIG_NETUTILS_DHCPC=y
CONFIG_NETDB_DNSCLIENT=y
CONFIG_NETUTILS_TFTPC=y
CONFIG_NETUTILS_WEBCLIENT=y
```
2020-07-23 15:19:35 +02:00
If the Telnet console is enabled, then the defconfig file should also include:
2020-07-23 15:19:35 +02:00
```conf
CONFIG_NETUTILS_TELNETD=y
```
Also if the Telnet console is enabled, make sure that you have the following set
in the NuttX configuration file or else the performance will be very bad
(because there will be only one character per TCP transfer):
- `CONFIG_STDIO_BUFFER_SIZE` - Some value `>= 64`
- `CONFIG_STDIO_LINEBUFFER=y`