diff --git a/Documentation/NuttShell.html b/Documentation/NuttShell.html index 0b5f7aa11b5..cc3f078ddfd 100644 --- a/Documentation/NuttShell.html +++ b/Documentation/NuttShell.html @@ -2515,7 +2515,7 @@ nsh>
CONFIG_NSH_BUILTIN_APPS
Overview.
- The underlying logic that supports the NSH built-in applications is called "Named Applications".
- The named application logic can be found at apps/namedapp.
+ The underlying logic that supports the NSH built-in applications is called "Built-In Applications".
+ The builtin application logic can be found at apps/builtin.
This logic simply does the following:
- It supports registration mechanism so that named applications can dynamically register themselves at build time, and + It supports registration mechanism so that builtin applications can dynamically register themselves at build time, and
- Utility functions to look up, list, and execute the named applications. + Utility functions to look up, list, and execute the builtin applications.
- Named Application Utility Functions.
- The utility functions exported by the named application logic are prototyped in apps/include/apps.h.
+ Built-In Application Utility Functions.
+ The utility functions exported by the builtin application logic are prototyped in apps/include/apps.h.
These utility functions include:
- int namedapp_isavail(FAR const char *appname);
+ int builtin_isavail(FAR const char *appname);
Checks for availability of application registered as appname during build time.
- const char *namedapp_getname(int index);
+ const char *builtin_getname(int index);
Returns a pointer to a name of built-in application pointed by the index.
This is the utility function that is used by NSH in order to list the available built-in applications when "nsh> help" is entered.
- int exec_namedapp(FAR const char *appname, FAR const char **argv);
- Executes built-in named application registered during compile time.
+ int exec_builtin(FAR const char *appname, FAR const char **argv);
+ Executes built-in builtin application registered during compile time.
This is the utility function used by NSH to execute the built-in application.
- apps/namedapp/namedapp_proto.h:
+ apps/builtin/builtin_proto.h:
Prototypes of application task entry points.
- apps/namedapp/namedapp_list.h:
+ apps/builtin/builtin_list.h:
Application specific information and start-up requirements
- Registration of Named Applications.
+ Registration of Built-In Applications.
The NuttX build occurs in several phases as different build targets are executed:
(1) context when the configuration is established,
(2) depend when target dependencies are generated, and
(3) default (all) when the normal compilation and link operations are performed.
- Named application information is collected during the make context build phase.
+ Built-in application information is collected during the make context build phase.
@@ -3376,7 +3376,7 @@ make apps_distclean
- Logic for the context target in apps/examples/hello/Makefile registers the hello_main() application in the namedapp's namedapp_proto.hand namedapp_list.h files.
+ Logic for the context target in apps/examples/hello/Makefile registers the hello_main() application in the builtin's builtin_proto.hand builtin_list.h files.
That logic that does that in apps/examples/hello/Makefile is abstracted below:
- This defines a macro called REGISTER that adds data to the namedapp header files:
+ This defines a macro called REGISTER that adds data to the builtin header files:
define REGISTER
@echo "Register: $1"
- @echo "{ \"$1\", $2, $3, $4 }," >> "$(APPDIR)/namedapp/namedapp_list.h"
- @echo "EXTERN int $4(int argc, char *argv[]);" >> "$(APPDIR)/namedapp/namedapp_proto.h"
+ @echo "{ \"$1\", $2, $3, $4 }," >> "$(APPDIR)/builtin/builtin_list.h"
+ @echo "EXTERN int $4(int argc, char *argv[]);" >> "$(APPDIR)/builtin/builtin_proto.h"
endef
@@ -3412,7 +3412,7 @@ STACKSIZE = 2048
- And finally, the Makefile invokes the REGISTER macro to added the hello_main() named application.
+ And finally, the Makefile invokes the REGISTER macro to added the hello_main() builtin application.
Then, when the system build completes, the hello command can be executed from the NSH command line.
When the hello command is executed, it will start the task with entry point hello_main() with the default priority and with a stack size of 2K.
- Other Uses of Named Application. - The primary purpose of named applications is to support command line execution of applications from NSH. - However, there are two other uses of named applications that should be mentioned. + Other Uses of Built-In Application. + The primary purpose of builtin applications is to support command line execution of applications from NSH. + However, there are two other uses of builtin applications that should be mentioned.
- Named Application Start-Up main() function.
- A named application can even be used as the main, start-up entry point into your embedded software.
+ Built-In Application Start-Up main() function.
+ A builtin application can even be used as the main, start-up entry point into your embedded software.
When the user defines this option in the NuttX configuration file:
@@ -3451,11 +3451,11 @@ CONFIG_BUILTIN_APP_START=<application name>
binfs.
- binfs is a tiny file system located at apps/namedapp/binfs.c.
- This provides an alternative what of visualizing installed named applications.
- Without binfs, you can see the installed named applications using the NSH help command.
+ binfs is a tiny file system located at apps/builtin/binfs.c.
+ This provides an alternative what of visualizing installed builtin applications.
+ Without binfs, you can see the installed builtin applications using the NSH help command.
binfs will create a tiny pseudo-file system mounted at /bin.
- Using binfs, you can see the available named applications by listing the contents of /bin directory.
+ Using binfs, you can see the available builtin applications by listing the contents of /bin directory.
This gives some superficial Unix compatibility, but does not really add any new functionality.
binfsmain()builtin_getname()builtin_isavail()builtin_list.hbuiltin_proto.hbase64decbase64enccatecho/etc/init.d/rcS
- execexec_namedapp()exitfreeexecexec_builtin()exitfreeg_cmdmapgenromfsgetmkromfsimg.shmountmvmain()namedapp_getname()namedapp_isavail()namedapp_list.hnamedapp_proto.hnfsmountnicenshlib)PWDrcS.templatermrmdir