public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] invalid conversion from void* to void**
@ 2006-05-04 11:43 robert sebestyen
  2006-05-04 12:40 ` Andrew Lunn
  0 siblings, 1 reply; 12+ messages in thread
From: robert sebestyen @ 2006-05-04 11:43 UTC (permalink / raw)
  To: ecos-discuss

First, I would like to apologize myself  for disturbing you with my problem.

I implemented a lwIP into an existing project running on OS ecos, when i 
call the data i receive always invalid conversion from void* to void**! I 
call the lwIP with the following code:



static void

httpget(void *arg)

{

            int k=1;

            int res;

            struct netconn *conn;

            static char httpreq[255];

            struct ip_addr addr;

            char *data;

                cyg_uint16 len, i;





            while(1)

            {

            sprintf(httpreq,"GET 
http://www.ascribo.at/tmobile/showip.php?package=%d HTTP/1.0\r\n\r\n",k);



            k++; //incr. ascribocounter



            struct netbuf *buf;

            // Create a new connection identifier.

            conn = netconn_new(NETCONN_TCP);

        while (1)

                        if(lwip_ppp_status() == 1)

                        {

                                   diag_printf("IP-Address: %u.%u.%u.%u \n",



                                               ip4_addr1(ppp_ip_addr),

                                               ip4_addr2(ppp_ip_addr),

                                               ip4_addr3(ppp_ip_addr),

                                               ip4_addr4(ppp_ip_addr));



                        }// of if



    IP4_ADDR(&addr,213,225,63,42);   //www.ascribo.com (funktioniert!)



            // Tell connection to remote host.

            res=netconn_connect(conn, &addr, 80);

            netconn_write(conn, httpreq, sizeof(httpreq), NETCONN_COPY);

            diag_printf("%d",conn->type);



            while((buf = netconn_recv(conn)) != NULL)

            {

                                    do {

                                                                             
                                                                 
netbuf_data(buf,(void*)&data,&len);

                                               for(i = 0; i < len; i++)

                                               {

                                               diag_printf("%c",data[i]);

                                               }                             
                  }

                                    } while(netbuf_next(buf) >= 0);



                                    netbuf_delete(buf);

                                    cyg_thread_delay(10);

            }

            netconn_close(conn);

            diag_printf("\r\nDisconnected");

            netconn_delete(conn);

            diag_printf("Netconn_Delete");

            }// of while(1)



}//end of static void httpget(void *arg)



I have at the moment any clue how to solve that problem due to the fact that 
i tried any casts already!

Thx for help or any advice!

Robert



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

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

* Re: [ECOS] invalid conversion from void* to void**
  2006-05-04 11:43 [ECOS] invalid conversion from void* to void** robert sebestyen
@ 2006-05-04 12:40 ` Andrew Lunn
  2006-05-04 13:02   ` robert sebestyen
  0 siblings, 1 reply; 12+ messages in thread
From: Andrew Lunn @ 2006-05-04 12:40 UTC (permalink / raw)
  To: robert sebestyen; +Cc: ecos-discuss

On Thu, May 04, 2006 at 01:28:29PM +0200, robert sebestyen wrote:
> First, I would like to apologize myself  for disturbing you with my problem.
> 
> I implemented a lwIP into an existing project running on OS ecos, when i 
> call the data i receive always invalid conversion from void* to void**! I 
> call the lwIP with the following code:

You don't say which function call is actually giving you the warnings.
My guess is it is:

> netbuf_data(buf,(void*)&data,&len);


in aph.h we have:

err_t netbuf_data (struct netbuf *buf, void **dataptr, u16_t *len);

your second parameter is wrong. You pass a void *, not a void **. 

     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

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

* Re: [ECOS] invalid conversion from void* to void**
  2006-05-04 12:40 ` Andrew Lunn
@ 2006-05-04 13:02   ` robert sebestyen
  2006-05-04 13:19     ` Andrew Lunn
  0 siblings, 1 reply; 12+ messages in thread
From: robert sebestyen @ 2006-05-04 13:02 UTC (permalink / raw)
  To: andrew; +Cc: ecos-discuss

