summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-06 17:00:08 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-06 17:00:08 +0000
commit12a4dc288fc222ab3bee2ee69e3ebb6969b2dce6 (patch)
treec6e57e765f7e596480a82217fd49cd3528ee0b58
parent7f6ca26cb1b0fe979edd7bd4ba0535801178847a (diff)
downloadnuttx-12a4dc288fc222ab3bee2ee69e3ebb6969b2dce6.tar.gz
nuttx-12a4dc288fc222ab3bee2ee69e3ebb6969b2dce6.tar.bz2
nuttx-12a4dc288fc222ab3bee2ee69e3ebb6969b2dce6.zip
Remove CONFIG_BUILTIN_APPS_START
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5482 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r--apps/README.txt15
-rw-r--r--nuttx/ChangeLog5
-rw-r--r--nuttx/Documentation/NuttShell.html25
-rw-r--r--nuttx/sched/os_bringup.c22
4 files changed, 10 insertions, 57 deletions
diff --git a/apps/README.txt b/apps/README.txt
index 328126905..4a336abdb 100644
--- a/apps/README.txt
+++ b/apps/README.txt
@@ -141,21 +141,6 @@ This will select the apps/examples/hello in the following way:
Thus accomplishing the same thing with no apps/.config file.
-Built-In 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:
-
- CONFIG_BUILTIN_APP_START=<application name>
-
-that application shall be invoked immediately after system starts
-*instead* of the default "user_start" entry point.
-Note that <application name> must be provided as: "hello",
-will call:
-
- int hello_main(int argc, char *argv[])
-
Example Built-In Application
----------------------------
An example application skeleton can be found under the examples/hello
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index b27800419..f4f697563 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -3875,3 +3875,8 @@
definitions (from Rommel Marcelo).
* libc/string/lib_strndup.c: strndup() should use strnlen(), not
strlen(), to determine the size of the string.
+ * sched/os_bringup.c: Remove support for CONFIG_BUILTIN_APP_START.
+ This is not really a useful feature and creates a violation of the
+ OS layered architecture.
+
+
diff --git a/nuttx/Documentation/NuttShell.html b/nuttx/Documentation/NuttShell.html
index 7ad96da79..95a75b22c 100644
--- a/nuttx/Documentation/NuttShell.html
+++ b/nuttx/Documentation/NuttShell.html
@@ -3421,30 +3421,11 @@ context:
<p>
<b>Other Uses of Built-In Application.</b>
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.
+ However, there is one other use of builtin applications that should be mentioned.
</p>
<ol>
<li>
- <p>
- <b>Built-In Application Start-Up <code>main()</code> function</b>.
- 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:
- </p>
-<ul><pre>
-CONFIG_BUILTIN_APP_START=&lt;application name&gt;
-</pre></ul>
- <p>
- that application will be invoked immediately after system starts instead of the default <code>CONFIG_USER_ENTRYPOINT</code>() entry point.
- Note that <code>&lt;application name&gt;</code> must be provided just as it would have been on the NSH command line.
- For example, <code>hello</code> would result in <code>hello_main()</code> being started at power-up.
- </p>
- <p>
- This option might be useful in some develop environments where you use NSH only during the debug phase, but want to eliminate NSH in the final product.
- Setting <code>CONFIG_BUILTIN_APP_START</code> in this way will bypass NSH and execute your application just as if it were entered from the NSH command line.
- </p>
-
- <li>
<p><b><i>binfs</i></b>.
<i>binfs</i> is a tiny file system located at <code>apps/builtin/binfs.c</code>.
This provides an alternative what of visualizing installed builtin applications.
@@ -3452,7 +3433,8 @@ CONFIG_BUILTIN_APP_START=&lt;application name&gt;
<i>binfs</i> will create a tiny pseudo-file system mounted at <code>/bin</code>.
Using <i>binfs</i>, you can see the available builtin applications by listing the contents of <code>/bin</code> directory.
This gives some superficial Unix compatibility, but does not really add any new functionality.
- </p>
+ </p>
+ </li>
</ol>
<h3>4.3.2 Synchronous Built-In Applications</h3>
@@ -3770,7 +3752,6 @@ mount -t vfat /dev/ram1 /tmp
<li><a href="#commands">Command summaries</a></li>
<li><a href="#custoncmds">Command table</a></li>
<li><a href="#conditional">Conditional command execution</a></li>
- <li><a href="#custapps"><code>CONFIG_BUILTIN_APP_START</code></a></li>
<li><a href="#custinit"><code>CONFIG_DISABLE_MOUNTPOINT</code></a></li>
<li><a href="#custinit"><code>CONFIG_FS_ROMFS</code></a></li>
<li><a href="#custinit"><code>CONFIG_NFILE_DESCRIPTORS</code></a></li>
diff --git a/nuttx/sched/os_bringup.c b/nuttx/sched/os_bringup.c
index 4b5adcae1..610d8515a 100644
--- a/nuttx/sched/os_bringup.c
+++ b/nuttx/sched/os_bringup.c
@@ -57,9 +57,6 @@
#ifdef CONFIG_SCHED_WORKQUEUE
# include "work_internal.h"
#endif
-#ifdef CONFIG_BUILTIN_APP_START
-# include "apps/apps.h"
-#endif
#ifdef CONFIG_NUTTX_KERNEL
# include "arch/board/user_map.h"
#endif
@@ -112,22 +109,15 @@
* function is to serve as the "bottom half" of device
* drivers.
*
- * And the main application entry point. This may be one of two different
+ * And the main application entry point:
* symbols:
*
- * - USER_ENTRYPOINT: This is the default entry point used for all of the
- * example code in apps/examples.
- * - CONFIG_BUILTIN_APP_START: The system can also be configured to start
- * custom applications at however CONFIG_BUILTIN_APP_START
- * is defined in the NuttX start-up file.
+ * - USER_ENTRYPOINT: This is the default user application entry point.
*
****************************************************************************/
int os_bringup(void)
{
-#ifdef CONFIG_BUILTIN_APP_START
- static const char *argv[3] = {NULL, "init", NULL};
-#endif
int init_taskid;
/* Setup up the initial environment for the idle task. At present, this
@@ -188,19 +178,11 @@ int os_bringup(void)
svdbg("Starting init thread\n");
-#ifdef CONFIG_BUILTIN_APP_START
- /* Start the built-in application, passing an "init" argument, so that
- * application can distinguish different run-levels
- */
-
- init_taskid = exec_builtin(CONFIG_BUILTIN_APP_START, argv);
-#else
/* Start the default application at CONFIG_USER_ENTRYPOINT() */
init_taskid = TASK_CREATE("init", SCHED_PRIORITY_DEFAULT,
CONFIG_USERMAIN_STACKSIZE,
(main_t)CONFIG_USER_ENTRYPOINT, (const char **)NULL);
-#endif
ASSERT(init_taskid != ERROR);
/* We an save a few bytes by discarding the IDLE thread's environment. */