lib_xtcp compiling problem in "xtcp_event_driven" example

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
psebastiani
Member++
Posts: 16
Joined: Wed Oct 02, 2013 4:20 pm

lib_xtcp compiling problem in "xtcp_event_driven" example

Postby psebastiani » Thu Sep 13, 2018 11:52 am

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:

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


There aren't references that point error to any line code. What is the problem?
Any idea?
Regards
Piero
psebastiani
Member++
Posts: 16
Joined: Wed Oct 02, 2013 4:20 pm

Postby psebastiani » Fri Sep 14, 2018 8:40 am

I also try as Jakeh did in this post: 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'
Attachments
AN00121_udp_demo_X200.zip
(732.45 KiB) Downloaded 22 times
AN00121_udp_demo_X200.zip
(732.45 KiB) Downloaded 22 times
psebastiani
Member++
Posts: 16
Joined: Wed Oct 02, 2013 4:20 pm

Postby psebastiani » 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.

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
User avatar
andrewxcav
Active Member
Posts: 60
Joined: Wed Feb 17, 2016 5:10 pm
Contact:

Postby andrewxcav » Fri Sep 14, 2018 1:35 pm

Thank you for posting the fix and that you have solved your problem.

Out of curiosity what platform are you developing on?
psebastiani
Member++
Posts: 16
Joined: Wed Oct 02, 2013 4:20 pm

Postby psebastiani » 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
User avatar
akp
XCore Addict
Posts: 209
Joined: Thu Nov 26, 2015 11:47 pm

Postby akp » Fri Sep 14, 2018 3:26 pm

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.

Who is online

Users browsing this forum: No registered users and 43 guests