Hi Andrew, you are right it is netbuf_data , occuring that problem,
I tried already the way netbuf_data(buf,(void**)&data,&len);
I got doing that the linkermessages
undefined references to ntohl, netconn_new, and sys_thread_new;
it is somehow crazy cause the objectfiles are existing but he does not found 
the references

obj/maintask.o(.text+0x1f4): In function `httpget':
src/maintask.cxx:281: undefined reference to `netconn_new(netconn_type)'
obj/maintask.o(.text+0x228):src/maintask.cxx:287: undefined reference to 
`ntohl(unsigned long)'
obj/maintask.o(.text+0x250):src/maintask.cxx:287: undefined reference to 
`ntohl(unsigned long)'
obj/maintask.o(.text+0x278):src/maintask.cxx:287: undefined reference to 
`ntohl(unsigned long)'
obj/maintask.o(.text+0x2a0):src/maintask.cxx:287: undefined reference to 
`ntohl(unsigned long)'
obj/maintask.o(.text+0x3ec): In function `ppp_modem()':
src/maintask.cxx:374: undefined reference to `ntohl(unsigned long)'
obj/maintask.o(.text+0x414):src/maintask.cxx:374: more undefined references 
to `ntohl(unsigned long)' follow
obj/maintask.o(.text+0x4a4): In function `ppp_modem()':
src/maintask.cxx:380: undefined reference to `sys_thread_new(void 
(*)(void*), void*, int)'
collect2: ld returned 1 exit status
make: *** [sirf_demo.out] Error 1
make: Target `all' not remade because of errors.


>From: Andrew Lunn <andrew@lunn.ch>
>To: robert sebestyen <sebestyenrobert@hotmail.com>
>CC: ecos-discuss@ecos.sourceware.org
>Subject: Re: [ECOS] invalid conversion from void* to void**
>Date: Thu, 4 May 2006 14:40:25 +0200
>
>On Thu, May 04, 2006 at 01:28:29PM +0200, robert sebestyen wrote:
> > First, I would like to apologize myself  for disturbing you with my 
>problem.
> >
> > I implemented a lwIP into an existing project running on OS ecos, when i
> > call the data i receive always invalid conversion from void* to void**! 
>I
> > call the lwIP with the following code:
>
>You don't say which function call is actually giving you the warnings.
>My guess is it is:
>
> > netbuf_data(buf,(void*)&data,&len);
>
>
>in aph.h we have:
>
>err_t netbuf_data (struct netbuf *buf, void **dataptr, u16_t *len);
>
>your second parameter is wrong. You pass a void *, not a void **.
>
>      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

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

* Re: [ECOS] invalid conversion from void* to void**
  2006-05-04 13:02   ` robert sebestyen
@ 2006-05-04 13:19     ` Andrew Lunn
  2006-05-04 13:31       ` robert sebestyen
  0 siblings, 1 reply; 12+ messages in thread
From: Andrew Lunn @ 2006-05-04 13:19 UTC (permalink / raw)
  To: robert sebestyen; +Cc: andrew, ecos-discuss

On Thu, May 04, 2006 at 03:02:08PM +0200, robert sebestyen wrote:
> Hi Andrew, you are right it is netbuf_data , occuring that problem,
> I tried already the way netbuf_data(buf,(void**)&data,&len);
> I got doing that the linkermessages
> undefined references to ntohl, netconn_new, and sys_thread_new;
> it is somehow crazy cause the objectfiles are existing but he does not 
> found the references
> 
> obj/maintask.o(.text+0x1f4): In function `httpget':
> src/maintask.cxx:281: undefined reference to `netconn_new(netconn_type)'
> obj/maintask.o(.text+0x228):src/maintask.cxx:287: undefined reference to 
> `ntohl(unsigned long)'
> obj/maintask.o(.text+0x250):src/maintask.cxx:287: undefined reference to 
> `ntohl(unsigned long)'
> obj/maintask.o(.text+0x278):src/maintask.cxx:287: undefined reference to 
> `ntohl(unsigned long)'
> obj/maintask.o(.text+0x2a0):src/maintask.cxx:287: undefined reference to 
> `ntohl(unsigned long)'
> obj/maintask.o(.text+0x3ec): In function `ppp_modem()':
> src/maintask.cxx:374: undefined reference to `ntohl(unsigned long)'
> obj/maintask.o(.text+0x414):src/maintask.cxx:374: more undefined references 
> to `ntohl(unsigned long)' follow
> obj/maintask.o(.text+0x4a4): In function `ppp_modem()':
> src/maintask.cxx:380: undefined reference to `sys_thread_new(void 
> (*)(void*), void*, int)'
> collect2: ld returned 1 exit status
> make: *** [sirf_demo.out] Error 1
> make: Target `all' not remade because of errors.

This looks like a header file problem:

include/lwip/inet.h:
#if BYTE_ORDER == BIG_ENDIAN
#define htons(x) (x)
#define ntohs(x) (x)
#define htonl(x) (x)
#define ntohl(x) (x)
#else
#ifdef LWIP_PREFIX_BYTEORDER_FUNCS
/* workaround for naming collisions on some platforms */
#define htons lwip_htons
#define ntohs lwip_ntohs
#define htonl lwip_htonl
#define ntohl lwip_ntohl
#endif

Note you are only getting linker errors in your code. The lwip code
itself is happy.

I guess you have not included the correct header file(s).

  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

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

* Re: [ECOS] invalid conversion from void* to void**
  2006-05-04 13:19     ` Andrew Lunn
