Problems with Spartan 3e

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems with Spartan 3e

Mirko Lange
Hi all.
I'm trying to run the Webserverexample (Xilinx Application Note XAPP663)
on a Spartan 3e Board without any success.
It seems that the program doesn't return from the
XEmac_PollRecv(EmacPtr, (Xuint8 *)RecvBuffer, &FrameLen) function but
I'm not sure.
The same problem exitst even if I try to initialize the stack using the
following code:

int main()
{
   struct netif *net_if;
   struct ip_addr ipaddr,netmask,gw;
   char macaddr[6]={0x00,0x00,0x00,0x00,0x22,0x38};
   sys_init();
   mem_init();
   memp_init();
   pbuf_init();
   etharp_init();
   ip_init();
     IP4_ADDR(&ipaddr,192,168,0,3);
   IP4_ADDR(&netmask,255,255,255,0);
   IP4_ADDR(&gw,0,0,0,0);
   xemacif_setmac(0, (u8_t *) macaddr);
   
net_if=netif_add(net_if,&ipaddr,&netmask,&gw,NULL,xemacif_init,ip_input);
   netif_set_default(net_if);
     while(1)
   {
       xemacif_input(net_if);
   }

   return 0;
}

Has somebody an idea what I've did wrong and how I can solve this problem?
Thanks for any answer.

Mirko Lange


_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Problems with Spartan 3e

Kieran Mansley

>
> Has somebody an idea what I've did wrong and how I can solve this problem?
> Thanks for any answer.

I've no idea about your particular hardware, or the Xilinx code, but
does a call to "netif_set_up()" help?

Kieran



_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Problems with Spartan 3e

Sathya Thammanur
In reply to this post by Mirko Lange
Hi Mirko,
Are you using Interrupts or are you polling the ethernet? Also, the XAPP663 is an echo server using RAW API wheras the the webserver is a socket based application. Can you check out XAPP433/434? This is a webserver design. See if that works for you.

Sathya


On 10/16/06, Mirko Lange <[hidden email]> wrote:
Hi all.
I'm trying to run the Webserverexample (Xilinx Application Note XAPP663)
on a Spartan 3e Board without any success.
It seems that the program doesn't return from the
XEmac_PollRecv(EmacPtr, (Xuint8 *)RecvBuffer, &FrameLen) function but
I'm not sure.
The same problem exitst even if I try to initialize the stack using the
following code:

int main()
{
   struct netif *net_if;
   struct ip_addr ipaddr,netmask,gw;
   char macaddr[6]={0x00,0x00,0x00,0x00,0x22,0x38};
   sys_init();
   mem_init();
   memp_init();
   pbuf_init();
   etharp_init();
   ip_init();
     IP4_ADDR(&ipaddr,192,168,0,3);
   IP4_ADDR(&netmask,255,255,255,0);
   IP4_ADDR(&gw,0,0,0,0);
   xemacif_setmac(0, (u8_t *) macaddr);

net_if=netif_add(net_if,&ipaddr,&netmask,&gw,NULL,xemacif_init,ip_input);
   netif_set_default(net_if);
     while(1)
   {
       xemacif_input(net_if);
   }

   return 0;
}

Has somebody an idea what I've did wrong and how I can solve this problem?
Thanks for any answer.

Mirko Lange


_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users


_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Problems with Spartan 3e

Mirko Lange
Sathya Thammanur schrieb:

> Hi Mirko,
> Are you using Interrupts or are you polling the ethernet? Also, the
> XAPP663 is an echo server using RAW API wheras the the webserver is a
> socket based application. Can you check out XAPP433/434? This is a
> webserver design. See if that works for you.
>
> Sathya
>
>
> On 10/16/06, *Mirko Lange* <[hidden email] <mailto:[hidden email]>>
> wrote:
>
>     Hi all.
>     I'm trying to run the Webserverexample (Xilinx Application Note
>     XAPP663)
>     on a Spartan 3e Board without any success.
>     It seems that the program doesn't return from the
>     XEmac_PollRecv(EmacPtr, (Xuint8 *)RecvBuffer, &FrameLen) function but
>     I'm not sure.
>     The same problem exitst even if I try to initialize the stack
>     using the
>     following code:
>
>     int main()
>     {
>        struct netif *net_if;
>        struct ip_addr ipaddr,netmask,gw;
>        char macaddr[6]={0x00,0x00,0x00,0x00,0x22,0x38};
>        sys_init();
>        mem_init();
>        memp_init();
>        pbuf_init();
>        etharp_init();
>        ip_init();
>          IP4_ADDR(&ipaddr,192,168,0,3);
>        IP4_ADDR(&netmask,255,255,255,0);
>        IP4_ADDR(&gw,0,0,0,0);
>        xemacif_setmac(0, (u8_t *) macaddr);
>
>     net_if=netif_add(net_if,&ipaddr,&netmask,&gw,NULL,xemacif_init,ip_input);
>        netif_set_default(net_if);
>          while(1)
>        {
>            xemacif_input(net_if);
>        }
>
>        return 0;
>     }
>
>     Has somebody an idea what I've did wrong and how I can solve this
>     problem?
>     Thanks for any answer.
>
>     Mirko Lange
>
>
>     _______________________________________________
>     lwip-users mailing list
>     [hidden email] <mailto:[hidden email]>
>     http://lists.nongnu.org/mailman/listinfo/lwip-users
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> lwip-users mailing list
> [hidden email]
> http://lists.nongnu.org/mailman/listinfo/lwip-users
Hi Sathya,
Thanks a lot for your reply.
I don't want to use interrupts at this time but also didn't know how to
poll the ethernet. Is there something I have to change in the
"lwipopts.h" to use Polling-Mode?
The echo- and webserver in XAPP663 aren't independent applications?
Maybe this is the problem.
I'll try out the other two examples. These applications use Socket API
and are Interrupt driven, right?
Is there an other example that uses Raw API and Polling Mode?

