xc toolchain for other platforms?

Technical questions regarding the XTC tools and programming with XMOS.
User avatar
LyleHaze
Experienced Member
Posts: 71
Joined: Wed Apr 11, 2012 6:21 am

xc toolchain for other platforms?

Post by LyleHaze »

In a previous thread the topic of toolchain portability came up.
Instead of tacking this on to another topic I thought it might get better visibility here.

The problem I am facing is that I'm trying to create support for the xc toolchain on
a PowerPC based system. We have seghers tools for loading *.xe files and reading
registers for debug reasons, and that is a great start. But so far the compiler and
toolset only run on x86 32 bit platforms. For us this means keeping a separate
computer for XDE, and carrying the results of each build back to the target machine
on a USB stick. (not exactly a smooth way to develop code).

I have managed a collection of scripts that FTP modified source code over to an XP
netbook, and the results are returned the same way, but it is an ugly hack at best.

At least one other user has expressed the same problem because he runs an ARM
based system. As it is now, XDE and tools can ONLY be run on an x86 based system,
32 bits or better. I even tried it under DOSBOX, but the 32 bit requirement made that
a no-go as well.

If there are others who are having similar issues, this thread may provide a good place
to add a "me too" on the subject.

I'd also like to suggest one possible workaround:
It is apparent that XMOS is dedicated to end-user support. The XCORE community is
thriving, and is supported well by XMOS employees. This is good for everyone.

If porting the toolchain to other platforms is too expensive or troublesome, another
option may be to host a cloud based xc compiler. The ability to upload source and
soon after download the resulting object code and message stream would go a LONG
way towards true multi-platform support. And this would allow anyone to develop
code from any platform with a browser and an internet connection. And the head of
the system could be hosted on a single computer at any XMOS office.

Even editing from an android or iDevice would be simple work.

Crazy idea? Sure it is. But how hard would it really be for a tech savvy company like
XMOS to pull this off? It seems like the shortest path to allowing all platforms access
to the xc toolchain. It could even be done by zipping up the source directory as an e-mail
attachment. This would take advantage of nearly universal support for email protocols
across all net-connected platforms.

I'd love to hear feedback on this, either positive or negative.
Or even if you're just laughing at the idea. :)


User avatar
Obtuse
Member++
Posts: 29
Joined: Mon Jul 09, 2012 11:54 pm

Post by Obtuse »

Way to go Lyle.

Either way sounds like a winner. Why not both?

The email option would need to understand several compression
formats, but that should not be a problem, and small progs
under a certain size limit should not even need to be zipped.

Great Ideas!

Now don't let your hat get too tight :)
User avatar
LyleHaze
Experienced Member
Posts: 71
Joined: Wed Apr 11, 2012 6:21 am

Post by LyleHaze »

Hmm..
Hardly the swell of public support I had hoped for.

I guess a cloud based compiler solution will have to
come from the user sector then.

While I realize that many users are comfortable using
windows, I really did think there were a few more who
would show interest in being able to compile xc from
other platforms.

Just another project for my list, I guess.

:)
User avatar
pstnotpd
XCore Addict
Posts: 161
Joined: Sun Jun 12, 2011 11:47 am

Post by pstnotpd »

LyleHaze wrote:Hardly the swell of public support I had hoped for.
Actually, I'm quite comfortably working with Ubuntu 64bit. Not an entirely different platform....

My guess the problem would be, even if XMOS would open up the source for the toolchain, it must be cross-compiled to another CPU architecture.

Nice idea though, but I wonder if XMOS licencing allows this.

And given such a service, how would IP be guaranteed for the actual "submitted" code?
User avatar
LyleHaze
Experienced Member
Posts: 71
Joined: Wed Apr 11, 2012 6:21 am

Post by LyleHaze »

I can appreciate the difficulty to move an existing compiler suite to other architectures.

And I can certainly understand keeping their IP private if they choose to.

I am just a bit surprised that there is not an option for PPC, ARM, or other platforms
which might want to develop XMOS apps as well.

I mean, ten years ago, Windows was a hugely dominant platform, there was almost
no other choices. But today the market is diversifying, and especially in mobile segments,
x86 processors are almost non-existent. As the mobile share of the market increases,
The percent that will have access to your compiler will decrease.

And for myself, I am trying to set up a basic foundation for a entirely new community.
I will readily admit that we are a small group, probably some hundreds so far, but we each
have an XMOS L2 device built in on the motherboard, and we have a JTAG adapter built right
in as well. We have most of one core (Oops, tile) tied directly to the processor localbus
for rapid I/O with the rest of the system, and all the available I/O pins brought out on a
breadboard for whatever we each decide to add.
It's really a nice setup, and we are only beginning to explore what might be possible.
And as it is integrated into every system, our apps will be shareable among all X1000
owners.

WIth Seghers help, I adapted his tools to our JTAG port, and we have code loading and
debugging already. But the challenge comes when I have to tell all the other X1000 owners
that they have to go out and buy another computer JUST for compiling xc code. That is
a bit of a drag on the system. Some of us have a windows machine somewhere, many
do not. And even those who do don't relish the idea of compiling one one machine, then
carrying the object over to the second machine for testing.. At this point that's the only
option. And as you might guess we as a community are probably not the biggest fans of
WIndows.

