cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
shyam457
Adventurer
Adventurer
7,295 Views
Registered: ‎01-26-2015

Buffer size TCP/IP Lwip

Hi,
I am working on a project using the zynq zc702 board. I want to accept a file from the PC over ethernet and then store it onto DDR memory of the processor. Then I want to process the data from the DDR and store the result onto BRAM. 
So, for the first part of it I want to save the data onto DDR. I have started working with the echo server example of lwip provided.
And I wanted to know the size of the file received over ethernet. Is it possible?? Is the variable len provided in the echoserver example giving that size?? Also how do I store this data onto the DDR?? Can I do it directly from the pbuf??

0 Kudos
6 Replies
berkeraliisik
Adventurer
Adventurer
7,276 Views
Registered: ‎09-07-2015

Hi,

You can start Tftp Server Example. Echo Server demonstrates bidirectional data transfer. If the file format of your data doesn't matter(e.g. array data of image pixels) also you can use Echo Server example. There is a structure in LwIP stack. You also access size of payload using one of the structure field.  

0 Kudos
balkris
Xilinx Employee
Xilinx Employee
7,265 Views
Registered: ‎08-01-2008

http://www.xilinx.com/support/documentation/application_notes/xapp1026.pdf
http://www.xilinx.com/support/answers/51779.html
Thanks and Regards
Balkrishan
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.
0 Kudos
shyam457
Adventurer
Adventurer
7,218 Views
Registered: ‎01-26-2015

Hi, thanks for the replies.
I started working with the echo.c example. I found files platform_zynq.c, platform_ppc.c, platform_mb.c and platform_zynqmp.c. What are these files for?? Is it necessary for Ethernet TCP/IP??
Also instead of echo back I modified the code calling a function ddr_store in its place (to store the data to ddr). I stored the data p->payload into a char * ddrin and the length p->len to a int variable ddrlen and passed them onto the ddr_store().
So for me to write to the ddr, I have to use 32 bit data transfers. So, is the p->len specifying the number of bytes of data that have been received????

0 Kudos
shyam457
Adventurer
Adventurer
7,205 Views
Registered: ‎01-26-2015

Hi, just another doubt. I tried to setup the telnet connection between PC and ZC702 using Teraterm. I gave the Host address to be the host address of the PC in Teraterm. But it shows connection refused. Why is that?? Could someone tell me the steps of setting it up??

0 Kudos
balkris
Xilinx Employee
Xilinx Employee
7,202 Views
Registered: ‎08-01-2008

check this document
http://www.xilinx.com/products/boards/ml501/ml501_10.1_1/docs/ml501_overview_setup.pdf

http://www.xilinx.com/support/documentation/boards_and_kits/ug668_ml605_gsg_axi.pdf

http://opencores.org/uploads/1362059752_xapp1026.pdf
Thanks and Regards
Balkrishan
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.
shyam457
Adventurer
Adventurer
7,185 Views
Registered: ‎01-26-2015

Hi, I looked into the documents. I gave the IP address of both PC and zynq board to be in the same subnet and used teraterm to create the connection. But when I ping the zynq board, it shows Destination unreachable. Could you tell me how to setup this ethernet link?? I wish to send a binary file from PC to the zynq board over ethernet. 

0 Kudos