Hi Folks
I'm currently working on a target which does not have much RAM. A
couple of the kernel tests fail to compile because of stack size or
big arrays. This patch solves these problems.
Andrew
Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/kernel/current/ChangeLog,v
retrieving revision 1.130
diff -u -r1.130 ChangeLog
--- ChangeLog 19 Jan 2006 17:53:58 -0000 1.130
+++ ChangeLog 14 Feb 2006 19:09:02 -0000
@@ -1,3 +1,11 @@
+2006-02-14 Andrew Lunn <[EMAIL PROTECTED]>
+
+ * tests/timeslice.c (STACK_SIZE): Reduce the stack size so it will
+ compile on targets wit h only small amounts of RAM.
+ * tests/fptest.c: Calculate the size of ftp2_values array to fit
+ the amount of RAM in small systems.
+ * tests/clocktruth.cxx: Fix the header.
+
2006-01-19 Nick Garnett <[EMAIL PROTECTED]>
* src/sched/sched.cxx (thread_entry): Fixed a bug which could
Index: tests/clocktruth.cxx
===================================================================
RCS file: /cvs/ecos/ecos/packages/kernel/current/tests/clocktruth.cxx,v
retrieving revision 1.4
diff -u -r1.4 clocktruth.cxx
--- tests/clocktruth.cxx 10 Feb 2003 21:04:00 -0000 1.4
+++ tests/clocktruth.cxx 14 Feb 2006 19:09:02 -0000
@@ -2,7 +2,7 @@
//
// clocktruth.cxx
//
-// Clock Converter test
+// Clock accuracy test
//
//==========================================================================
//####ECOSGPLCOPYRIGHTBEGIN####
Index: tests/fptest.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/kernel/current/tests/fptest.c,v
retrieving revision 1.6
diff -u -r1.6 fptest.c
--- tests/fptest.c 16 Apr 2004 03:33:59 -0000 1.6
+++ tests/fptest.c 14 Feb 2006 19:09:03 -0000
@@ -61,7 +61,7 @@
#include <cyg/infra/diag.h>
//#include <cyg/kernel/test/stackmon.h>
-//#include CYGHWR_MEMORY_LAYOUT_H
+#include CYGHWR_MEMORY_LAYOUT_H
//==========================================================================
@@ -243,8 +243,11 @@
}
//==========================================================================
-
+#if (CYGMEM_REGION_ram_SIZE / 8 / 2) < 10000
+#define FP2_COUNT (CYGMEM_REGION_ram_SIZE / 8 / 2)
+#else
#define FP2_COUNT 10000
+#endif
static double fpt2_values[FP2_COUNT];
Index: tests/timeslice.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/kernel/current/tests/timeslice.c,v
retrieving revision 1.4
diff -u -r1.4 timeslice.c
--- tests/timeslice.c 19 Feb 2004 10:57:36 -0000 1.4
+++ tests/timeslice.c 14 Feb 2006 19:09:03 -0000
@@ -71,7 +71,7 @@
//==========================================================================
-#define STACK_SIZE CYGNUM_HAL_STACK_SIZE_TYPICAL*5
+#define STACK_SIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
#define NTHREADS_MAX (CYGNUM_KERNEL_CPU_MAX*6)