summaryrefslogtreecommitdiff
path: root/apps/examples/nxtext
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-07-16 15:52:15 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-07-16 15:52:15 +0000
commitab14fe398b2693da319e4bd47ed1adda704e8175 (patch)
treee6ebbb945196964ccda40619991bc966a68b0000 /apps/examples/nxtext
parent77328a1539b34e3b472606673bc726241b0cac20 (diff)
downloadnuttx-ab14fe398b2693da319e4bd47ed1adda704e8175.tar.gz
nuttx-ab14fe398b2693da319e4bd47ed1adda704e8175.tar.bz2
nuttx-ab14fe398b2693da319e4bd47ed1adda704e8175.zip
Make NX and NXTEXT built-ins; extend stm3210e-eval/nsh2 config to run the NX example from the NX command line
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3791 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/examples/nxtext')
-rw-r--r--apps/examples/nxtext/Makefile16
-rw-r--r--apps/examples/nxtext/nxtext_main.c6
2 files changed, 19 insertions, 3 deletions
diff --git a/apps/examples/nxtext/Makefile b/apps/examples/nxtext/Makefile
index 4451c9faf..75e489943 100644
--- a/apps/examples/nxtext/Makefile
+++ b/apps/examples/nxtext/Makefile
@@ -60,12 +60,18 @@ endif
ROOTDEPPATH = --dep-path .
+# NXTEXT built-in application info
+
+APPNAME = nxtext
+PRIORITY = SCHED_PRIORITY_DEFAULT
+STACKSIZE = 2048
+
# Common build
VPATH =
all: .built
-.PHONY: clean depend distclean
+.PHONY: context clean depend distclean
$(AOBJS): %$(OBJEXT): %.S
$(call ASSEMBLE, $<, $@)
@@ -79,7 +85,13 @@ $(COBJS): %$(OBJEXT): %.c
done ; )
@touch .built
-context:
+.context:
+ifeq ($(CONFIG_EXAMPLES_NXTEXT_BUILTIN),y)
+ $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
+ @touch $@
+endif
+
+context: .context
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/nxtext/nxtext_main.c b/apps/examples/nxtext/nxtext_main.c
index a3027165d..6a53f9d2c 100644
--- a/apps/examples/nxtext/nxtext_main.c
+++ b/apps/examples/nxtext/nxtext_main.c
@@ -339,10 +339,14 @@ static int nxtext_initialize(void)
****************************************************************************/
/****************************************************************************
- * Name: user_start
+ * Name: user_start/nxtext_main
****************************************************************************/
+#ifdef CONFIG_EXAMPLES_NXTEXT_BUILTIN
+int nxtext_main(int argc, char **argv)
+#else
int user_start(int argc, char *argv[])
+#endif
{
FAR struct nxtext_state_s *bgstate;
NXWINDOW hwnd = NULL;