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 - Support external registered, "named" applications that can be + Support external registered, "builtin" applications that can be executed from the NSH command line (see apps/README.txt for more information). @@ -3239,48 +3239,48 @@ Builtin Apps: Note that no detailed help information beyond the name of the built-in application is provided.

-

4.3.1 Named Applications

+

4.3.1 Built-In Applications

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:

  1. - 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

  2. - 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:

@@ -3292,23 +3292,23 @@ Builtin Apps:
  1. - apps/namedapp/namedapp_proto.h: + apps/builtin/builtin_proto.h: Prototypes of application task entry points.

  2. - 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:

    @@ -3388,13 +3388,13 @@ make apps_distclean include $(APPDIR)/Make.defs

    - 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:

    @@ -3412,7 +3412,7 @@ STACKSIZE = 2048

  1. - 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.

    @@ -3424,16 +3424,16 @@ STACKSIZE = 2048

- 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.

  1. - 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:

@@ -3762,7 +3762,12 @@ mount -t vfat /dev/ram1 /tmp
  • Background command priority
  • binfs
  • Built-In applications
  • +
  • Built-In application start-up main()
  • Built-in variables
  • +
  • builtin_getname()
  • +
  • builtin_isavail()
  • +
  • builtin_list.h
  • +
  • builtin_proto.h
  • base64dec
  • base64enc
  • cat
  • @@ -3827,12 +3832,12 @@ mount -t vfat /dev/ram1 /tmp
  • echo
  • Environment Variables
  • /etc/init.d/rcS -
  • exec
  • -
  • exec_namedapp()
  • -
  • exit
  • -
  • free
  • +
  • exec
  • +
  • exec_builtin()
  • +
  • exit
  • +
  • free
  • g_cmdmap
  • genromfs
  • get
  • @@ -3858,12 +3863,6 @@ mount -t vfat /dev/ram1 /tmp
  • mkromfsimg.sh
  • mount
  • mv
  • -
  • Named application start-up main()
  • -
  • Named applications
  • -
  • namedapp_getname()
  • -
  • namedapp_isavail()
  • -
  • namedapp_list.h
  • -
  • namedapp_proto.h
  • nfsmount
  • nice
  • NSH library (nshlib)
  • @@ -3887,7 +3886,7 @@ mount -t vfat /dev/ram1 /tmp
  • PWD
  • rcS.template
  • Re-directed commands
  • -
  • Registration of named applications
  • +
  • Registration of builtin applications
  • rm
  • rmdir
  • ROMFS, Modifying the ROMFS image
  • diff --git a/configs/cloudctrl/nsh/defconfig b/configs/cloudctrl/nsh/defconfig index fbb5e8c1397..99c7eb7901c 100644 --- a/configs/cloudctrl/nsh/defconfig +++ b/configs/cloudctrl/nsh/defconfig @@ -505,7 +505,7 @@ CONFIG_HAVE_CXX=y # # Named Applications # -CONFIG_NAMEDAPP=y +CONFIG_BUILTIN=y # # Examples diff --git a/configs/ez80f910200kitg/ostest/defconfig b/configs/ez80f910200kitg/ostest/defconfig index 50efbfdaf34..80c9e682eae 100644 --- a/configs/ez80f910200kitg/ostest/defconfig +++ b/configs/ez80f910200kitg/ostest/defconfig @@ -334,7 +334,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # Named Applications # -# CONFIG_NAMEDAPP is not set +# CONFIG_BUILTIN is not set # # Examples diff --git a/configs/ez80f910200zco/ostest/defconfig b/configs/ez80f910200zco/ostest/defconfig index 3a135233316..88c1b727911 100644 --- a/configs/ez80f910200zco/ostest/defconfig +++ b/configs/ez80f910200zco/ostest/defconfig @@ -342,7 +342,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # Named Applications # -# CONFIG_NAMEDAPP is not set +# CONFIG_BUILTIN is not set # # Examples diff --git a/configs/fire-stm32v2/nsh/defconfig b/configs/fire-stm32v2/nsh/defconfig index 2fb623a0d04..c42bb15696a 100644 --- a/configs/fire-stm32v2/nsh/defconfig +++ b/configs/fire-stm32v2/nsh/defconfig @@ -531,7 +531,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # Named Applications # -CONFIG_NAMEDAPP=y +CONFIG_BUILTIN=y # # Examples diff --git a/configs/p112/ostest/defconfig b/configs/p112/ostest/defconfig index c30adcf2258..3699475c595 100644 --- a/configs/p112/ostest/defconfig +++ b/configs/p112/ostest/defconfig @@ -370,7 +370,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # Named Applications # -# CONFIG_NAMEDAPP is not set +# CONFIG_BUILTIN is not set # # Examples diff --git a/configs/shenzhou/nsh/defconfig b/configs/shenzhou/nsh/defconfig index 36f8e40fc67..c54d714d0d0 100644 --- a/configs/shenzhou/nsh/defconfig +++ b/configs/shenzhou/nsh/defconfig @@ -505,7 +505,7 @@ CONFIG_HAVE_CXX=y # # Named Applications # -CONFIG_NAMEDAPP=y +CONFIG_BUILTIN=y # # Examples diff --git a/configs/shenzhou/nxwm/defconfig b/configs/shenzhou/nxwm/defconfig index 0f100ed5e52..9753277470c 100644 --- a/configs/shenzhou/nxwm/defconfig +++ b/configs/shenzhou/nxwm/defconfig @@ -630,7 +630,7 @@ CONFIG_HAVE_CXXINITIALIZE=y # # Named Applications # -CONFIG_NAMEDAPP=y +CONFIG_BUILTIN=y # # Examples diff --git a/configs/shenzhou/thttpd/defconfig b/configs/shenzhou/thttpd/defconfig index ccbcf9ab25e..958ab02ed16 100644 --- a/configs/shenzhou/thttpd/defconfig +++ b/configs/shenzhou/thttpd/defconfig @@ -474,7 +474,7 @@ CONFIG_HAVE_CXX=y # # Named Applications # -CONFIG_NAMEDAPP=y +CONFIG_BUILTIN=y # # Examples diff --git a/configs/sim/README.txt b/configs/sim/README.txt index f1dfd0dd224..03f163ea5a5 100644 --- a/configs/sim/README.txt +++ b/configs/sim/README.txt @@ -148,9 +148,9 @@ If you are running X11 applications as NSH add-on programs, then the stack size of the add-on program is controlled in another way. Here are the steps for increasing the stack size in that case: - cd ../apps/namedapps # Go to the namedapps directory - vi namedapps_list.h # Edit this file and increase the stack size of the add-on - rm .built *.o # This will force the namedapps logic to rebuild + cd ../apps/builtin # Go to the builtin apps directory + vi builtin_list.h # Edit this file and increase the stack size of the add-on + rm .built *.o # This will force the builtin apps logic to rebuild Buffered I/O Issues ------------------- diff --git a/configs/sim/cxxtest/defconfig b/configs/sim/cxxtest/defconfig index 648a9285194..6ac45d44d80 100644 --- a/configs/sim/cxxtest/defconfig +++ b/configs/sim/cxxtest/defconfig @@ -298,7 +298,7 @@ CONFIG_UCLIBCXX_HAVE_LIBSUPCXX=y # # Named Applications # -# CONFIG_NAMEDAPP is not set +# CONFIG_BUILTIN is not set # # Examples diff --git a/configs/sim/nxwm/defconfig b/configs/sim/nxwm/defconfig index 6a295ef4f20..90ee00f5005 100644 --- a/configs/sim/nxwm/defconfig +++ b/configs/sim/nxwm/defconfig @@ -376,7 +376,7 @@ CONFIG_HAVE_CXX=y # # Named Applications # -# CONFIG_NAMEDAPP is not set +# CONFIG_BUILTIN is not set # # Examples diff --git a/configs/sim/ostest/defconfig b/configs/sim/ostest/defconfig index beee3063986..55687c366ad 100644 --- a/configs/sim/ostest/defconfig +++ b/configs/sim/ostest/defconfig @@ -297,7 +297,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # Named Applications # -# CONFIG_NAMEDAPP is not set +# CONFIG_BUILTIN is not set # # Examples diff --git a/configs/stm3220g-eval/nxwm/defconfig b/configs/stm3220g-eval/nxwm/defconfig index 11e88f7640b..ab061f07a37 100644 --- a/configs/stm3220g-eval/nxwm/defconfig +++ b/configs/stm3220g-eval/nxwm/defconfig @@ -659,7 +659,7 @@ CONFIG_HAVE_CXXINITIALIZE=y # # Named Applications # -# CONFIG_NAMEDAPP is not set +# CONFIG_BUILTIN is not set # # Examples diff --git a/configs/stm3240g-eval/discover/defconfig b/configs/stm3240g-eval/discover/defconfig index 152486d1bb5..e11d39ce1a3 100644 --- a/configs/stm3240g-eval/discover/defconfig +++ b/configs/stm3240g-eval/discover/defconfig @@ -494,7 +494,7 @@ CONFIG_HAVE_CXXINITIALIZE=y # # Named Applications # -# CONFIG_NAMEDAPP is not set +# CONFIG_BUILTIN is not set # # Examples diff --git a/configs/stm3240g-eval/xmlrpc/defconfig b/configs/stm3240g-eval/xmlrpc/defconfig index 6b4c9af7074..4f621d45354 100644 --- a/configs/stm3240g-eval/xmlrpc/defconfig +++ b/configs/stm3240g-eval/xmlrpc/defconfig @@ -487,7 +487,7 @@ CONFIG_HAVE_CXXINITIALIZE=y # # Named Applications # -# CONFIG_NAMEDAPP is not set +# CONFIG_BUILTIN is not set # # Examples diff --git a/configs/stm32f100rc_generic/nsh/defconfig b/configs/stm32f100rc_generic/nsh/defconfig index a0228a3def7..65ac9a73d83 100644 --- a/configs/stm32f100rc_generic/nsh/defconfig +++ b/configs/stm32f100rc_generic/nsh/defconfig @@ -428,7 +428,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # Named Applications # -CONFIG_NAMEDAPP=y +CONFIG_BUILTIN=y # # Examples diff --git a/configs/stm32f100rc_generic/ostest/defconfig b/configs/stm32f100rc_generic/ostest/defconfig index 0041feb502e..2d2842c5432 100644 --- a/configs/stm32f100rc_generic/ostest/defconfig +++ b/configs/stm32f100rc_generic/ostest/defconfig @@ -410,7 +410,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # Named Applications # -# CONFIG_NAMEDAPP is not set +# CONFIG_BUILTIN is not set # # Examples diff --git a/configs/stm32f4discovery/cxxtest/defconfig b/configs/stm32f4discovery/cxxtest/defconfig index 6487742cf31..e7fa4995416 100644 --- a/configs/stm32f4discovery/cxxtest/defconfig +++ b/configs/stm32f4discovery/cxxtest/defconfig @@ -426,7 +426,7 @@ CONFIG_UCLIBCXX_HAVE_LIBSUPCXX=y # # Named Applications # -# CONFIG_NAMEDAPP is not set +# CONFIG_BUILTIN is not set # # Examples diff --git a/configs/stm32f4discovery/elf/defconfig b/configs/stm32f4discovery/elf/defconfig index 9379c885b54..3f5a5d0fcf7 100644 --- a/configs/stm32f4discovery/elf/defconfig +++ b/configs/stm32f4discovery/elf/defconfig @@ -460,7 +460,7 @@ CONFIG_HAVE_CXX=y # # Named Applications # -# CONFIG_NAMEDAPP is not set +# CONFIG_BUILTIN is not set # # Examples diff --git a/configs/stm32f4discovery/nxlines/defconfig b/configs/stm32f4discovery/nxlines/defconfig index 8609993ea16..58eebd41f11 100644 --- a/configs/stm32f4discovery/nxlines/defconfig +++ b/configs/stm32f4discovery/nxlines/defconfig @@ -518,7 +518,7 @@ CONFIG_HAVE_CXXINITIALIZE=y # # Named Applications # -# CONFIG_NAMEDAPP is not set +# CONFIG_BUILTIN is not set # # Examples diff --git a/configs/stm32f4discovery/ostest/defconfig b/configs/stm32f4discovery/ostest/defconfig index b29622c8ed3..5fdd30f57e2 100644 --- a/configs/stm32f4discovery/ostest/defconfig +++ b/configs/stm32f4discovery/ostest/defconfig @@ -430,7 +430,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # Named Applications # -# CONFIG_NAMEDAPP is not set +# CONFIG_BUILTIN is not set # # Examples diff --git a/configs/stm32f4discovery/winbuild/defconfig b/configs/stm32f4discovery/winbuild/defconfig index ac8a18c9bb2..95be148865f 100644 --- a/configs/stm32f4discovery/winbuild/defconfig +++ b/configs/stm32f4discovery/winbuild/defconfig @@ -430,7 +430,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # Named Applications # -# CONFIG_NAMEDAPP is not set +# CONFIG_BUILTIN is not set # # Examples diff --git a/configs/vsn/src/README.txt b/configs/vsn/src/README.txt index 4e2d50e0b15..87a538a109d 100644 --- a/configs/vsn/src/README.txt +++ b/configs/vsn/src/README.txt @@ -12,7 +12,7 @@ Execution starts in the following order: is set. It must be set for the VSN board. - boot, performs initial chip and board initialization - - sched/os_bringup.c then calls either user_start or exec_namedapp() + - sched/os_bringup.c then calls either user_start or exec_builtin() with application as set in the .config @@ -55,4 +55,5 @@ Compile notes To link-in the sif_main() utility do, in this folder: - make context TOPDIR= -This will result in registering the application into the namedapp. +This will result in registering the application into the builtin application +registry. diff --git a/configs/xtrs/nsh/defconfig b/configs/xtrs/nsh/defconfig index 8730ebab72e..72b32d9aaa6 100644 --- a/configs/xtrs/nsh/defconfig +++ b/configs/xtrs/nsh/defconfig @@ -303,7 +303,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # Named Applications # -# CONFIG_NAMEDAPP is not set +# CONFIG_BUILTIN is not set # # Examples diff --git a/configs/xtrs/ostest/defconfig b/configs/xtrs/ostest/defconfig index a0a100bcfd4..74a0199dfef 100644 --- a/configs/xtrs/ostest/defconfig +++ b/configs/xtrs/ostest/defconfig @@ -302,7 +302,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # Named Applications # -# CONFIG_NAMEDAPP is not set +# CONFIG_BUILTIN is not set # # Examples diff --git a/configs/xtrs/pashello/defconfig b/configs/xtrs/pashello/defconfig index d23c5071637..abdaf1f3591 100644 --- a/configs/xtrs/pashello/defconfig +++ b/configs/xtrs/pashello/defconfig @@ -303,7 +303,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # Named Applications # -# CONFIG_NAMEDAPP is not set +# CONFIG_BUILTIN is not set # # Examples diff --git a/configs/z16f2800100zcog/ostest/defconfig b/configs/z16f2800100zcog/ostest/defconfig index defd3d5efae..64828738f29 100644 --- a/configs/z16f2800100zcog/ostest/defconfig +++ b/configs/z16f2800100zcog/ostest/defconfig @@ -342,7 +342,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # Named Applications # -# CONFIG_NAMEDAPP is not set +# CONFIG_BUILTIN is not set # # Examples diff --git a/configs/z16f2800100zcog/pashello/defconfig b/configs/z16f2800100zcog/pashello/defconfig index f3067a9e7c3..ba99283d33d 100644 --- a/configs/z16f2800100zcog/pashello/defconfig +++ b/configs/z16f2800100zcog/pashello/defconfig @@ -342,7 +342,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # Named Applications # -# CONFIG_NAMEDAPP is not set +# CONFIG_BUILTIN is not set # # Examples diff --git a/configs/z80sim/nsh/defconfig b/configs/z80sim/nsh/defconfig index fb9fac5462e..d13f0f7f7f1 100644 --- a/configs/z80sim/nsh/defconfig +++ b/configs/z80sim/nsh/defconfig @@ -303,7 +303,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # Named Applications # -# CONFIG_NAMEDAPP is not set +# CONFIG_BUILTIN is not set # # Examples diff --git a/configs/z80sim/ostest/defconfig b/configs/z80sim/ostest/defconfig index d3410d52d34..bd4144821a6 100644 --- a/configs/z80sim/ostest/defconfig +++ b/configs/z80sim/ostest/defconfig @@ -302,7 +302,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # Named Applications # -# CONFIG_NAMEDAPP is not set +# CONFIG_BUILTIN is not set # # Examples diff --git a/configs/z80sim/pashello/defconfig b/configs/z80sim/pashello/defconfig index e7dee626c1a..58d609c4b89 100644 --- a/configs/z80sim/pashello/defconfig +++ b/configs/z80sim/pashello/defconfig @@ -302,7 +302,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # Named Applications # -# CONFIG_NAMEDAPP is not set +# CONFIG_BUILTIN is not set # # Examples diff --git a/configs/z8encore000zco/ostest/defconfig b/configs/z8encore000zco/ostest/defconfig index 7d9b227f4b1..7bd512727ed 100644 --- a/configs/z8encore000zco/ostest/defconfig +++ b/configs/z8encore000zco/ostest/defconfig @@ -329,7 +329,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # Named Applications # -# CONFIG_NAMEDAPP is not set +# CONFIG_BUILTIN is not set # # Examples diff --git a/configs/z8f64200100kit/ostest/defconfig b/configs/z8f64200100kit/ostest/defconfig index a3495298726..e98e4156186 100644 --- a/configs/z8f64200100kit/ostest/defconfig +++ b/configs/z8f64200100kit/ostest/defconfig @@ -329,7 +329,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # Named Applications # -# CONFIG_NAMEDAPP is not set +# CONFIG_BUILTIN is not set # # Examples diff --git a/sched/os_bringup.c b/sched/os_bringup.c index e0a236bbed2..4b5adcae1a8 100644 --- a/sched/os_bringup.c +++ b/sched/os_bringup.c @@ -189,11 +189,11 @@ int os_bringup(void) svdbg("Starting init thread\n"); #ifdef CONFIG_BUILTIN_APP_START - /* Start the built-in named application, passing an "init" argument, so that + /* Start the built-in application, passing an "init" argument, so that * application can distinguish different run-levels */ - init_taskid = exec_namedapp(CONFIG_BUILTIN_APP_START, argv); + init_taskid = exec_builtin(CONFIG_BUILTIN_APP_START, argv); #else /* Start the default application at CONFIG_USER_ENTRYPOINT() */