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:
Ralf Corsepius
2004-05-10 15:59:59 +00:00
parent 1eaf0fda9e
commit e12ba0e4f0
7 changed files with 139 additions and 0 deletions

View File

@@ -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>.

View File

@@ -0,0 +1,2 @@
Makefile
Makefile.in

View 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

View 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 );
}

View 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.
#

View File

@@ -0,0 +1,3 @@
*** HELLO WORLD TEST ***
Hello World
*** END OF HELLO WORLD TEST ***

View 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 */