Mirko



_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Problems with Spartan 3e

Kieran Mansley
In reply to this post by Kieran Mansley
On Tue, 2006-10-17 at 08:28 +0200, Mirko Lange wrote:
> Hi Kieran.
> Thanks for your reply. I've tryed to call "netif_set_up()" but the
> compiler can't find this function.
> Is it possible that "netif_set_up()" call is implemented only in lwip
> versions higher that 0.7.2 ?

Maybe, it's been too long since 0.7.2 to remember!  I strongly recommend
upgrading to a later version.

Kieran



_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

RE: Problems with Spartan 3e

JamminJimP
Yes... The netif_set_up() was implemented in a later version, and is not
in 7.2.x.

-----Original Message-----
From: lwip-users-bounces+jim.pettinato=[hidden email]
[mailto:lwip-users-bounces+jim.pettinato=[hidden email]] On Behalf
Of Kieran Mansley
Sent: Tuesday, October 17, 2006 3:50 AM
To: [hidden email]
Subject: Re: [lwip-users] Problems with Spartan 3e


On Tue, 2006-10-17 at 08:28 +0200, Mirko Lange wrote:
> Hi Kieran.
> Thanks for your reply. I've tryed to call "netif_set_up()" but the
> compiler can't find this function.
> Is it possible that "netif_set_up()" call is implemented only in lwip
> versions higher that 0.7.2 ?

Maybe, it's been too long since 0.7.2 to remember!  I strongly recommend
upgrading to a later version.

Kieran



_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users


_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

RE: Problems with Spartan 3e

Matthew Yingling-2
In reply to this post by Mirko Lange
To poll you just need to call xemacif_input(default_netif);  This calls the
LwIP driver for the Xilinx EMAC.  To ensure you have the right driver,
you'll need to disconnect the Interrupt pin of the EMAC.

Matthew Yingling

-----Original Message-----
From: lwip-users-bounces+matt=[hidden email]
[mailto:lwip-users-bounces+matt=[hidden email]]On Behalf Of
Mirko Lange
Sent: Tuesday, October 17, 2006 2:47 AM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] Problems with Spartan 3e


Sathya Thammanur schrieb:

> Hi Mirko,
> Are you using Interrupts or are you polling the ethernet? Also, the
> XAPP663 is an echo server using RAW API wheras the the webserver is a
> socket based application. Can you check out XAPP433/434? This is a
> webserver design. See if that works for you.
>
> Sathya
>
>
> On 10/16/06, *Mirko Lange* <[hidden email] <mailto:[hidden email]>>
> wrote:
>
>     Hi all.
>     I'm trying to run the Webserverexample (Xilinx Application Note
>     XAPP663)
>     on a Spartan 3e Board without any success.
>     It seems that the program doesn't return from the
>     XEmac_PollRecv(EmacPtr, (Xuint8 *)RecvBuffer, &FrameLen) function but
>     I'm not sure.
>     The same problem exitst even if I try to initialize the stack
>     using the
>     following code:
>
>     int main()
>     {
>        struct netif *net_if;
>        struct ip_addr ipaddr,netmask,gw;
>        char macaddr[6]={0x00,0x00,0x00,0x00,0x22,0x38};
>        sys_init();
>        mem_init();
>        memp_init();
>        pbuf_init();
>        etharp_init();
>        ip_init();
>          IP4_ADDR(&ipaddr,192,168,0,3);
>        IP4_ADDR(&netmask,255,255,255,0);
>        IP4_ADDR(&gw,0,0,0,0);
>        xemacif_setmac(0, (u8_t *) macaddr);
>
>
net_if=netif_add(net_if,&ipaddr,&netmask,&gw,NULL,xemacif_init,ip_input);

>        netif_set_default(net_if);
>          while(1)
>        {
>            xemacif_input(net_if);
>        }
>
>        return 0;
>     }
>
>     Has somebody an idea what I've did wrong and how I can solve this
>     problem?
>     Thanks for any answer.
>
>     Mirko Lange
>
>
>     _______________________________________________
>     lwip-users mailing list
>     [hidden email] <mailto:[hidden email]>
>     http://lists.nongnu.org/mailman/listinfo/lwip-users
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> lwip-users mailing list
> [hidden email]
> http://lists.nongnu.org/mailman/listinfo/lwip-users
Hi Sathya,
Thanks a lot for your reply.
I don't want to use interrupts at this time but also didn't know how to
poll the ethernet. Is there something I have to change in the
"lwipopts.h" to use Polling-Mode?
The echo- and webserver in XAPP663 aren't independent applications?
Maybe this is the problem.
I'll try out the other two examples. These applications use Socket API
and are Interrupt driven, right?
Is there an other example that uses Raw API and Polling Mode?

Mirko



_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users



_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users