Page 1 of 1

lib_xtcp build failure

Posted: Fri Oct 05, 2018 4:35 pm
by RedDave
I am attempting to get a webserver running on an explorerKit. Following the example code (and extension to that from github) fails to build.
I have minimised the project to reproduce the failure.

Starting with a new xTimeComposer project "xCORE-200 Explorer Kit" as the target. (otherwise default options).
Add "lib_xtcp" to USED_MODULES.

Create a valid "Hello World" main().

Build.

This produces many Undefined references, starting with "etharp.c: Error: Undefined reference to 'dhcp_arp_reply'". [build log and Makefile attached]
What could be the cause of this?
Am I missing some step? Or otherwise doing something wrong?

Re: lib_xtcp build failure

Posted: Tue Oct 23, 2018 5:48 pm
by mon2
Hi RedDave. Perhaps you can post a complete project for a review?

Re: lib_xtcp build failure

Posted: Wed Oct 24, 2018 9:48 am
by RedDave
Since it took 18 days before my post appeared, I have obviously moved on from where I was.

The problem it seems is in the lib_xtcp 6.0.0 module_build_info.

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 a trailing / on the src/xtcp_lwip/core entry. Removing this / before the first build makes it all work.

Am I doing something wrong?
Is version 6.0.0 that ships with the current XMOS not fit for purpose?
Should I being doing something else to import it?

I notice that the version on github has this fixed.
What is the general advice in where I should be getting working version of libraries from for current development?

Re: lib_xtcp build failure

Posted: Mon Nov 05, 2018 10:01 pm
by akp
Hi RedDave.

Recommend you get the v7 from github and take a look on the forum for other fixes as necessary http://www.xcore.com/viewtopic.php?f=47&t=6494

I have persistent TCP connection (essentially telnet) so it might be different with webserver.

Re: lib_xtcp build failure

Posted: Tue Nov 06, 2018 9:49 am
by RedDave
I now have a fix, as posted above.

My current query is what the done thing is with libraries. I have the latest version of xTimeComposer installed. It would be my expectation that the libraries that ship with it would be fit for purpose.

The problem described is not some subtlety of operation. The library simply does not build in LWIP mode because of an error in the build_info.

Re: lib_xtcp build failure

Posted: Tue Nov 06, 2018 11:41 am
by akp
Sounds like you expect a lot.

Just kidding! Of course the free libs should build if they get pulled from xTIMEcomposer. I had to find and fix that build error myself with the extra slash. However, to me, the key is that the libs are free so I don't mind having to do some work. Keep up to date with the github and enjoy the adventure of development for the XMOS architecture. It certainly takes me out of my comfort zone when I get to work on it.

Re: lib_xtcp build failure

Posted: Tue Nov 06, 2018 11:52 am
by RedDave
The libraries aren't free. I am developing product that will lead to sales which will lead to income for XMOS. The libraries are effectively dongled by the XMOS chip set.

I have found the documentation for core XMOS absolutely excellent. The concepts of the XC language are not trivial, but they are wonderfully and succinctly described in easy to find documents. That's why it then comes as a surprise that the release of
shipped libraries are below that (admittedly high) bar.

The journey so far has been good*, I enjoy the adventure - but do not expect building basic libraries to be part of the adventure. This ain't my eleventy-first birthday!

* (except taking several weeks to get accepted onto this forum!)

Re: lib_xtcp build failure

Posted: Tue Nov 06, 2018 12:06 pm
by akp
Free with asterisk. For me they are essentially free because our bespoke products are very low volume!