lib_xtcp build failure Topic is solved

New to XMOS and XCore? Get started here.
RedDave
Active Member
Posts: 33
Joined: Fri Oct 05, 2018 4:26 pm

lib_xtcp build failure

Postby RedDave » Fri Oct 05, 2018 4:35 pm

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?
Attachments
Web1.build.log
(193.17 KiB) Downloaded 155 times
Web1.build.log
(193.17 KiB) Downloaded 155 times
View Solution
User avatar
mon2
XCore Legend
Posts: 1298
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Postby mon2 » Tue Oct 23, 2018 5:48 pm

Hi RedDave. Perhaps you can post a complete project for a review?
RedDave
Active Member
Posts: 33
Joined: Fri Oct 05, 2018 4:26 pm

Postby RedDave » Wed Oct 24, 2018 9:48 am

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

Postby akp » Mon Nov 05, 2018 10:01 pm

Hi RedDave.

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

I have persistent TCP connection (essentially telnet) so it might be different with webserver.
RedDave
Active Member
Posts: 33
Joined: Fri Oct 05, 2018 4:26 pm

Postby RedDave » Tue Nov 06, 2018 9:49 am

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

Postby akp » Tue Nov 06, 2018 11:41 am

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.
RedDave
Active Member
Posts: 33
Joined: Fri Oct 05, 2018 4:26 pm

Postby RedDave » Tue Nov 06, 2018 11:52 am

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

Postby akp » Tue Nov 06, 2018 12:06 pm

Free with asterisk. For me they are essentially free because our bespoke products are very low volume!

Who is online

Users browsing this forum: No registered users and 17 guests