Add configurable application entry point

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5070 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo
2012-08-30 20:13:50 +00:00
parent 6ab6c46f2f
commit b121fbbb00
254 changed files with 777 additions and 613 deletions
+8
View File
@@ -202,6 +202,14 @@ config SCHED_ONEXIT_MAX
is supported. That number can be increased by defined this setting to the
number that you require.
config USER_ENTRYPOINT
string "Appliation entry point"
default "user_start"
---help---
The name of the entry point for user applications. For the example
applications this is of the form 'app_main' where 'app' is the application
name. If not defined, USER_ENTRYPOINT defaults to "user_start."
config DISABLE_OS_API
bool "Disable NuttX interfaces"
default y
+2 -8
View File
@@ -71,12 +71,6 @@
* then the default entry point is user_start.
*/
#if defined(CONFIG_NUTTX_KERNEL) && defined(CONFIG_USER_ENTRYPOINT)
# define USER_ENTRYPOINT (main_t)CONFIG_USER_ENTRYPOINT
#else
# define USER_ENTRYPOINT user_start
#endif
/****************************************************************************
* Private Types
****************************************************************************/
@@ -175,11 +169,11 @@ int os_bringup(void)
init_taskid = exec_namedapp(CONFIG_BUILTIN_APP_START, argv);
#else
/* Start the default application at USER_ENTRYPOINT() */
/* Start the default application at CONFIG_USER_ENTRYPOINT() */
init_taskid = TASK_CREATE("init", SCHED_PRIORITY_DEFAULT,
CONFIG_USERMAIN_STACKSIZE,
(main_t)USER_ENTRYPOINT, (const char **)NULL);
(main_t)CONFIG_USER_ENTRYPOINT, (const char **)NULL);
#endif
ASSERT(init_taskid != ERROR);
return OK;