[ECOS] problems using sockets

gerardo.rossi@studenti.univr.it gerardo.rossi@studenti.univr.it
Thu Oct 27 10:48:00 GMT 2005


We are two italian students, for our thesis we use an application that has need
to use the sockets under eCos, we shape eCos with the following configuration:

Using Configtool:

in Build->Templates we select

hardware: "Linux Synthetic Target"

template: "net", that includes all these packages:

    package -hardware CYGPKG_HAL_SYNTH v2_0 ;
    package -hardware CYGPKG_HAL_SYNTH_I386 v2_0 ;
    package -hardware CYGPKG_DEVS_FLASH_SYNTH v2_0 ;
    package -hardware CYGPKG_DEVS_ETH_ECOSYNTH v2_0 ;
    package -hardware CYGPKG_DEVS_WATCHDOG_SYNTH v2_0 ;
    package CYGPKG_HAL v2_0 ;
    package CYGPKG_IO v2_0 ;
    package CYGPKG_IO_SERIAL v2_0 ;
    package CYGPKG_INFRA v2_0 ;
    package CYGPKG_ISOINFRA v2_0 ;
    package CYGPKG_KERNEL v2_0 ;
    package CYGPKG_MEMALLOC v2_0 ;
    package CYGPKG_LIBC v2_0 ;
    package CYGPKG_LIBC_TIME v2_0 ;
    package CYGPKG_LIBC_STDLIB v2_0 ;
    package CYGPKG_LIBC_STRING v2_0 ;
    package CYGPKG_LIBC_I18N v2_0 ;
    package CYGPKG_LIBC_SETJMP v2_0 ;
    package CYGPKG_LIBC_STARTUP v2_0 ;
    package CYGPKG_LIBC_STDIO v2_0 ;
    package CYGPKG_LIBM v2_0 ;
    package CYGPKG_POSIX v2_0 ;
    package CYGPKG_IO_WATCHDOG v2_0 ;
    package CYGPKG_IO_WALLCLOCK v2_0 ;
    package -template CYGPKG_ERROR v2_0 ;
    package -template CYGPKG_IO_FILEIO v2_0 ;
    package -template CYGPKG_NET v2_0 ;
    package -template CYGPKG_NET_FREEBSD_STACK v2_0 ;
    package -template CYGPKG_NS_DNS v2_0 ;
    package -template CYGPKG_IO_ETH_DRIVERS v2_0 ;

... so we compile eCos(Build->Library) and our application "app_adpcm.c"
obtaining this error:

gcc -c -o app_adpcm.o -I/home/rossi/ecos/ecos-work/net_install/include -Wall
-Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g
-O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc
-finit-priority app_adpcm.c
app_adpcm.c: In function `adpcm_code':
app_adpcm.c:54: warning: `outputbuffer' might be used uninitialized in this
function
gcc -nostartfiles -L/home/rossi/ecos/ecos-work/net_install/lib -Ttarget.ld -g
-nostdlib -Wl,--gc-sections -Wl,-static -o app_adpcm app_adpcm.o
/home/rossi/ecos/ecos-work/net_install/lib/libtarget.a(net_bsd_tcpip_ip_icmp.o)(.bss.cyg_icmpstat+0x0):
In function `ip_next_mtu':
/home/rossi/ecos/ecos-2.0/packages/net/bsd_tcpip/v2_0/src/sys/netinet/ip_icmp.c:129:
multiple definition of `cyg_icmpstat'
/home/rossi/ecos/ecos-work/net_install/lib/libtarget.a(net_bsd_tcpip_udp_usrreq.o)(.bss.cyg_icmpstat+0x0):/home/rossi/ecos/ecos-2.0/packages/net/bsd_tcpip/v2_0/src/sys/netinet/udp_usrreq.c:140:
first defined here
/home/rossi/ecos/ecos-work/net_install/lib/libtarget.a(net_bsd_tcpip_tcp_input.o)(.bss.cyg_icmpstat+0x0):
In function `tcp_newreno':
/home/rossi/ecos/ecos-2.0/packages/net/bsd_tcpip/v2_0/src/sys/netinet/tcp_input.c:155:
multiple definition of `cyg_icmpstat'
/home/rossi/ecos/ecos-work/net_install/lib/libtarget.a(net_bsd_tcpip_udp_usrreq.o)(.bss.cyg_icmpstat+0x0):
first defined here
collect2: ld returned 1 exit status
make: *** [app_adpcm] Error 1


NOTE: we obtain this error also compiling the eCos examples, but using template
"default" is all ok.

PLEASE WE NEED HELP TO MORE SOON !! THANKS!

Massignai Mirko,
Rossi Gerardo.




----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

-- 
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