From f830376ef26cc8758da18f219aff88ea3c695950 Mon Sep 17 00:00:00 2001 From: Alan Carvalho de Assis Date: Wed, 5 Jun 2024 14:55:22 -0300 Subject: [PATCH] DOC: Add how to get application on NSH Signed-off-by: Alan C. Assis --- Documentation/faq/index.rst | 49 +++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/Documentation/faq/index.rst b/Documentation/faq/index.rst index 3abf036fd4..1347df2c3a 100644 --- a/Documentation/faq/index.rst +++ b/Documentation/faq/index.rst @@ -8,6 +8,55 @@ FAQ NSH Tricks ========== +How to get an application available in the NSH? +----------------------------------------------- + +You will need at least three things enabled inside NuttX menuconfig +to be able to see an application this displayed there: +BUILTIN, NSH_BUILTIN_APPS and the application itself. +Enabling BUILTIN:: + + Library Routines ---> + [*] Support Builtin Applications + +Enabling NSH_BUILTIN_APPS:: + + Application Configuration ---> + NSH Library ---> + [*] Enable built-in applications + +Enabling Hello World Application:: + + Application Configuration ---> + Examples ---> + [*] "Hello, World!" example + +After compilation you should see the hello at NSH: + +.. code-block:: shell + + NuttShell (NSH) NuttX-12.5.1 + nsh> ? + help usage: help [-v] [] + . cp exit mkdir set unset + [ cmp expr mkrd sleep uptime + ? dirname false mount source usleep + alias dd fdinfo mv test xd + unalias df free pidof time + basename dmesg help printf true + break echo hexdump pwd truncate + cat env kill rm uname + cd exec ls rmdir umount + Builtin Apps: + hello nsh sh + nsh> + +Note: if you want to see the applications physically at /bin you can +enable BINFS:: + + File Systems ---> + [*] BINFS File System + How to increase the command line length? ----------------------------------------