Skip to content
README.txt 1.63 KiB
Newer Older
patacongo's avatar
patacongo committed

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

patacongo's avatar
patacongo committed
This folder provides various applications found in sub-directories.
patacongo's avatar
patacongo committed

Application entry points with their requirements are gathered together in 
patacongo's avatar
patacongo committed
in two files:
patacongo's avatar
patacongo committed
	- exec_nuttapp_proto.h	Entry points, prototype function
	- exec_nuttapp_list.h	Application specific information and requirements

patacongo's avatar
patacongo committed
Information is collected during the make .depend process.
patacongo's avatar
patacongo committed

To execute an application function:
	exec_nuttapp() is defined in the include/nuttx/nuttapp.h 
	
NuttShell provides transparent method of invoking the command, when the
patacongo's avatar
patacongo committed
following option is enabled:
patacongo's avatar
patacongo committed
	CONFIG_EXAMPLES_NSH_BUILTIN_APPS=y

To select which application to be included in the build process set your
patacongo's avatar
patacongo committed
preferences in the nuttx/.config file as:
patacongo's avatar
patacongo committed

To include applications under the nuttx apps directory:
	CONFIG_BUILTIN_APPS_NUTTX=y/n
	
where each application can be controlled as:
	CONFIG_BUILTIN_APPS_<NAME>=y/n
	
patacongo's avatar
patacongo committed
When the user defines an option:
patacongo's avatar
patacongo committed
	CONFIG_BUILTIN_APP_START=<application name>
patacongo's avatar
patacongo committed
	
patacongo's avatar
patacongo committed
that application shall be invoked immediately after system starts.
Note that application name must be provided in ".." as: "hello", 
will call:
patacongo's avatar
patacongo committed
	int hello_main(int argc, char *argv[])
patacongo's avatar
patacongo committed

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 ..

patacongo's avatar
patacongo committed
 4. add application in the apps/Makefile