From c0ec0d82d3c7206d3d2cda7cf93514f22f8ac504 Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Tue, 28 Apr 2009 05:04:11 +0000 Subject: 2009-04-28 Chris Johns * 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. --- testsuites/samples/ChangeLog | 7 +++++++ testsuites/samples/fileio/init.c | 12 ++++++++++++ testsuites/samples/fileio/system.h | 8 +++++++- testsuites/samples/iostream/init.cc | 10 ++++++++++ testsuites/samples/loopback/init.c | 13 +++++++++++++ testsuites/samples/pppd/init.c | 15 +++++++++------ testsuites/samples/pppd/pppdapp.c | 6 ++++++ 7 files changed, 64 insertions(+), 7 deletions(-) (limited to 'testsuites/samples') 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 + + * 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 * 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 #include +#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 #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 /* 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 /* for ata driver prototype */ #include /* 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 +#else #include +#endif + #include 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 +#if !BSP_SMALL_MEMORY + #include #include #include @@ -273,3 +275,14 @@ Init (rtems_task_argument ignored) puts( "*** END OF LOOPBACK TEST ***" ); exit( 0 ); } +#else +#include +/* + * 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 #include #include -#include -#include #define CONFIGURE_INIT #include "system.h" -#include "netconfig.h" - +#if !BSP_SMALL_MEMORY +#include +#include +#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 + +#if !BSP_SMALL_MEMORY + #include #include #include "system.h" @@ -144,3 +148,5 @@ int pppdapp_initialize(void) return ( iReturn ); } + +#endif -- cgit v1.2.3