Hello,
I just glanced at the code, but noticed that your remote_pcb is not bound to a local endpoint. I believe both ends must be grounded with an endpoint. Your remote_pcb uses udp_connect() to specify the remote endpoint IP Address and port number, but isn’t bound to a local IP Address and port number.
// local_pcb = udp_new();
remote_pcb = udp_new();
// udp_bind(local_pcb, &ipaddr, (u16_t)8080);
udp_bind(remote_pcb, IP_ADDR_ANY,
(u16_t)8081);
udp_connect(remote_pcb, &remoteip, (u16_t)8080);
Regards,
Ed
_______________________________________________
lwip-users mailing list
lwip-...@nongnu.org
http://lists.nongnu.org/mailman/listinfo/lwip-users
Yes. A UDP Session is defined by the IP Addresses and Port Numbers of the endpoints. The struct udp_pcb contains members for both the the local and destination endpoints. If you look at the UDP Header structure and the IP Header structure, you’ll see that they include both the source and destination IP Addresses and Port Numbers. Other protocols, such as ARP, use both the local and remote endpoint information to resolve the MAC Addresses.
I’m not sure if that is the cause of your ‘undefined reference”, but I didn’t see anything else in your code that jumped out at me.
All of your “undefined reference” errors are to functions in the lwIP library, but I don’t see the lwIP4lib called out on your ‘make’ line. The –L identifies the correct path to the directory containing the library, but you need to add the “-llwip4” to your make line. If you’re working in the XiLinx Platform Studio, right-click on “Compiler Options”, go to the “Paths and Options” tab and specify ‘lwip4’ in the “Libraries to Link against” field.
Regards,
Ed
From:
lwip-users-bounces+edward.pisano=hp....@nongnu.org
[mailto:lwip-users-bounces+edward.pisano=hp....@nongnu.org] On Behalf Of Haori Yang
Sent: Wednesday, October 04, 2006
6:52 PM
To: Mailing
list for lwIP users
Subject: Re: [lwip-users] udp/lwip
on xilinx
Hi, Ed
Yes. A UDP Session is defined by the IP Addresses and Port Numbers of the endpoints. The struct udp_pcb contains members for both the the local and destination endpoints. If you look at the UDP Header structure and the IP Header structure, you'll see that they include both the source and destination IP Addresses and Port Numbers. Other protocols, such as ARP, use both the local and remote endpoint information to resolve the MAC Addresses.
I'm not sure if that is the cause of your 'undefined reference", but I didn't see anything else in your code that jumped out at me.
Regards,
Ed
From: lwip-users-bounces+edward.pisano= hp....@nongnu.org [mailto:lwip-users-bounces+edward.pisano=hp....@nongnu.org] On Behalf Of Haori Yang
Sent: Wednesday, October 04, 2006 6:45 PM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] udp/lwip on xilinx
Thanks for pointing out.
I am quite confused about this. You mean the two ends of a pcb have to be bound to a ip/port pair?
Thanks. I'll try that.
On 10/4/06, Pisano, Edward A <edward...@hp.com> wrote:
Hello,
I just glanced at the code, but noticed that your remote_pcb is not bound to a local endpoint. I believe both ends must be grounded with an endpoint. Your remote_pcb uses udp_connect() to specify the remote endpoint IP Address and port number, but isn't bound to a local IP Address and port number.
// local_pcb = udp_new();
remote_pcb = udp_new();
// udp_bind(local_pcb, &ipaddr, (u16_t)8080);
udp_bind(remote_pcb, IP_ADDR_ANY, (u16_t)8081);
udp_connect(remote_pcb, &remoteip, (u16_t)8080);
Regards,
Ed
I found that changing
contrib\ports\v2pro\include\arch\cc.h
from
#define LWIP_PLATFORM_DIAG(x) do {xil_printf x;} while(0)
to
#define LWIP_PLATFORM_DIAG(x) do {printf x;} while(0)
helps make debugging actually useful on the Xilinx platform. xil_printf
can't handle %p delimiters and requires explicit \r\n pairs instead of
inserting \r with \n, and this makes the LwIP debug output very difficult to
use otherwise.
Matthew
-----Original Message-----
From: lwip-users-bounces+matt=xenotr...@nongnu.org
[mailto:lwip-users-bounces+matt=xenotr...@nongnu.org]On Behalf Of Haori
Yang
Sent: Thursday, October 05, 2006 5:31 PM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] udp/lwip on xilinx
guys,
thanks,
haori
Sathya
Regards,
Ed
From: lwip-users-bounces+edward.pisano=hp....@nongnu.org
[mailto:lwip-users-bounces+edward.pisano=hp....@nongnu.org] On Behalf Of
Haori Yang
Sent: Wednesday, October 04, 2006 6:52 PM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] udp/lwip on xilinx
Hi, Ed
do you happen to know why am I getting a lot of undefined reference?
like this? I am using EDK 8.1i
At Local date and time: Wed Oct 04 21:49:35 2006
xbash -q -c "cd /cygdrive/e/Temp/MicroDemo/WebClient2/; /usr/bin/make -f
system.make WebClient_program; exit;" started...
mb-gcc -O2 Send2PC/send.c -o WebClient/executable.elf \
-mno-xl-soft-mul -Wl,-T -Wl,TestApp_Peripheral/src/TestApp_Periphera
l_LinkScr.ld -g -I./microblaze_0/include/ -L./microblaze_0/lib/ \
Regards,
Ed