@ 2006-05-04 13:31       ` robert sebestyen
  2006-05-04 13:33         ` Andrew Lunn
  0 siblings, 1 reply; 12+ messages in thread
From: robert sebestyen @ 2006-05-04 13:31 UTC (permalink / raw)
  To: andrew; +Cc: ecos-discuss


I got in my maintask following headerfiles included
lwip/sys.h
lwip/api.h
and now
lwip/ inet.h
but my errors are still here!


>From: Andrew Lunn <andrew@lunn.ch>
>To: robert sebestyen <sebestyenrobert@hotmail.com>
>CC: andrew@lunn.ch, ecos-discuss@ecos.sourceware.org
>Subject: Re: [ECOS] invalid conversion from void* to void**
>Date: Thu, 4 May 2006 15:16:18 +0200
>
>On Thu, May 04, 2006 at 03:02:08PM +0200, robert sebestyen wrote:
> > Hi Andrew, you are right it is netbuf_data , occuring that problem,
> > I tried already the way netbuf_data(buf,(void**)&data,&len);
> > I got doing that the linkermessages
> > undefined references to ntohl, netconn_new, and sys_thread_new;
> > it is somehow crazy cause the objectfiles are existing but he does not
> > found the references
> >
> > obj/maintask.o(.text+0x1f4): In function `httpget':
> > src/maintask.cxx:281: undefined reference to `netconn_new(netconn_type)'
> > obj/maintask.o(.text+0x228):src/maintask.cxx:287: undefined reference to
> > `ntohl(unsigned long)'
> > obj/maintask.o(.text+0x250):src/maintask.cxx:287: undefined reference to
> > `ntohl(unsigned long)'
> > obj/maintask.o(.text+0x278):src/maintask.cxx:287: undefined reference to
> > `ntohl(unsigned long)'
> > obj/maintask.o(.text+0x2a0):src/maintask.cxx:287: undefined reference to
> > `ntohl(unsigned long)'
> > obj/maintask.o(.text+0x3ec): In function `ppp_modem()':
> > src/maintask.cxx:374: undefined reference to `ntohl(unsigned long)'
> > obj/maintask.o(.text+0x414):src/maintask.cxx:374: more undefined 
>references
> > to `ntohl(unsigned long)' follow
> > obj/maintask.o(.text+0x4a4): In function `ppp_modem()':
> > src/maintask.cxx:380: undefined reference to `sys_thread_new(void
> > (*)(void*), void*, int)'
> > collect2: ld returned 1 exit status
> > make: *** [sirf_demo.out] Error 1
> > make: Target `all' not remade because of errors.
>
>This looks like a header file problem:
>
>include/lwip/inet.h:
>#if BYTE_ORDER == BIG_ENDIAN
>#define htons(x) (x)
>#define ntohs(x) (x)
>#define htonl(x) (x)
>#define ntohl(x) (x)
>#else
>#ifdef LWIP_PREFIX_BYTEORDER_FUNCS
>/* workaround for naming collisions on some platforms */
>#define htons lwip_htons
>#define ntohs lwip_ntohs
>#define htonl lwip_htonl
>#define ntohl lwip_ntohl
>#endif
>
>Note you are only getting linker errors in your code. The lwip code
>itself is happy.
>
>I guess you have not included the correct header file(s).
>
>   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
>



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

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

