summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-12 22:09:14 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-12 22:09:14 +0000
commitbb4bde4152e4caf8bb4103d843cea25994ef3c12 (patch)
treefe27d490548897aae21c28e3c63187001fc2ec4e /apps
parentec6b2a92400bf21f8b501d76b7cae54ac7a41381 (diff)
downloadnuttx-bb4bde4152e4caf8bb4103d843cea25994ef3c12.tar.gz
nuttx-bb4bde4152e4caf8bb4103d843cea25994ef3c12.tar.bz2
nuttx-bb4bde4152e4caf8bb4103d843cea25994ef3c12.zip
Prep for 5.19 releasenuttx-5.19
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3373 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps')
-rw-r--r--apps/Makefile1
-rw-r--r--apps/README.txt (renamed from apps/README)28
-rw-r--r--apps/exec_nuttapp.c6
3 files changed, 15 insertions, 20 deletions
diff --git a/apps/Makefile b/apps/Makefile
index 4ffca6343..ac07176fb 100644
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -103,6 +103,7 @@ $(BIN): $(OBJS) $(BUILTIN_APPS_BUILT)
$(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
@touch $@
@for dir in $(BUILTIN_APPS_DIR) ; do \
+ rm -f $$dir/.depend ; \
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" depend ; \
done
diff --git a/apps/README b/apps/README.txt
index 4ffee90c8..e7bb212e4 100644
--- a/apps/README
+++ b/apps/README.txt
@@ -2,9 +2,7 @@
Application Folder
==================
-This folder provides various applications that can be enabled in the .config
-file and further provides frame-work to include external user applications
-from the ../apps directory.
+This folder provides various applications found in sub-directories.
Application entry points with their requirements are gathered together in
this folder, in two files:
@@ -16,15 +14,12 @@ Application information is collected during the make .depend process.
To execute an application function:
exec_nuttapp() is defined in the include/nuttx/nuttapp.h
-Further, builtin applications may be accessed via pseudo file-system found
-under the nuttx/drivers/sbin directory.
-
NuttShell provides transparent method of invoking the command, when the
-following option is enabled (regardless of sbin pseudo file system):
+following option is enabled:
CONFIG_EXAMPLES_NSH_BUILTIN_APPS=y
To select which application to be included in the build process set your
-preferences the .config file as:
+preferences the nuttx/.config file as:
To include applications under the nuttx apps directory:
CONFIG_BUILTIN_APPS_NUTTX=y/n
@@ -32,14 +27,13 @@ To include applications under the nuttx apps directory:
where each application can be controlled as:
CONFIG_BUILTIN_APPS_<NAME>=y/n
-To include applications under the user ../apps directory:
- CONFIG_BUILTIN_APPS_USER=y/n
-
-When the user defines an option: (NOT IMPLEMENTED YET)
+When the user defines an option:
CONFIG_BUILTIN_APP_START=<application name>
-
-then after initialization of the NuttX OS it starts this application
-using the exec_nuttapp() method.
+
+Note that application name must be provided in ".." as: "hello"
+for the hello application, which starts the immediately after system
+starts:
+ int hello_main(int argc, char *argv[])
Application skeleton can be found under the hello sub-directory,
which shows how an application can be added to the project. One must
@@ -53,6 +47,4 @@ define:
ASRCS = asm source file list as a.asm b.asm ...
CSRCS = C source file list as foo1.c foo2.c ..
- 4. add enable/disable option in the top file in this directory as:
- ifeq CONFIG_BUILTIN_APPS_<NAME>
- ...
+ 4. add application in the apps/Makefile
diff --git a/apps/exec_nuttapp.c b/apps/exec_nuttapp.c
index 3cc4b5139..84e592256 100644
--- a/apps/exec_nuttapp.c
+++ b/apps/exec_nuttapp.c
@@ -124,9 +124,11 @@ int exec_nuttapp(FAR const char *appname, FAR const char *argv[])
{
#ifndef CONFIG_CUSTOM_STACK
i = task_create(nuttapps[i].name, nuttapps[i].priority,
- nuttapps[i].stacksize, nuttapps[i].main, &argv[1]);
+ nuttapps[i].stacksize, nuttapps[i].main,
+ (argv) ? &argv[1] : (const char **)NULL);
#else
- i = task_create(nuttapps[i].name, nuttapps[i].priority, nuttapps[i].main, &argv[1]);
+ i = task_create(nuttapps[i].name, nuttapps[i].priority, nuttapps[i].main,
+ (argv) ? &argv[1] : (const char **)NULL);
#endif
#if CONFIG_RR_INTERVAL > 0