When the idea of "Web" or "Cloud" based compilers occurred, it seemed like a very
reasonable option. The toolset can remain x86 only, but the ability to compile code
could be extended to ANY platform that is capable of sending and receiving EMail.

I don't have much hope that we will ever get a PPC native xc compiler, even though
we include an XMOS device on every board. So I am looking for the "next best thing".
A method to compile xc into xe from the same platform that will be using the object
code.

That was the idea, anyway.

"How would IP be guaranteed for the actual submitted code?"

Good question. Within our community, I have a fairly good reputation.
There are no guarantees, but using a cloud compiler is an option, a convenience
available to any who wish to use it. I suspect that most would be glad to have any
way to compile without leaving the host platform, but having a separate machine
and doing it yourself would always be an option.

Thank you for your response!
User avatar
Folknology
XCore Legend
Posts: 1274
Joined: Thu Dec 10, 2009 10:20 pm

Post by Folknology »

I would love to see the toolchain ported to other platforms, in particular ARM would be rather helpful. But I guess it's not really a priority for Xmos, with limited resources they have to prioritise what they are working on particularly on the toolchain side.

However I am still a little surprised that after all these years that they haven't fulfilled their intention of open sourcing the XC part of the toolchain. It may be that they have something they wish to keep hidden or just simply could not justify its prioritisation over other work. I would still love to see XC being more open and the community playing a bigger part in its development and proliferation, it is also true that many hands can make light work and the number of folk developing the toolchain could easily double or triple. I believe the cost of open sourcing will have a good return on investment for Xmos as well as opening up many new possibilities from multiplatform toolchain support, improved XC language features as well as a greater up take of XC as a programming language.

Just my $0.02

regards
Al
User avatar
pstnotpd
XCore Addict
Posts: 161
Joined: Sun Jun 12, 2011 11:47 am

Post by pstnotpd »

Indeed, if I'd be purchasing an X1000 (I'm considering it) I'd expect to be able to compile on the machine itself.

Meanwhile, have you tried other x86 emulators? (bochs)

If you can get a bare bones linux with the command line toolchain going at least you'd stay on the machine.

And I'd certainly be interested in contributing to an open sourced XC.
User avatar
Bianco
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm

Post by Bianco »

Back in the days, somewhere in 2008 there was a 'cloud based' (before anyone used the 'cloud' buzz word :p) development environment from XMOS where you could create projects, compile them and I believe simulate them or download them. I don't remember how it exactly worked and what it featured. I guess it takes too much effort to keep it up to date while no serious user would use it for serious projects (Because you don't want to depend on 'the cloud', because of privacy reasons etc.).

ARM and PPC do not have a large enough user base to justify support from XMOS imho.
The majority of ARM devices that interact with humans are used for information consumption and
light administrative work (reading websites, email etc). There are single board computers that can act as PC-replacements but they are by far a minority. I don't see that changing for a long while. PPC systems that interact with humans are a rarity and X1000 won't change that.

I think one should already be very happy that three x86 operating systems are supported while I sincerely believe that only supporting Windows would not have had a major impact on revenues.

This aside from the question whether things should be open sourced.
I don't have a stark opinion about this (I more or less don't care).
The major merit for me personally is that development can be continued in the (very unlikely) case that XMOS ceases to exist.
User avatar
LyleHaze
Experienced Member
Posts: 71
Joined: Wed Apr 11, 2012 6:21 am

Post by LyleHaze »

I appreciate each reply.
It's nice to have some discussion on the topic.

There is a bochs port available for AmigaOS, but I don't know yet how robust it is.
I wonder how _little_ of a host OS I would need to get just the xc compiler tools working?

Perhaps just DOS would be enough? I'm not experienced much with emulating other
platforms.

Sadly I have too much going on to try it today. Hopefully soon though.
:)

Thank you all for your input.
User avatar
segher
XCore Expert
Posts: 844
Joined: Sun Jul 11, 2010 1:31 am

Post by segher »

Folknology wrote:I would love to see the toolchain ported to other platforms, in particular ARM would be rather helpful. But I guess it's not really a priority for Xmos, with limited resources they have to prioritise what they are working on particularly on the toolchain side.

However I am still a little surprised that after all these years that they haven't fulfilled their intention of open sourcing the XC part of the toolchain. It may be that they have something they wish to keep hidden or just simply could not justify its prioritisation over other work.
As far as I understand it, the original XC compiler will not have source code
published, but the LLVM XC compiler will.

It is a *lot* of work to get a proprietary source code tree into a shape that
can be publicly released -- every single line of code has to be reviewed.
But that's only the beginning of the problem, for most companies: they
treat the open tree as a fork of their internal tree, so every later release
has the same problem. The only model I know of that _does_ work is to
have the external, open tree be the master tree that is always up-to-date,
and have secret internal stuff be forks from that. XMOS obviously uses
the first, problematic model.

Another problem for people on other platforms is that XMOS is focused
on the integrated stuff, IDEs etc., while people who work "on the frontier"
are much better served by small independent components.