[ECOS] Debug eCos kernel

Deroo Stijn S.Deroo@TELEVIC.com
Wed Feb 11 09:55:00 GMT 2009


Andrew,

I enabled CYGIMPL_TRACE_SPLX, but I can't compile ecos correctly.  It's giving me following error.  I doubt if the right place to enable CYGIMPL_TRACE_SPLX is in param.h?

/ecos-c/version/vcs/c/dse-2001/ddvcs/build/ecos_7308_jtagram_dbg/install/include/cyg/kernel/kapi.h:1
37:29: macro "cyg_scheduler_lock" passed 1 arguments, but takes just 0
/ecos-c/version/vcs/c/dse-2001/ddvcs/build/ecos_7308_jtagram_dbg/install/include/cyg/kernel/kapi.h:1
39:31: macro "cyg_scheduler_unlock" passed 1 arguments, but takes just 0
/ecos-c/version/vcs/c/dse-2001/ddvcs/build/ecos_7308_jtagram_dbg/install/include/cyg/kernel/kapi.h:1
44:34: macro "cyg_scheduler_safe_lock" passed 1 arguments, but takes just 0
In file included from /ecos-c/version/vcs/c/ims/std_ims/ecos/packages/io/eth/current/src/net/eth_drv
.c:88:
/ecos-c/version/vcs/c/dse-2001/ddvcs/build/ecos_7308_jtagram_dbg/install/include/cyg/hal/hal_if.h: I
n function `__call_COMM_IF_WRITE':
/ecos-c/version/vcs/c/dse-2001/ddvcs/build/ecos_7308_jtagram_dbg/install/include/cyg/hal/hal_if.h:29
3: warning: implicit declaration of function `_cyg_scheduler_lock'
/ecos-c/version/vcs/c/dse-2001/ddvcs/build/ecos_7308_jtagram_dbg/install/include/cyg/hal/hal_if.h:29
3: warning: implicit declaration of function `_cyg_scheduler_unlock'
/ecos-c/version/vcs/c/ims/std_ims/ecos/packages/io/eth/current/src/net/eth_drv.c: At top level:
/ecos-c/version/vcs/c/dse-2001/ddvcs/build/ecos_7308_jtagram_dbg/install/include/cyg/kernel/kapi.h:1
37: storage size of `cyg_scheduler_lock' isn't known
/ecos-c/version/vcs/c/dse-2001/ddvcs/build/ecos_7308_jtagram_dbg/install/include/cyg/kernel/kapi.h:1
39: storage size of `cyg_scheduler_unlock' isn't known
/ecos-c/version/vcs/c/dse-2001/ddvcs/build/ecos_7308_jtagram_dbg/install/include/cyg/kernel/kapi.h:1
44: storage size of `cyg_scheduler_safe_lock' isn't known
make[2]: *** [src/net/eth_drv.o.d] Error 1
make[2]: Leaving directory `/ecos-c/version/vcs/c/dse-2001/ddvcs/build/ecos_7308_jtagram_dbg/io/eth/
current'
make[1]: *** [build] Error 2
make[1]: Leaving directory `/ecos-c/version/vcs/c/dse-2001/ddvcs/build/ecos_7308_jtagram_dbg'
make: *** [build_ecos] Error 2

KR,
Stijn.

> -----Original Message-----
> From: Andrew Lunn [mailto:andrew@lunn.ch]
> Sent: dinsdag 10 februari 2009 17:15
> To: Deroo Stijn
> Cc: ecos-discuss@sourceware.org
> Subject: Re: [ECOS] Debug eCos kernel
>
> On Tue, Feb 10, 2009 at 04:43:01PM +0100, Deroo Stijn wrote:
> > Ok, I enabled CYGPKG_INFRA_DEBUG and can see a lot of extra info, but
> I'm still not able to see what I need.  I looked further into
> http://ecos.sourceware.org/docs-latest/user-guide/debugging-
> techniques.html but don't see how this will enable the CYGIMPL_TRACE_SPLX
> flag.
> >
> > I need to know which thread/process is blocking the mutex 'splx_mutex'
> in synch.c (spl_any()), because at a certain time, the thread 'Network
> alarm support' is blocking on this mutex.
> >
> > Enabling CYGIMPL_TRACE_SPLX and calling show_sched_events() should
> answer this, but I really can't find where to enable this?
>
> Ah, so you really do want to debug the TCP/IP stack. When you said you
> wanted to debug the kernel i thought you really did want to debug the
> kernel, not the TCP/IP stack.
>
> So enable CYGIMPL_TRACE_SPLX and then call show_sched_events() every
> so often, especially after your system has deadlocked or done whatever
> it does.
>
>    Andrew

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list