forked from Imagelibrary/rtems
2004-05-10 Ralf Corsepius <ralf_corsepius@rtems.org>
* iostream/Makefile.am, iostream/init.cc, iostream/iostream.doc, iostream/iostream.scn, iostream/system.h: New (C++ variant of hello).
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2004-05-10 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
* iostream/Makefile.am, iostream/init.cc, iostream/iostream.doc,
|
||||
iostream/iostream.scn, iostream/system.h:
|
||||
New (C++ variant of hello).
|
||||
|
||||
2004-04-01 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
* base_mp/system.h: Include <rtems/confdefs.h> instead of <confdefs.h>.
|
||||
|
||||
2
testsuites/samples/iostream/.cvsignore
Normal file
2
testsuites/samples/iostream/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
42
testsuites/samples/iostream/Makefile.am
Normal file
42
testsuites/samples/iostream/Makefile.am
Normal file
@@ -0,0 +1,42 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
SAMPLE = iostream
|
||||
PGM = ${ARCH}/$(SAMPLE).exe
|
||||
|
||||
MANAGERS = io
|
||||
|
||||
CC_FILES = init.cc
|
||||
CC_O_FILES = $(CC_FILES:%.cc=${ARCH}/%.$(OBJEXT))
|
||||
|
||||
H_FILES = system.h
|
||||
noinst_HEADERS = $(H_FILES)
|
||||
|
||||
DOCTYPES = doc scn
|
||||
DOCS = $(DOCTYPES:%=$(SAMPLE).%)
|
||||
|
||||
SRCS = $(DOCS) $(CC_FILES) $(H_FILES)
|
||||
OBJS = $(CC_O_FILES)
|
||||
|
||||
PRINT_SRCS = $(DOCS)
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../automake/compile.am
|
||||
include $(top_srcdir)/../automake/leaf.am
|
||||
include $(top_srcdir)/sample.am
|
||||
|
||||
#
|
||||
# (OPTIONAL) Add local stuff here using +=
|
||||
#
|
||||
|
||||
all-local: $(TMPINSTALL_FILES)
|
||||
|
||||
${PGM}: $(OBJS) $(LINK_FILES)
|
||||
$(make-cxx-exe)
|
||||
|
||||
EXTRA_DIST = $(C_FILES) $(DOCS)
|
||||
|
||||
CLEANFILES = $(TMPINSTALL_FILES)
|
||||
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
36
testsuites/samples/iostream/init.cc
Normal file
36
testsuites/samples/iostream/init.cc
Normal file
@@ -0,0 +1,36 @@
|
||||
/* Init
|
||||
*
|
||||
* This routine is the initialization task for this test program.
|
||||
* It is called from init_exec and has the responsibility for creating
|
||||
* and starting the tasks that make up the test. If the time of day
|
||||
* clock is required for the test, it should also be set to a known
|
||||
* value by this function.
|
||||
*
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
#define CONFIGURE_INIT
|
||||
#include "system.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument ignored
|
||||
)
|
||||
{
|
||||
std::cout << "\n\n*** HELLO WORLD TEST ***" << std::endl;
|
||||
std::cout << "Hello World" << std::endl;
|
||||
std::cout << "*** END OF HELLO WORLD TEST ***" << std::endl;
|
||||
exit( 0 );
|
||||
}
|
||||
12
testsuites/samples/iostream/iostream.doc
Normal file
12
testsuites/samples/iostream/iostream.doc
Normal file
@@ -0,0 +1,12 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# COPYRIGHT (c) 1989-1999.
|
||||
# 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.
|
||||
#
|
||||
|
||||
|
||||
3
testsuites/samples/iostream/iostream.scn
Normal file
3
testsuites/samples/iostream/iostream.scn
Normal file
@@ -0,0 +1,3 @@
|
||||
*** HELLO WORLD TEST ***
|
||||
Hello World
|
||||
*** END OF HELLO WORLD TEST ***
|
||||
38
testsuites/samples/iostream/system.h
Normal file
38
testsuites/samples/iostream/system.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/* system.h
|
||||
*
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* 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 <rtems.h>
|
||||
|
||||
/* functions */
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
|
||||
/* configuration information */
|
||||
|
||||
#include <bsp.h> /* for device driver prototypes */
|
||||
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_TASKS 1
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
|
||||
#define CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM
|
||||
|
||||
#include <rtems/confdefs.h>
|
||||
|
||||
/* end of include file */
|
||||
Reference in New Issue
Block a user