summaryrefslogtreecommitdiffstats
path: root/testsuites/samples
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2009-04-28 05:04:11 +0000
committerChris Johns <chrisj@rtems.org>2009-04-28 05:04:11 +0000
commitc0ec0d82d3c7206d3d2cda7cf93514f22f8ac504 (patch)
treee714862f2531e56ff216c285df9131731b39cc0c /testsuites/samples
parent2009-04-28 Chris Johns <chrisj@rtems.org> (diff)
downloadrtems-c0ec0d82d3c7206d3d2cda7cf93514f22f8ac504.tar.bz2
2009-04-28 Chris Johns <chrisj@rtems.org>
* fileio/init.c, fileio/system.h, iostream/init.cc, loopback/init.c, pppd/init.c, pppd/pppdapp.c: Do not build if BSP_SMALL_MEMORY is defined. Remove this code once a better way is supported by the build system.
Diffstat (limited to 'testsuites/samples')
-rw-r--r--testsuites/samples/ChangeLog7
-rw-r--r--testsuites/samples/fileio/init.c12
-rw-r--r--testsuites/samples/fileio/system.h8
-rw-r--r--testsuites/samples/iostream/init.cc10
-rw-r--r--testsuites/samples/loopback/init.c13
-rw-r--r--testsuites/samples/pppd/init.c15
-rw-r--r--testsuites/samples/pppd/pppdapp.c6
7 files changed, 64 insertions, 7 deletions
diff --git a/testsuites/samples/ChangeLog b/testsuites/samples/ChangeLog
index 6276484f75..7c97952ad4 100644
--- a/testsuites/samples/ChangeLog
+++ b/testsuites/samples/ChangeLog
@@ -1,3 +1,10 @@
+2009-04-28 Chris Johns <chrisj@rtems.org>
+
+ * fileio/init.c, fileio/system.h, iostream/init.cc,
+ loopback/init.c, pppd/init.c, pppd/pppdapp.c: Do not build if
+ BSP_SMALL_MEMORY is defined. Remove this code once a better way is
+ supported by the build system.
+
2009-04-14 Sebastian Huber <Sebastian.Huber@embedded-brains.de>
* fileio/init.c: Removed obsolete header include.
diff --git a/testsuites/samples/fileio/init.c b/testsuites/samples/fileio/init.c
index b49334d6bf..5af153a07e 100644
--- a/testsuites/samples/fileio/init.c
+++ b/testsuites/samples/fileio/init.c
@@ -36,6 +36,7 @@
#include <rtems/libcsupport.h>
#include <rtems/fsmount.h>
+#if FILEIO_BUILD
/*
* Table of FAT file systems that will be mounted
* with the "fsmount" function.
@@ -725,3 +726,14 @@ rtems_shell_alias_t Shell_USERECHO_Alias = {
#include <rtems/shellconfig.h>
#endif
+#else
+/*
+ * RTEMS Startup Task
+ */
+rtems_task
+Init (rtems_task_argument ignored)
+{
+ puts( "\n\n*** FILE I/O SAMPLE AND TEST ***" );
+ puts( "\n\n*** NOT ENOUGH MEMORY TO BUILD AND RUN ***" );
+}
+#endif
diff --git a/testsuites/samples/fileio/system.h b/testsuites/samples/fileio/system.h
index e1cf70173d..ff8cb3a78a 100644
--- a/testsuites/samples/fileio/system.h
+++ b/testsuites/samples/fileio/system.h
@@ -27,7 +27,13 @@ rtems_task Init(
/* configuration information */
#include <bsp.h> /* for device driver prototypes */
-#ifdef RTEMS_BSP_HAS_IDE_DRIVER
+
+#define FILEIO_BUILD 1
+#if BSP_SMALL_MEMORY
+#undef FILEIO_BUILD
+#endif
+
+#if defined(RTEMS_BSP_HAS_IDE_DRIVER) && !BSP_SMALL_MEMORY
#include <libchip/ata.h> /* for ata driver prototype */
#include <libchip/ide_ctrl.h> /* for general ide driver prototype */
#endif
diff --git a/testsuites/samples/iostream/init.cc b/testsuites/samples/iostream/init.cc
index 8616ff2f7c..26fb7b754b 100644
--- a/testsuites/samples/iostream/init.cc
+++ b/testsuites/samples/iostream/init.cc
@@ -23,15 +23,25 @@
#define CONFIGURE_INIT
#include "system.h"
+#if BSP_SMALL_MEMORY
+#include <stdio.h>
+#else
#include <iostream>
+#endif
+
#include <stdlib.h>
rtems_task Init(
rtems_task_argument ignored
)
{
+#if BSP_SMALL_MEMORY
+ printf ("NO STDC++. MEMORY TOO SMALL");
+#else
std::cout << "\n\n*** HELLO WORLD TEST ***" << std::endl;
std::cout << "Hello World" << std::endl;
std::cout << "*** END OF HELLO WORLD TEST ***" << std::endl;
+#endif
exit( 0 );
}
+
diff --git a/testsuites/samples/loopback/init.c b/testsuites/samples/loopback/init.c
index 764e246ee0..174a763c3c 100644
--- a/testsuites/samples/loopback/init.c
+++ b/testsuites/samples/loopback/init.c
@@ -29,6 +29,8 @@ rtems_task Init(rtems_task_argument argument);
#include <rtems/confdefs.h>
+#if !BSP_SMALL_MEMORY
+
#include <rtems/rtems_bsdnet.h>
#include <rtems/error.h>
#include <stdio.h>
@@ -273,3 +275,14 @@ Init (rtems_task_argument ignored)
puts( "*** END OF LOOPBACK TEST ***" );
exit( 0 );
}
+#else
+#include <stdio.h>
+/*
+ * RTEMS Startup Task
+ */
+rtems_task
+Init (rtems_task_argument ignored)
+{
+ printf("NO NETWORKING. MEMORY TOO SMALL");
+}
+#endif
diff --git a/testsuites/samples/pppd/init.c b/testsuites/samples/pppd/init.c
index 0e534e03d2..cf0d134710 100644
--- a/testsuites/samples/pppd/init.c
+++ b/testsuites/samples/pppd/init.c
@@ -2,23 +2,26 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <rtems/rtems_bsdnet.h>
-#include <rtems/rtemspppd.h>
#define CONFIGURE_INIT
#include "system.h"
-#include "netconfig.h"
-
+#if !BSP_SMALL_MEMORY
+#include <rtems/rtems_bsdnet.h>
+#include <rtems/rtemspppd.h>
+#include "netconfig.h"
extern int pppdapp_initialize(void);
-
+#endif
rtems_task Init(rtems_task_argument argument)
{
+#if BSP_SMALL_MEMORY
+ printf("NO NETWORKING. MEMORY TOO SMALL");
+#else
/* initialize network */
rtems_bsdnet_initialize_network();
rtems_pppd_initialize();
pppdapp_initialize();
-
+#endif
rtems_task_delete(RTEMS_SELF);
}
diff --git a/testsuites/samples/pppd/pppdapp.c b/testsuites/samples/pppd/pppdapp.c
index 1c75f1de80..0e216ff406 100644
--- a/testsuites/samples/pppd/pppdapp.c
+++ b/testsuites/samples/pppd/pppdapp.c
@@ -1,4 +1,8 @@
+#include <bsp.h>
+
+#if !BSP_SMALL_MEMORY
+
#include <stdio.h>
#include <rtems/rtemspppd.h>
#include "system.h"
@@ -144,3 +148,5 @@ int pppdapp_initialize(void)
return ( iReturn );
}
+
+#endif