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 /misc | |
download | rtems-examples-3083373e471be76b1624e0583c5a3f2f455d41c1.tar.bz2 |
Diffstat (limited to 'misc')
-rw-r--r-- | misc/Makefile | 9 | ||||
-rw-r--r-- | misc/minimum/.cvsignore | 1 | ||||
-rw-r--r-- | misc/minimum/Makefile | 27 | ||||
-rw-r--r-- | misc/minimum/test.c | 112 |
4 files changed, 149 insertions, 0 deletions
diff --git a/misc/Makefile b/misc/Makefile new file mode 100644 index 0000000..5b748cb --- /dev/null +++ b/misc/Makefile @@ -0,0 +1,9 @@ +# +# $Id$ +# + +include $(RTEMS_MAKEFILE_PATH)/Makefile.inc +include $(RTEMS_CUSTOM) +include $(RTEMS_ROOT)/make/directory.cfg + +SUBDIRS=minimum diff --git a/misc/minimum/.cvsignore b/misc/minimum/.cvsignore new file mode 100644 index 0000000..fecf58a --- /dev/null +++ b/misc/minimum/.cvsignore @@ -0,0 +1 @@ +o-optimize diff --git a/misc/minimum/Makefile b/misc/minimum/Makefile new file mode 100644 index 0000000..8baab25 --- /dev/null +++ b/misc/minimum/Makefile @@ -0,0 +1,27 @@ +# +# $Id$ +# + +# +# RTEMS_MAKEFILE_PATH is typically set in an environment variable +# + +PGM=${ARCH}/minimum.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/misc/minimum/test.c b/misc/minimum/test.c new file mode 100644 index 0000000..1ecb748 --- /dev/null +++ b/misc/minimum/test.c @@ -0,0 +1,112 @@ +/* Minimum Size Application Initialization + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#include <bsp.h> + +rtems_task Init( + rtems_task_argument ignored +) +{ + rtems_mode mode; + + /* initialize application */ + + /* Real application would call idle loop functionality */ + + /* but in this case, just return and fall into a fatal error */ +} + +/* configuration information */ + +/* + * This application has no device drivers. + */ +/* NOTICE: the clock driver is explicitly disabled */ +#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER + +/* + * This application has no filesytem and libio support. + */ +#define CONFIGURE_APPLICATION_DISABLE_FILESYSTEM + +/* + * This disables reentrancy support in the C Library. It is usually + * not something an application wants to do unless the development + * team is committed to using C Library routines that are KNOWN to + * be reentrant. Caveat Emptor!! + */ +#define CONFIGURE_DISABLE_NEWLIB_REENTRANCY + +/* + * This test does not need the console driver so there is no reason + * to configure termios. + */ +#define CONFIGURE_TERMIOS_DISABLED + +/* + * This test does not use any stdio. + */ +#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 0 + +/* + * This may prevent us from running on every architecture but it + * demonstrates that the user can specify how small of a minimum + * stack they want. + */ +#define CONFIGURE_MINIMUM_TASK_STACK_SIZE 512 + +/* + * This lowers the number of priorities that this test is able to + * use. The Idle task will be running at the lowest priority. + */ +#define CONFIGURE_MAXIMUM_PRIORITY 15 + +/* + * This disables Classic API Notepads and saves 16 uint32_t's of RAM + * per Task Control Block. If you aren't using these and are tight + * on RAM, this is an option. + */ +#define CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS + +/* + * This configures RTEMS to use a single memory pool for the RTEMS Workspace + * and C Program Heap. If not defined, there will be separate memory pools + * for the RTEMS Workspace and C Program Heap. Having separate pools + * does haved some advantages in the event a task blows a stack or writes + * outside its memory area. However, in low memory systems the overhead of + * the two pools plus the potential for unused memory in either pool is + * very undesirable. + * + * In high memory environments, this is desirable when you want to use + * the RTEMS "unlimited" objects option. You will be able to create objects + * until you run out of memory. + */ +#define CONFIGURE_UNIFIED_WORK_AREAS + +/* + * In this application, the initialization task performs the system + * initialization and then transforms itself into the idle task. + */ +#define CONFIGURE_IDLE_TASK_BODY Init +#define CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION + +/* + * If you are debugging confdefs.h, define this + */ +/* #define CONFIGURE_CONFDEFS_DEBUG */ + +/* + * Instantiate the configuration tables. + */ +#define CONFIGURE_INIT + +#include <rtems/confdefs.h> |