This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Problems with eCos 2.0 tests for viper
- From: Gary Thomas <gthomas at redhat dot com>
- To: Paul Randall <prandall at delta-info dot com>
- Cc: eCos Discussion <ecos-discuss at sources dot redhat dot com>
- Date: 30 May 2002 09:54:00 +0100
- Subject: Re: [ECOS] Problems with eCos 2.0 tests for viper
- References: <3CF530D4.19694001@delta-info.com>
On Wed, 2002-05-29 at 20:49, Paul Randall wrote:
> Hi all,
>
> Yesterday, I did a CVS download of the eCos Version 2.0 alpha source and
> I was able to build the library without errors (although a lot of
> warnings were generated - I'm not sure if this is normal). However, I
> got some errors while building the tests.
>
> The first error occurred while building the eCos kernel tests. I got
> the message "No rule to make target 'tests/thread2tests/kclock0.d'". I
> traced this to the makefile in the build/kernel/current directory where
> I deleted the /thread2tests part of TESTS := line. When I tried to
> build the tests again, this test built ok. However, when I reloaded the
> configuration, the makefile was regenerated and /thread2tests
> reappeared. I'm not sure where this /thread2tests is coming from -
> there was a /thread2tests on line 9201 of the *.ecc file but it was in a
> section of comments. I deleted it, but the /thread2tests was still
> generated in the makefile.
>
Make sure you get the most up-to-date version of "ecosconfig" since the
CDL has changed in ways that older tools can't handle.
> The next error I got was in the tcp_echo.c test where I got the message
> "lib/libkern/libkern.h : no such file or directory". I took this test
> out of the net.cdl file so as to skip this test. I got a similar error
> while building the bridge.c test where I got the message
> "net/if_bridge.h : no such file or directory". I also removed the
> bridge test from the net.cdl file.
I assume that you used the "new_net" (the FreeBSD TCP/IP stack). The
bridge test should not be built as bridging isn't currently supported
with that stack.
As for the other error, this patch will fix it:
Index: net/common/current/tests/bridge.c
===================================================================
RCS file: /home/cvs/ecc/ecc/net/common/current/tests/bridge.c,v
retrieving revision 1.2
diff -u -5 -p -r1.2 bridge.c
--- net/common/current/tests/bridge.c 18 May 2002 18:38:32 -0000 1.2
+++ net/common/current/tests/bridge.c 30 May 2002 08:49:53 -0000
@@ -65,10 +65,11 @@
#include <stdio.h>
#include <network.h>
#include <sys/types.h>
#include <stdlib.h>
+#ifdef CYGPKG_NET_BRIDGE
#include <net/if.h>
#include <net/if_dl.h>
#include <netinet/in.h>
#include <netinet/if_ether.h>
#include <net/if_bridge.h>
@@ -981,6 +982,13 @@ cyg_user_start(void) {
&main_handle, &main_thread);
cyg_thread_resume(main_handle);
printf("cyg_user_start done\n");
}
+#else // CYGPKG_NET_BRIDGE
+
+void
+cyg_user_start(void) {
+ printf("No bridge support available\n");
+}
+#endif
Index: net/common/current/tests/tcp_echo.c
===================================================================
RCS file: /home/cvs/ecc/ecc/net/common/current/tests/tcp_echo.c,v
retrieving revision 1.2
diff -u -5 -p -r1.2 tcp_echo.c
--- net/common/current/tests/tcp_echo.c 18 May 2002 18:38:32 -0000 1.2
+++ net/common/current/tests/tcp_echo.c 30 May 2002 08:37:31 -0000
@@ -63,13 +63,17 @@
#endif
// Network throughput test code
-#include <lib/libkern/libkern.h>
-
#include <network.h>
+
+static __inline__ int
+max(int m, int n)
+{
+ return m > n ? m : n;
+}
#define SOURCE_PORT 9990
#define SINK_PORT 9991
#define MAX_BUF 8192
>
> I tried to run the ftp_test (which built successfully) using Insight,
> but once the test was downloaded to the viper, nothing happened. There
> was no diagnostic output on Insight's console, and execution did not
> stop at any breakpoints I set. I also tried the ping_test which did
> nothing as well. These tests worked with the pre-2.0 version of eCos
> (although ftp_test took a long time to complete - about 90 seconds,
> which is why I'm trying to get Version 2.0 working). I did notice a
> difference in the way ftp_test was downloaded to the viper. When I was
> running with the pre-2.0 version of eCos, the Start address was 0x20000
> and the load size was 497836. With eCos 2.0, the load address is now
> 0x40000 and the load size is 289500. Could this be preventing the
> program from executing?
>
I'll give this a shot and see what's up.
> I am running eCos on a Windows 98 system and debugging over the viper's
> serial port.
>
> Paul Randall
> Delta Information Systems
>
>
> --
> Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
> and search the list archive: http://sources.redhat.com/ml/ecos-discuss
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss