VSN/apps update

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3378 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2011-03-14 14:14:54 +00:00
parent 978bb750bf
commit 901d085151
4 changed files with 58 additions and 13 deletions

10
ChangeLog.txt Executable file
View File

@ -0,0 +1,10 @@
5.19 2011-03-12 Gregory Nutt <spudmonkey@racsa.co.cr>
* Initial version of the apps/ directory was released as contributed by
Uros Platise.
5.20 2011-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
* README cosmetics
* hello world minor changes
* Makefile cosmetics (I am slowly adding the Darjeeling JVM)

View File

@ -42,21 +42,28 @@ endif
# Application Directories
BUILTIN_APPS_DIR =
# we use a non-existing .built_always to guarantee that Makefile
# always walks into the sub-directories and asks for build
BUILTIN_APPS_BUILT =
BUILTIN_APPS_DIR =
ifeq ($(CONFIG_BUILTIN_APPS_NUTTX),y)
# Individual application: HELLO
ifeq ($(CONFIG_BUILTIN_APPS_HELLO),y)
BUILTIN_APPS_DIR += hello
# we use a non-existing .built_always to guarantee that Makefile
# always walks into the sub-directories and asks for build
BUILTIN_APPS_BUILT += hello/.built_always
endif
ifeq ($(CONFIG_BUILTIN_APPS_POWEROFF),y)
BUILTIN_APPS_DIR += poweroff
BUILTIN_APPS_BUILT += poweroff/.built_always
endif
ifeq ($(CONFIG_BUILTIN_APPS_JVM),y)
BUILTIN_APPS_DIR += jvm
BUILTIN_APPS_BUILT += jvm/.built_always
endif
# end of application list

View File

@ -5,11 +5,11 @@ Application Folder
This folder provides various applications found in sub-directories.
Application entry points with their requirements are gathered together in
this folder, in two files:
in two files:
- exec_nuttapp_proto.h Entry points, prototype function
- exec_nuttapp_list.h Application specific information and requirements
Application information is collected during the make .depend process.
Information is collected during the make .depend process.
To execute an application function:
exec_nuttapp() is defined in the include/nuttx/nuttapp.h
@ -19,7 +19,7 @@ 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 nuttx/.config file as:
preferences in the nuttx/.config file as:
To include applications under the nuttx apps directory:
CONFIG_BUILTIN_APPS_NUTTX=y/n
@ -30,9 +30,9 @@ where each application can be controlled as:
When the user defines an option:
CONFIG_BUILTIN_APP_START=<application name>
Note that application name must be provided in ".." as: "hello"
for the hello application, which starts the immediately after system
starts:
that application shall be invoked immediately after system starts.
Note that application name must be provided in ".." as: "hello",
will call:
int hello_main(int argc, char *argv[])
Application skeleton can be found under the hello sub-directory,

View File

@ -34,6 +34,24 @@
****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
void memtest(void)
{
char *p;
int i, j;
for (i=0; i<1000; i++) {
p = malloc(40000);
if (!p) {
printf("No memory\n");
break;
}
for (j=0; j<40000; j++) p[j] = 0;
free(p);
}
}
/** Example of a standalone application
@ -41,7 +59,17 @@
int hello_main(int argc, char *argv[])
{
int i;
printf("Hello Builtin Application\nFound argc=%d arguments and are as follows:\n", argc);
for (i=0; i<argc; i++) printf("%s\n", argv[i]);
printf("Hello Builtin Application\n"
"Found argc=%d arguments and are as follows:\n", argc);
// note that stdout is bufferred and that fflush() and is called on exit.
fflush(stdout);
for (i=0; i<argc; i++)
printf("%s\n", argv[i]);
//memtest();
return 0;
}