9
0
Fork 0
nuttx-bb/apps
patacongo 7470a07dc2 Fix I2C/FSMC conflict for STM32; Fix STM32 clock setup
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@3942 7fd9a85b-ad96-42d3-883c-3090e2eb8679
2011-09-08 17:56:08 +00:00
..
examples Use instead of make 2011-08-28 18:10:53 +00:00
include More FTP bugfixes 2011-06-03 20:27:30 +00:00
interpreters More PIC32 header files 2011-05-11 17:21:47 +00:00
namedapp Changes for clean ez80 ZDS-II compile 2011-06-22 15:22:56 +00:00
netutils Amber Web Server updates 2011-06-13 17:51:17 +00:00
nshlib Fix errors in gmtime and gmtime_r 2011-09-01 17:56:03 +00:00
system Fix I2C/FSMC conflict for STM32; Fix STM32 clock setup 2011-09-08 17:56:08 +00:00
vsn Remove unused header files; eliminate warnings 2011-06-21 23:53:00 +00:00
ChangeLog.txt Fix errors in gmtime and gmtime_r 2011-09-01 17:56:03 +00:00
Make.defs Changes for clean ez80 ZDS-II compile 2011-06-22 15:22:56 +00:00
Makefile Make NX and NXTEXT built-ins; extend stm3210e-eval/nsh2 config to run the NX example from the NX command line 2011-07-16 15:52:15 +00:00
README.txt Remove .built_always 2011-04-01 14:30:43 +00:00

README.txt

Application Folder
==================

This folder provides various applications found in sub-directories.

Application entry points with their requirements are gathered together in 
in two files:

	- namedapp/namedapp_proto.h	Entry points, prototype function
	- namedapp/namedapp_list.h	Application specific information and requirements

The build occurs in several phases as different build targets are executed:
(1) contex, (2) depend, and (3) default (all). Application information is
collected during the make context build phase.

To execute an application function:

	exec_namedapp() is defined in the nuttx/include/apps/apps.h 
	
NuttShell provides transparent method of invoking the command, when the
following option is enabled:

	CONFIG_NSH_BUILTIN_APPS=y

in the NuttX configuration.

A special configuration file is used to configure which applications
are to be included in the build.  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.
As a minimum, this configuration file must define files to add to the
CONFIGURED_APPS list like:

  CONFIGURED_APPS  += hello poweroff jvm

The form of each entry is <dir>=<dependency> when:

  <dir> is the name of a subdirectory in the apps directory, and

  <dependency> is a make dependency.  This will be "touch"-ed each time
  that the sub-directory is rebuilt.

When the user defines an option:
	CONFIG_BUILTIN_APP_START=<application name>
	
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,
which shows how an 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:
	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 ..

 4. add application in the apps/Makefile