Page 1 of 2

lib_xtcp compiling problem in "xtcp_event_driven" example

Posted: Thu Sep 13, 2018 11:52 am
by psebastiani
Dear All
I wanto to create an UDP data transfer from XCORE to the personal computer, and in my X-CORE-200_EXPLORER I wanto to run the "xtcp_event_driven" example to test it (https://github.com/xmos/lib_xtcp/tree/master/tests).
I renamed this gihub project as "ETH_Test_1". The example automatically use LWIP for the 200-Explorer.
Then I also installed 'lib_xtcp' and other library dipendences.
When I try to compile the project I found this errors:

[quote]Description Resource Path Location Type
Undefined reference to 'dhcp_arp_reply' ETH_Test_1 C/C++ Problem
Undefined reference to 'dns_recv' ETH_Test_1 C/C++ Problem
Undefined reference to 'dns_find_entry' ETH_Test_1 C/C++ Problem
Invalid project path: Include path not found (xtcp_event_driven\bin). ETH_Test_1 pathentry Path Entry Problem
Undefined reference to 'dns_enqueue' ETH_Test_1 C/C++ Problem
Invalid project path: Include path not found (xtcp_event_driven\src). ETH_Test_1 pathentry Path Entry Problem
Undefined reference to 'dhcp_supplied_address' ETH_Test_1 C/C++ Problem
Invalid project path: Include path not found (xtcp_event_driven). ETH_Test_1 pathentry Path Entry Problem
Undefined reference to 'dhcp_start' ETH_Test_1 C/C++ Problem
Undefined reference to 'dhcp_recv' ETH_Test_1 C/C++ Problem
Undefined reference to 'dhcp_fine_tmr' ETH_Test_1 C/C++ Problem
Undefined reference to 'dhcp_coarse_tmr' ETH_Test_1 C/C++ Problem
Undefined reference to 'netif_list' ETH_Test_1 C/C++ Problem
Undefined reference to 'netif_default' ETH_Test_1 C/C++ Problem
Undefined reference to 'netif_add' ETH_Test_1 C/C++ Problem
Undefined reference to 'memp_malloc' ETH_Test_1 C/C++ Problem
Undefined reference to 'memp_free' ETH_Test_1 C/C++ Problem
Undefined reference to 'lwip_init' ETH_Test_1 C/C++ Problem
Undefined reference to 'inet_chksum_pbuf' ETH_Test_1 C/C++ Problem
Undefined reference to 'inet_chksum' ETH_Test_1 C/C++ Problem
Undefined reference to 'pbuf_free' ETH_Test_1 C/C++ Problem
Undefined reference to 'pbuf_copy' ETH_Test_1 C/C++ Problem
Undefined reference to 'pbuf_alloc' ETH_Test_1 C/C++ Problem
Undefined reference to 'netif_set_up' ETH_Test_1 C/C++ Problem
Undefined reference to 'netif_set_link_up' ETH_Test_1 C/C++ Problem
Undefined reference to 'netif_set_link_down' ETH_Test_1 C/C++ Problem
Undefined reference to 'netif_set_default' ETH_Test_1 C/C++ Problem
Undefined reference to 'netif_set_addr' ETH_Test_1 C/C++ Problem
Undefined reference to 'tcp_connect' ETH_Test_1 C/C++ Problem
Undefined reference to 'tcp_close' ETH_Test_1 C/C++ Problem
Undefined reference to 'tcp_bind' ETH_Test_1 C/C++ Problem
Undefined reference to 'tcp_abort' ETH_Test_1 C/C++ Problem
Undefined reference to 'pbuf_ref' ETH_Test_1 C/C++ Problem
Undefined reference to 'pbuf_realloc' ETH_Test_1 C/C++ Problem
Undefined reference to 'pbuf_header_force' ETH_Test_1 C/C++ Problem
Undefined reference to 'pbuf_header' ETH_Test_1 C/C++ Problem
Undefined reference to 'udp_bind' ETH_Test_1 C/C++ Problem
Undefined reference to 'tcp_write' ETH_Test_1 C/C++ Problem
Undefined reference to 'tcp_tmr' ETH_Test_1 C/C++ Problem
Undefined reference to 'tcp_recved' ETH_Test_1 C/C++ Problem
Undefined reference to 'tcp_output' ETH_Test_1 C/C++ Problem
Undefined reference to 'tcp_new' ETH_Test_1 C/C++ Problem
Undefined reference to 'tcp_listen_with_backlog' ETH_Test_1 C/C++ Problem
Undefined reference to 'tcp_input' ETH_Test_1 C/C++ Problem
Undefined reference to 'xtcp_lookup_udp_pcb_state' ETH_Test_1 C/C++ Problem
Undefined reference to 'xtcp_lookup_tcp_pcb_state_from_port' ETH_Test_1 C/C++ Problem
Undefined reference to 'udp_sendto' ETH_Test_1 C/C++ Problem
Undefined reference to 'udp_send' ETH_Test_1 C/C++ Problem
Undefined reference to 'udp_remove' ETH_Test_1 C/C++ Problem
Undefined reference to 'udp_new' ETH_Test_1 C/C++ Problem
Undefined reference to 'udp_input' ETH_Test_1 C/C++ Problem
Undefined reference to 'udp_connect' ETH_Test_1 C/C++ Problem
Undefined reference to 'xtcp_uip' ETH_Test_1 C/C++ Problem
Undefined reference to 'xtcp_lookup_udp_pcb_state_from_port' ETH_Test_1 C/C++ Problem[/quote]


There aren't references that point error to any line code. What is the problem?
Any idea?
Regards
Piero

Re: lib_xtcp compiling problem in "xtcp_event_driven" example

Posted: Fri Sep 14, 2018 8:40 am
by psebastiani
I also try as Jakeh did in this post: http://www.xcore.com/viewtopic.php?t=6332
I adapt 'AN00121_udp_demo' for the 200_Explorer but when compile I obtain exactly the same previous errors.
Then I think the problem is inside the library. Are possible that lib_xtcp have any problem??
Can someone give me a direction to investigate?

I attack the project. It need 'lib_xtcp'

Re: lib_xtcp compiling problem in "xtcp_event_driven" example

Posted: Fri Sep 14, 2018 10:24 am
by psebastiani
Dear All
I solved the problem.
Make attention that the problem is in 'module_build_info' file of the 'lib_xtcp 6.0.0' library that xTIMEcomposer automatically download.

in 'module_build_info' at line 10, replace:

Code: Select all

LWIP_SOURCE_DIRS = src src/xtcp_lwip/api src/xtcp_lwip/core/ src/xtcp_lwip/core/ipv4 src/xtcp_lwip/netif src/xtcp_lwip/xcore/src
with:

Code: Select all

LWIP_SOURCE_DIRS = src src/xtcp_lwip/api src/xtcp_lwip/core src/xtcp_lwip/core/ipv4 src/xtcp_lwip/netif src/xtcp_lwip/xcore/src
there is one more character('/') in the path 'src/xtcp_lwip/core/'

I hope it helps someone.
Piero

Re: lib_xtcp compiling problem in "xtcp_event_driven" example

Posted: Fri Sep 14, 2018 1:35 pm
by andrewxcav
Thank you for posting the fix and that you have solved your problem.

Out of curiosity what platform are you developing on?

Re: lib_xtcp compiling problem in "xtcp_event_driven" example

Posted: Fri Sep 14, 2018 2:34 pm
by psebastiani
I'm evaluating the maximum throughput and minimum latency of the XMOS with gigabit ethernet to insert it in a multichannel receiver for Magnetic Resonance.
I need UDP to try decrease latency. I'm doing many testing.
Piero

Re: lib_xtcp compiling problem in "xtcp_event_driven" example

Posted: Fri Sep 14, 2018 3:26 pm
by akp
You may also wish to craft UDP packets by hand rather than using XTCP. That will probably provide much higher performance. You would of course have to implement something to decode them if you also receive UDP packets.

Re: lib_xtcp compiling problem in "xtcp_event_driven" example

Posted: Wed Jan 15, 2020 4:42 pm
by jsgn3
psebastiani wrote: Fri Sep 14, 2018 10:24 am Dear All
I solved the problem.
Make attention that the problem is in 'module_build_info' file of the 'lib_xtcp 6.0.0' library that xTIMEcomposer automatically download.
I have the same problem with lib_xtcp version 6.0.0:

---
Creating AN00121_udp_demo.xe
../src/main_tcp.xc: Error: Undefined reference to 'xtcp_lwip'
---

Unfortunately, your solution did not help in my case. Any other
suggestions?

Re: lib_xtcp compiling problem in "xtcp_event_driven" example

Posted: Thu Jan 16, 2020 9:26 am
by jsgn3
psebastiani wrote: Fri Sep 14, 2018 2:34 pm I'm evaluating the maximum throughput and minimum latency of the XMOS with gigabit ethernet to insert it in a multichannel receiver for Magnetic Resonance.
I need UDP to try decrease latency. I'm doing many testing.
Piero
For your information: I tested gigabit ethernet with lib_xtcp 4.01 (because I cannot
get 6.0.0. working) on the XCORE-200 eXplorerKIT. I get ~2-3.5 GB/s, depending on
what we use on the other end: Linux/Windows/Ada application/Matlab. UDP is really
slow because of the 10 Hz packet rate.

Two of "the other end" computers connected gives 90 MB/s, as expected.

We need a minimum of 30 MB/s for our application. It is a pity that there are no
up to date (w.r.t. library version) examples for the newest lib_xtcp for our board.
Therefore we will probably go for another solution, an FPGA or something.

Re: lib_xtcp compiling problem in "xtcp_event_driven" example

Posted: Thu Jan 16, 2020 3:44 pm
by akp
If you have a github or can post a minimal example project to show the problem maybe I can take a look.

Re: lib_xtcp compiling problem in "xtcp_event_driven" example

Posted: Mon Jan 20, 2020 11:17 am
by jsgn3
akp wrote: Thu Jan 16, 2020 3:44 pm If you have a github or can post a minimal example project to show the problem maybe I can take a look.
Thanks for your offer. However, we decided to go with an FPGA
for our application.