diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-08-06 20:25:58 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-08-06 20:25:58 +0000 |
commit | 3083373e471be76b1624e0583c5a3f2f455d41c1 (patch) | |
tree | e7d15e5fdeb23587043f57d57fb0de6f399dbbbc /hello/posix_hello_world | |
download | rtems-examples-3083373e471be76b1624e0583c5a3f2f455d41c1.tar.bz2 |
Diffstat (limited to 'hello/posix_hello_world')
-rw-r--r-- | hello/posix_hello_world/.cvsignore | 1 | ||||
-rw-r--r-- | hello/posix_hello_world/Makefile | 27 | ||||
-rw-r--r-- | hello/posix_hello_world/test.c | 34 |
3 files changed, 62 insertions, 0 deletions
diff --git a/hello/posix_hello_world/.cvsignore b/hello/posix_hello_world/.cvsignore new file mode 100644 index 0000000..fecf58a --- /dev/null +++ b/hello/posix_hello_world/.cvsignore @@ -0,0 +1 @@ +o-optimize diff --git a/hello/posix_hello_world/Makefile b/hello/posix_hello_world/Makefile new file mode 100644 index 0000000..bc6693f --- /dev/null +++ b/hello/posix_hello_world/Makefile @@ -0,0 +1,27 @@ +# +# $Id$ +# + +# +# RTEMS_MAKEFILE_PATH is typically set in an environment variable +# + +PGM=${ARCH}/posix_hello.exe + +# optional managers required +MANAGERS=all + +# C source names +CSRCS = test.c +COBJS = $(CSRCS:%.c=${ARCH}/%.o) + +include $(RTEMS_MAKEFILE_PATH)/Makefile.inc +include $(RTEMS_CUSTOM) +include $(PROJECT_ROOT)/make/leaf.cfg + +OBJS= $(COBJS) $(CXXOBJS) $(ASOBJS) + +all: ${ARCH} $(PGM) + +$(PGM): $(OBJS) + $(make-exe) diff --git a/hello/posix_hello_world/test.c b/hello/posix_hello_world/test.c new file mode 100644 index 0000000..0386b5b --- /dev/null +++ b/hello/posix_hello_world/test.c @@ -0,0 +1,34 @@ +/* + * Simple test program -- simplified version of sample test hello. + */ + +#include <bsp.h> + +#include <stdio.h> +#include <stdlib.h> + +void *POSIX_Init( + void *argument +) +{ + printf( "\n\n*** HELLO WORLD TEST ***\n" ); + printf( "Hello World\n" ); + printf( "*** END OF HELLO WORLD TEST ***\n" ); + exit( 0 ); +} + +/* configuration information */ + +/* NOTICE: the clock driver is explicitly disabled */ +#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER + +#define CONFIGURE_POSIX_INIT_THREAD_TABLE + +#define CONFIGURE_MAXIMUM_POSIX_THREADS 1 + +#define CONFIGURE_INIT + +#include <rtems/confdefs.h> + +/* end of file */ |