NFS update + make some examples configurable as NSH built-ins

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4501 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo
2012-03-22 00:51:01 +00:00
parent a58d4b265f
commit 1018c9e441
25 changed files with 5290 additions and 1003 deletions
+15 -3
View File
@@ -1,8 +1,8 @@
############################################################################
# apps/examples/hello/Makefile
#
# Copyright (C) 2008, 2010-2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
# Copyright (C) 2008, 2010-2012 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -37,6 +37,12 @@
-include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# Hello, World! built-in application info
APPNAME = hello
PRIORITY = SCHED_PRIORITY_DEFAULT
STACKSIZE = 2048
# Hello, World! Example
ASRCS =
@@ -75,7 +81,13 @@ $(COBJS): %$(OBJEXT): %.c
done ; )
@touch .built
context:
.context:
ifeq ($(CONFIG_EXAMPLES_HELLO_BUILTIN),y)
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
@touch $@
endif
context: .context
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
+10 -4
View File
@@ -1,8 +1,8 @@
/****************************************************************************
* examples/hello/main.c
*
* Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Copyright (C) 2008, 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -53,10 +53,16 @@
****************************************************************************/
/****************************************************************************
* user_start
* user_start/hello_main
****************************************************************************/
int user_start(int argc, char *argv[])
#ifdef CONFIG_EXAMPLES_HELLO_BUILTIN
# define MAIN_NAME hello_main
#else
# define MAIN_NAME user_start
#endif
int MAIN_NAME(int argc, char *argv[])
{
printf("Hello, World!!\n");
return 0;