public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Problem compiling newnet with timing stats
@ 2002-06-14 14:02 Paul Randall
  2002-06-14 14:23 ` Gary Thomas
  2002-06-14 14:36 ` Gary Thomas
  0 siblings, 2 replies; 6+ messages in thread
From: Paul Randall @ 2002-06-14 14:02 UTC (permalink / raw)
  To: ecos-discuss

Hi all,

I am having problems compiling the newnet (FreeBSD) template with
CYGDBG_NET_TIMING_STATS turned on in eCos 2.0.  I can compile and run
the original TCP/IP stack (OpenBSD) with timing stats with no problem.
During the make for newnet, I get the following errors:

In file included from
/ecos-c/cygwin/src/ecos2a/ecos/newnet/install/include/sys/param.h:820,
from
/ecos-c/cygwin/src/ecos2a/ecos/packages/net/bsd_tcpip/current/src/ecos/support.c:56:

/ecos-c/cygwin/src/ecos2a/ecos/newnet/install/include/cyg/kernel/kapi.h:360:
warning: function declaration isn't a prototype
/ecos-c/cygwin/src/ecos2a/ecos/packages/net/bsd_tcpip/current/src/ecos/support.c:
In function `cyg_net_malloc':
/ecos-c/cygwin/src/ecos2a/ecos/packages/net/bsd_tcpip/current/src/ecos/support.c:197:
parse error before `start_time'
/ecos-c/cygwin/src/ecos2a/ecos/packages/net/bsd_tcpip/current/src/ecos/support.c:197:
`start_time' undeclared (first use in this function)
/ecos-c/cygwin/src/ecos2a/ecos/packages/net/bsd_tcpip/current/src/ecos/support.c:197:
(Each undeclared identifier is reported only once
/ecos-c/cygwin/src/ecos2a/ecos/packages/net/bsd_tcpip/current/src/ecos/support.c:197:
for each function it appears in.)
/ecos-c/cygwin/src/ecos2a/ecos/packages/net/bsd_tcpip/current/src/ecos/support.c:203:
`end_time' undeclared (first use in this function)
/ecos-c/cygwin/src/ecos2a/ecos/packages/net/bsd_tcpip/current/src/ecos/support.c:203:
`elapsed_time' undeclared (first use in this function)
/ecos-c/cygwin/src/ecos2a/ecos/packages/net/bsd_tcpip/current/src/ecos/support.c:
In function `cyg_net_mbuf_alloc':
/ecos-c/cygwin/src/ecos2a/ecos/packages/net/bsd_tcpip/current/src/ecos/support.c:222:
parse error before `start_time'
/ecos-c/cygwin/src/ecos2a/ecos/packages/net/bsd_tcpip/current/src/ecos/support.c:222:
`start_time' undeclared (first use in this function)
/ecos-c/cygwin/src/ecos2a/ecos/packages/net/bsd_tcpip/current/src/ecos/support.c:229:
`end_time' undeclared (first use in this function)
/ecos-c/cygwin/src/ecos2a/ecos/packages/net/bsd_tcpip/current/src/ecos/support.c:229:
`elapsed_time' undeclared (first use in this function)
/ecos-c/cygwin/src/ecos2a/ecos/packages/net/bsd_tcpip/current/src/ecos/support.c:
In function `cyg_net_cluster_alloc':
/ecos-c/cygwin/src/ecos2a/ecos/packages/net/bsd_tcpip/current/src/ecos/support.c:251:
parse error before `start_time'
/ecos-c/cygwin/src/ecos2a/ecos/packages/net/bsd_tcpip/current/src/ecos/support.c:251:
`start_time' undeclared (first use in this function)
/ecos-c/cygwin/src/ecos2a/ecos/packages/net/bsd_tcpip/current/src/ecos/support.c:253:
`end_time' undeclared (first use in this function)
/ecos-c/cygwin/src/ecos2a/ecos/packages/net/bsd_tcpip/current/src/ecos/support.c:253:
`elapsed_time' undeclared (first use in this function)
make[1]: *** [src/ecos/support.o.d] Error 1
make[1]: Leaving directory
`/src/ecos2a/ecos/newnet/net/bsd_tcpip/current'
make: *** [build] Error 2

It looks like the compile errors are coming from the START_STATS() and
FINISH_STATS() macros in param.h:

#ifdef CYGDBG_NET_TIMING_STATS
#define START_STATS()                                   \
    cyg_uint32 start_time, end_time, elapsed_time;      \
    HAL_CLOCK_READ(&start_time);
#define
FINISH_STATS(stats)
\

HAL_CLOCK_READ(&end_time);
\
    if (end_time < start_time)
{                                                        \
        elapsed_time = (end_time+CYGNUM_KERNEL_COUNTERS_RTC_PERIOD) -
start_time;       \
    } else
{
\
        elapsed_time = end_time -
start_time;                                           \

}
\
    if (stats.min_time == 0)
{                                                          \
        stats.min_time =
0x7FFFFFFF;                                                    \

}
\
    if (elapsed_time <
stats.min_time)                                                  \
        stats.min_time =
elapsed_time;                                                  \
    if (elapsed_time >
stats.max_time)                                                  \
        stats.max_time =
elapsed_time;                                                  \
    stats.total_time +=
elapsed_time;                                                   \
    stats.count++;
#else
#define START_STATS()
#define FINISH_STATS(X)
#endif

I tried moving the "cyg_uint32 start_time, end_time, elapsed_time;" line
before the "#define START_STATS()" and the template compiled ok, but
when I went to run a test, my viper locked up during the ethernet
initialization.

Any suggestions?

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-06-17 16:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-14 14:02 [ECOS] Problem compiling newnet with timing stats Paul Randall
2002-06-14 14:23 ` Gary Thomas
2002-06-17  8:37   ` Paul Randall
2002-06-17  9:05     ` Andrew Lunn
2002-06-17  9:29       ` Gary Thomas
2002-06-14 14:36 ` Gary Thomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).