* Re: [ECOS] invalid conversion from void* to void**
  2006-05-04 13:31       ` robert sebestyen
@ 2006-05-04 13:33         ` Andrew Lunn
  2006-05-04 13:43           ` robert sebestyen
  0 siblings, 1 reply; 12+ messages in thread
From: Andrew Lunn @ 2006-05-04 13:33 UTC (permalink / raw)
  To: robert sebestyen; +Cc: andrew, ecos-discuss

On Thu, May 04, 2006 at 03:31:43PM +0200, robert sebestyen wrote:
> 
> I got in my maintask following headerfiles included
> lwip/sys.h
> lwip/api.h
> and now
> lwip/ inet.h
> but my errors are still here!
> 

Try <network.h>

    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

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

* Re: [ECOS] invalid conversion from void* to void**
  2006-05-04 13:33         ` Andrew Lunn
@ 2006-05-04 13:43           ` robert sebestyen
  2006-05-04 13:54             ` Andrew Lunn
  0 siblings, 1 reply; 12+ messages in thread
From: robert sebestyen @ 2006-05-04 13:43 UTC (permalink / raw)
  To: andrew; +Cc: ecos-discuss


network.h ???
it is used in the BSD-Stack, isn´t it???
but i am using the lwIP-Stack, i tried already the BSD-Stack, but i have not 
enough space

Robert
>From: Andrew Lunn <andrew@lunn.ch>
>To: robert sebestyen <sebestyenrobert@hotmail.com>
>CC: andrew@lunn.ch, ecos-discuss@ecos.sourceware.org
>Subject: Re: [ECOS] invalid conversion from void* to void**
>Date: Thu, 4 May 2006 15:33:27 +0200
>
>On Thu, May 04, 2006 at 03:31:43PM +0200, robert sebestyen wrote:
> >
> > I got in my maintask following headerfiles included
> > lwip/sys.h
> > lwip/api.h
> > and now
> > lwip/ inet.h
> > but my errors are still here!
> >
>
>Try <network.h>
>
>     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
>



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

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

* Re: [ECOS] invalid conversion from void* to void**
  2006-05-04 13:43           ` robert sebestyen
@ 2006-05-04 13:54             ` Andrew Lunn
  2006-05-04 14:16               ` robert sebestyen
  0 siblings, 1 reply; 12+ messages in thread
From: Andrew Lunn @ 2006-05-04 13:54 UTC (permalink / raw)
  To: robert sebestyen; +Cc: ecos-discuss

On Thu, May 04, 2006 at 03:43:03PM +0200, robert sebestyen wrote:
> 
> network.h ???
> it is used in the BSD-Stack, isn?t it???

No, it is used in all network stacks.

$ ls -l packages/net/lwip_tcpip/current/include/network.h 
-rw-r--r-- 1 lunn lunn 2877 Mar 29 12:22 packages/net/lwip_tcpip/current/include/network.h

    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

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

* Re: [ECOS] invalid conversion from void* to void**
  2006-05-04 13:54             ` Andrew Lunn
@ 2006-05-04 14:16               ` robert sebestyen
  2006-05-04 14:31                 ` Andrew Lunn
  2006-05-04 20:42                 ` [ECOS] eCos port on SPEAR-07-NC03 Evgeny Belyanco
  0 siblings, 2 replies; 12+ messages in thread
From: robert sebestyen @ 2006-05-04 14:16 UTC (permalink / raw)
  To: andrew; +Cc: ecos-discuss

hi andrew,
i included network.h into my maintask, result ->0  errors are still here,
is there another way to get data from lwIP-Stack ???
i know i sound a little bit desperated already


>From: Andrew Lunn <andrew@lunn.ch>
>To: robert sebestyen <sebestyenrobert@hotmail.com>
>CC: ecos-discuss@ecos.sourceware.org
>Subject: Re: [ECOS] invalid conversion from void* to void**
>Date: Thu, 4 May 2006 15:51:28 +0200
>
>On Thu, May 04, 2006 at 03:43:03PM +0200, robert sebestyen wrote:
> >
> > network.h ???
> > it is used in the BSD-Stack, isn?t it???
>
>No, it is used in all network stacks.
>
>$ ls -l packages/net/lwip_tcpip/current/include/network.h
>-rw-r--r-- 1 lunn lunn 2877 Mar 29 12:22 
>packages/net/lwip_tcpip/current/include/network.h
>
>     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
>



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

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

* Re: [ECOS] invalid conversion from void* to void**
  2006-05-04 14:16               ` robert sebestyen
