mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 00:33:33 +08:00
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:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user