This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Ethernet Driver hooking problem
- From: Gary Thomas <gary at chez-thomas dot org>
- To: "Cusson, Pascal" <pascal dot cusson at analog dot com>
- Cc: eCos Discussion <ecos-discuss at sources dot redhat dot com>
- Date: 23 Oct 2002 12:36:53 -0600
- Subject: Re: [ECOS] Ethernet Driver hooking problem
- References: <8FDC0F9BE1F91D44BE964AA54AAA67B6A48638@wilmexm3.ad.analog.com>
On Wed, 2002-10-23 at 12:17, Cusson, Pascal wrote:
> Hi everyone,
> I am having a hard time compiling my Ethernet driver. For those of you who have done before, I could surely use a few good pointers.
>
We've been over this already. You need to build the driver within the
eCos build environment and you'll need at least -D__ECOS -D__KERNEL for
this to work.
> Thanks for the tips.
>
> Pascal
>
>
> Here is my Ethernet hook:
>
> ETH_DRV_SC(ETH_FCC2_sc,0,"eth0",ETH_FCC2_Start,ETH_FCC2_Stop,ETH_FCC3_Control,ETH_FCC2_CanSend,ETH_FCC2_Send,ETH_FCC2_Recv,FCC2_Deliver,FCC2_Poll,FCC2_Vector);
>
> NETDEVTAB_ENTRY(ETH_FCC2_netdev,"eth0", ETH_FCC2_Init, Ð_FCC2_sc);
>
> All these functions exist and compile perfectly. It is when I had the hooks that my compiling problems begin.
>
> I am using the template Psim All, here is a snapshot of my ecos.ecc file:
>
> hardware psim ;
> template all ;
> package -hardware CYGPKG_HAL_POWERPC current ;
> package -hardware CYGPKG_HAL_POWERPC_PPC60x current ;
> package -hardware CYGPKG_HAL_POWERPC_SIM current ;
> package -template CYGPKG_HAL current ;
> package -template CYGPKG_IO current ;
> package -template CYGPKG_IO_SERIAL current ;
> package -template CYGPKG_INFRA current ;
> package -template CYGPKG_KERNEL current ;
> package -template CYGPKG_MEMALLOC current ;
> package -template CYGPKG_ISOINFRA current ;
> package -template CYGPKG_LIBC current ;
> package -template CYGPKG_LIBC_I18N current ;
> package -template CYGPKG_LIBC_SETJMP current ;
> package -template CYGPKG_LIBC_STARTUP current ;
> package -template CYGPKG_LIBC_STDIO current ;
> package -template CYGPKG_LIBC_STDLIB current ;
> package -template CYGPKG_LIBC_STRING current ;
> package -template CYGPKG_LIBC_TIME current ;
> package -template CYGPKG_LIBM current ;
> package -template CYGPKG_UITRON current ;
> package -template CYGPKG_IO_WATCHDOG current ;
> package -template CYGPKG_IO_WALLCLOCK current ;
> package -template CYGPKG_ERROR current ;
> package -template CYGPKG_IO_FILEIO current ;
> package -template CYGPKG_NET current ;
> package -template CYGPKG_NET_OPENBSD_STACK current ;
> package -template CYGPKG_NS_DNS current ;
> package -template CYGPKG_IO_ETH_DRIVERS current ;
> package -template CYGPKG_CRC current ;
> package -template CYGPKG_CPULOAD current ;
>
> Here is what I get when I compile my driver with the following include files:
>
> /*eCOS includes*/
> #include <cyg/infra/cyg_type.h>
> #include <cyg/infra/cyg_ass.h>
> #include <cyg/hal/hal_arch.h>
> #include <cyg/hal/hal_intr.h>
> #include <cyg/infra/diag.h>
> #include <cyg/hal/hal_if.h>
> #include <cyg/hal/drv_api.h>
> #include <cyg/io/eth/netdev.h>
> #include <cyg/io/eth/eth_drv.h>
> #include <eth/eth_drv.h>
> #include <network.h>
>
>
>
> [pcusson@pcusson-linux src]$ make
> gcc -c -I/home/pcusson/simall/install/include ETH_Driver.c -L/home/pcusson/simall/install/lib -Ttarget.ld -nostdlib
> In file included from /home/pcusson/simall/install/include/cyg/io/eth/eth_drv.h:63,
> from ETH_Driver.h:17,
> from ETH_Driver.c:3:
> /home/pcusson/simall/install/include/sys/param.h:97: sys/simplelock.h: No such file or directory
> /home/pcusson/simall/install/include/sys/param.h:109: sys/syslimits.h: No such file or directory
> /home/pcusson/simall/install/include/sys/param.h:139: sys/signal.h: No such file or directory
> In file included from /home/pcusson/simall/install/include/sys/param.h:344,
> from /home/pcusson/simall/install/include/cyg/io/eth/eth_drv.h:63,
> from ETH_Driver.h:17,
> from ETH_Driver.c:3:
> /home/pcusson/simall/install/include/machine/param.h:49: warning: `CLBYTES' redefined
> /home/pcusson/simall/install/include/sys/param.h:175: warning: this is the location of the previous definition
> In file included from ETH_Driver.c:3:
> ETH_Driver.h:18: eth/eth_drv.h: No such file or directory
> In file included from /home/pcusson/simall/install/include/network.h:42,
> from ETH_Driver.h:19,
> from ETH_Driver.c:3:
> /home/pcusson/simall/install/include/sys/ioctl.h:80: sys/ttycom.h: No such file or directory
> In file included from /home/pcusson/simall/install/include/network.h:42,
> from ETH_Driver.h:19,
> from ETH_Driver.c:3:
> /home/pcusson/simall/install/include/sys/ioctl.h:100: sys/dkio.h: No such file or directory
> /home/pcusson/simall/install/include/sys/ioctl.h:101: sys/filio.h: No such file or directory
> In file included from /home/pcusson/simall/install/include/network.h:55,
> from ETH_Driver.h:19,
> from ETH_Driver.c:3:
> /home/pcusson/simall/install/include/bootp.h:62: bptypes.h: No such file or directory
> make: *** [ETH_Driver.o] Error 1
> [pcusson@pcusson-linux src]$
>
> --
> 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