@ 2006-05-04 14:31                 ` Andrew Lunn
  2006-05-04 20:42                 ` [ECOS] eCos port on SPEAR-07-NC03 Evgeny Belyanco
  1 sibling, 0 replies; 12+ messages in thread
From: Andrew Lunn @ 2006-05-04 14:31 UTC (permalink / raw)
  To: robert sebestyen; +Cc: ecos-discuss

On Thu, May 04, 2006 at 04:16:31PM +0200, robert sebestyen wrote:
> hi andrew,
> i included network.h into my maintask, result ->0  errors are still here,
> is there another way to get data from lwIP-Stack ???
> i know i sound a little bit desperated already

O.K. so you need to do some proper debugging.

Do you have a big or little endian system?

Does the file which is giving your problems somehow get inet.h
included?  What is the value of BYTE_ORDER? What #define htonl is
being included?

To answer these questions you probably want to use the flags -E -dD to
gcc. You might want to look at the gcc documentation to find out what
these do.

      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

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

* [ECOS] eCos port on SPEAR-07-NC03
  2006-05-04 14:16               ` robert sebestyen
  2006-05-04 14:31                 ` Andrew Lunn
@ 2006-05-04 20:42                 ` Evgeny Belyanco
  2006-05-05  7:29                   ` Andrew Lunn
  1 sibling, 1 reply; 12+ messages in thread
From: Evgeny Belyanco @ 2006-05-04 20:42 UTC (permalink / raw)
  To: ecos-discuss

Hi!

From firts page of new ST ARM 720 chip we can read:
http://www.st.com/stonline/products/literature/ds/11637/spear-07-nc03.pdf

SPEAR-07-NC03 is supported by several Operation Systems such as eCOS.

Is this port avaliable in public?


Evgeny Belyanco
**********************************
* E-mail: ea@kbkcc.ru
**********************************


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

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

* Re: [ECOS] eCos port on SPEAR-07-NC03
  2006-05-04 20:42                 ` [ECOS] eCos port on SPEAR-07-NC03 Evgeny Belyanco
@ 2006-05-05  7:29                   ` Andrew Lunn
  0 siblings, 0 replies; 12+ messages in thread
From: Andrew Lunn @ 2006-05-05  7:29 UTC (permalink / raw)
  To: Evgeny Belyanco; +Cc: ecos-discuss

On Fri, May 05, 2006 at 12:42:30AM +0400, Evgeny Belyanco wrote:
> Hi!
> 
> >From firts page of new ST ARM 720 chip we can read:
> http://www.st.com/stonline/products/literature/ds/11637/spear-07-nc03.pdf
> 
> SPEAR-07-NC03 is supported by several Operation Systems such as eCOS.
> 
> Is this port avaliable in public?

I don't remember seeing it anywhere. You probably want to ask ST about
it.

        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

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

end of thread, other threads:[~2006-05-05  7:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-04 11:43 [ECOS] invalid conversion from void* to void** robert sebestyen
2006-05-04 12:40 ` Andrew Lunn
2006-05-04 13:02   ` robert sebestyen
2006-05-04 13:19     ` Andrew Lunn
2006-05-04 13:31       ` robert sebestyen
2006-05-04 13:33         ` Andrew Lunn
2006-05-04 13:43           ` robert sebestyen
2006-05-04 13:54             ` Andrew Lunn
2006-05-04 14:16               ` robert sebestyen
2006-05-04 14:31                 ` Andrew Lunn
2006-05-04 20:42                 ` [ECOS] eCos port on SPEAR-07-NC03 Evgeny Belyanco
2006-05-05  7:29                   ` Andrew Lunn

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