summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-12-24 14:31:02 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-12-24 14:31:02 +0000
commit50cadb430489789f1d42d6f8b17f09470a409f14 (patch)
tree14f4f3d92f62412efbce32c15f24e5fbbcc784ae /apps
parentedec60f187e9f0297f3acaa6fb4574b3606e74f5 (diff)
downloadnuttx-50cadb430489789f1d42d6f8b17f09470a409f14.tar.gz
nuttx-50cadb430489789f1d42d6f8b17f09470a409f14.tar.bz2
nuttx-50cadb430489789f1d42d6f8b17f09470a409f14.zip
Correct round-to-ticks logic in sigtimedwait()
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5457 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps')
-rw-r--r--apps/README.txt114
1 files changed, 96 insertions, 18 deletions
diff --git a/apps/README.txt b/apps/README.txt
index 4f043dcfa..328126905 100644
--- a/apps/README.txt
+++ b/apps/README.txt
@@ -17,15 +17,15 @@ Contents
General
-------
This folder provides various applications found in sub-directories. These
-applications are not inherently a part of NuttX but are provided you help
+applications are not inherently a part of NuttX but are provided to help
you develop your own applications. The apps/ directory is a "break away"
-part of the configuration that you may chose to use or not.
+part of the configuration that you may choose to use or not.
Directory Location
------------------
The default application directory used by the NuttX build should be named
apps/ (or apps-x.y/ where x.y is the NuttX version number). This apps/
-directoy should appear in the directory tree at the same level as the
+directory should appear in the directory tree at the same level as the
NuttX directory. Like:
.
@@ -54,7 +54,7 @@ In this case, application entry points with their requirements are gathered
together in two files:
- builtin/builtin_proto.h Entry points, prototype function
- - builtin/builtin_list.h Application specific information and requirements
+ - builtin/builtin_list.h Application specific information and requirements
The build occurs in several phases as different build targets are executed:
(1) context, (2) depend, and (3) default (all). Application information is
@@ -96,11 +96,11 @@ after the NSH command.
Application Configuration File
------------------------------
-A special configuration file is used to configure which applications
-are to be included in the build. The source for this file is
-configs/<board>/<configuration>/appconfig. The existence of the appconfig
-file in the board configuration directory is sufficient to enable building
-of applications.
+The old-style NuttX configuration uses a special configuration file is
+used to configure which applications are to be included in the build.
+The source for this file is configs/<board>/<configuration>/appconfig.
+The existence of the appconfig file in the board configuration directory\
+is sufficient to enable building of applications.
The appconfig file is copied into the apps/ directory as .config when
NuttX is configured. .config is included in the toplevel apps/Makefile.
@@ -109,6 +109,38 @@ CONFIGURED_APPS list like:
CONFIGURED_APPS += examples/hello system/poweroff
+The new NuttX configuration uses kconfig-frontends tools and only the
+NuttX .config file. The new configuration is indicated by the existence
+of the definition CONFIG_NUTTX_NEWCONFIG=y in the NuttX .config file.
+If CONFIG_NUTTX_NEWCONFIG is defined, then the Makefile will:
+
+- Assume that there is no apps/.config file and will instead
+- Include Make.defs files from each of the subdirectories.
+
+When an application is enabled using the kconfig-frontends tool, then
+a new definition is added to the NuttX .config file. For example, if
+you want to enable apps/examples/hello then the old apps/.config would
+have had:
+
+ CONFIGURED_APPS += examples/hello
+
+But in the new configuration there will be no apps/.config file and,
+instead, the NuttX .config will have:
+
+ CONFIG_EXAMPLES_HELLO=y
+
+This will select the apps/examples/hello in the following way:
+
+- The top-level make will include examples/Make.defs
+- examples/Make.defs will set CONFIGURED_APPS += examples/hello
+ like this:
+
+ ifeq ($(CONFIG_EXAMPLES_HELLO),y)
+ CONFIGURED_APPS += examples/hello
+ endif
+
+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
@@ -130,17 +162,63 @@ An example application skeleton can be found under the examples/hello
sub-directory. This example shows how a builtin application can be added
to the project. One must define:
- 1. create sub-directory as: appname
- 2. provide entry point: appname_main()
- 3. set the requirements in the file: Makefile, specially the lines:
+Old configuration method:
+
+ 1. Create sub-directory as: appname
+
+ 2. In this directory there should be:
+
+ - A Makefile, and
+ - The application source code.
+
+ 3. The application source code should provide the entry point:
+ appname_main()
+
+ 4. Set the requirements in the file: Makefile, specially the lines:
+
+ APPNAME = appname
+ PRIORITY = SCHED_PRIORITY_DEFAULT
+ STACKSIZE = 768
+ ASRCS = asm source file list as a.asm b.asm ...
+ CSRCS = C source file list as foo1.c foo2.c ..
+
+ Look at some of the other Makefiles for examples. Note the
+ special registration logic needed for the context: target
+
+ 5. Add the to the application to the CONFIGIURED_APPS in the
+ apps/.config file:
+
+ CONFIGURED_APPS += appname
+
+New Configuration Method:
+
+ 1. Create sub-directory as: appname
+
+ 2. In this directory there should be:
+
+ - A Make.defs file that would be included by the apps/Makefile
+ - A Kconfig file that would be used by the configuration tool (see
+ misc/tools/kconfig-language.txt). This Kconfig file should be
+ included by the apps/Kconfig file
+ - A Makefile, and
+ - The application source code.
+
+ 3. The application source code should provide the entry point:
+ appname_main()
+
+ 4. Set the requirements in the file: Makefile, specially the lines:
+
+ APPNAME = appname
+ PRIORITY = SCHED_PRIORITY_DEFAULT
+ STACKSIZE = 768
+ ASRCS = asm source file list as a.asm b.asm ...
+ CSRCS = C source file list as foo1.c foo2.c ..
- APPNAME = appname
- PRIORITY = SCHED_PRIORITY_DEFAULT
- STACKSIZE = 768
- ASRCS = asm source file list as a.asm b.asm ...
- CSRCS = C source file list as foo1.c foo2.c ..
+ 4b. The Make.defs file should include a line like:
- 4. add application in the apps/.config
+ ifeq ($(CONFIG_APPNAME),y)
+ CONFIGURED_APPS += appname
+ endif
Building NuttX with Board-Specific Pieces Outside the Source Tree
-----------------------------------------------------------------