xc toolchain for other platforms?

Technical questions regarding the XTC tools and programming with XMOS.
User avatar
pstnotpd
XCore Addict
Posts: 161
Joined: Sun Jun 12, 2011 11:47 am

Post by pstnotpd »

LyleHaze wrote:I wonder how _little_ of a host OS I would need to get just the xc compiler tools working?
Ah, there's something we can try independent of host OS.
If I have some time I'll check how "small" a VM I can make.

So that I understand your requirement correctly:
We need a self contained "host" to which source files can be published and which returns the results, preferably without the need to access this host manually. (i.e. some sort of polling mechanism to check for input source files etc.)


User avatar
LyleHaze
Experienced Member
Posts: 71
Joined: Wed Apr 11, 2012 6:21 am

Post by LyleHaze »

For my own goals, I'm just using "make" and the compiler parts it requires.

I have no need for the GUI, or any of the graphics stuff.

For my own use, (but way too messy to share with others) I have a bunch
of scripts that will do the following:

On the Amiga, I can run "xmake" in a shell, which sets off the following:
The Amiga copies all (*.c, *.h, makefile) files by FTP to an XP netbook.
Once all files have arrived, the XP then runs make on the source files,
with all stdout and stderr output re-directed to a text file.
Once make has completed, all object files, along with the text output from
make, are sent by FTP back to my waiting amiga.
Finally, the Amiga prints the results to the shell window and the xmake script
is complete.

It works fairly well, if a bit awkward. At the XP end, the script that runs it all
is started under the XMOS 11.11.1 command prompt, which I assume makes
sure that all the compiler tools are in the command path.

Now, if this were to be adapted to a server situation, I'd probably zip or lha
the entire source directory for transfer, and zip or lha it back up for the response.
(lha is the preferred archive tool on Amigas). It would be important to make sure
that the filedates were preserved across the process, so that make could work
correctly (not needing to recompile unaltered source files).

Since the XP end is running only as a command prompt, my question is whether
it could all be done under DOS 6.? instead of under WindowsXP. Since the OS
will be emulated (likely on bochs), it would pick up a big speed bonus if I only
have to emulate DOS instead of Windows.
User avatar
Folknology
XCore Legend
Posts: 1274
Joined: Thu Dec 10, 2009 10:20 pm

Post by Folknology »

Surely running linux on the PC/Server/Device that does the compiling would make more sense than Windows/Dos, particularly if you want command line control and lower memory requirements. I would guess this is the same for Bochs or similar if you are exploring the virtual route.

regards
Al
User avatar
LyleHaze
Experienced Member
Posts: 71
Joined: Wed Apr 11, 2012 6:21 am

Post by LyleHaze »

You are correct, of course
As I mentioned before, I'm a bit inexperienced outside of my usual OS.

I created a bootable flash drive with DOS on it, and copied a few of the desired tools over. xmake, xcc, etc.

They will not run in DOS mode. So that path will not work.
And, as you mentioned, I'll need more, especially if I need some automation.
So the next most likely target is centOS.

If I can make a usb "Live" stick, that will let me test without dragging another computer
out and doing a full install, then I'll give that a try.

Thanks for the feedback.. :)
User avatar
Folknology
XCore Legend
Posts: 1274
Joined: Thu Dec 10, 2009 10:20 pm

Post by Folknology »

You can make an ubuntu live stick I believe.

regards
Al
User avatar
LyleHaze
Experienced Member
Posts: 71
Joined: Wed Apr 11, 2012 6:21 am

Post by LyleHaze »

That brings up a good question..
We have a solid, working installation of Debian on the X1000.

I assume that the XMOS stuff won't run on it, but I might be wrong.

I wonder if running bochs under PPC Debian would be easier than
trying the AmigaOS port?

I am still split between emulating what we need locally on each
X1000 and creating a cloud based xmos compiler.. I suppose having
either would be good and the choice of either to be even better.
User avatar
segher
XCore Expert
Posts: 844
Joined: Sun Jul 11, 2010 1:31 am

Post by segher »

If you want to go crazy, you can put it on the interwebs with
something like http://bellard.org/jslinux/index.html.

It runs in your webbrowser, no server is involved.
User avatar
segher
XCore Expert
Posts: 844
Joined: Sun Jul 11, 2010 1:31 am

Post by segher »

LyleHaze wrote:I wonder if running bochs under PPC Debian would be easier than
trying the AmigaOS port?
qemu will run x86 Linux on PowerPC Linux; it's easier and much
better suppported than Bochs.
User avatar
LyleHaze
Experienced Member
Posts: 71
Joined: Wed Apr 11, 2012 6:21 am

Post by LyleHaze »

segher wrote:If you want to go crazy, you can put it on the interwebs with
something like http://bellard.org/jslinux/index.html.

It runs in your webbrowser, no server is involved.
Interesting!
I'm not quite sure what you are suggesting.. possibly that I could use the same
"wrapper" that they are using, except I could host the commandline xtools as a
website, and visitors could just interact with it directly?

now THAT would be interesting indeed.

We would need a way for the user to upload an entire source directory, beyond that
it would be pretty cool thing to do!

Lots of ideas now.. Nice!
User avatar
pstnotpd
XCore Addict
Posts: 161
Joined: Sun Jun 12, 2011 11:47 am

Post by pstnotpd »

Just my thoughts:

If I had to do this I would probably go the route:

1. Get an x86 emulator going on debian or AmigaOS
2. Get a working linux image on the emulator
3. Install only the command line tools and get them working
4. Create a sort of "listener" process which starts building projects upon receiving input files and a start signal.
5. Create wrapper scripts on debian or AmigaOS, preferably passing command line parameters as is

That way the whole virtualized environment is hidden from the end user. It's just a sort of "service". With some fancy parameterization you could probably also go the cloud route without even being aware of the cloud.

B.t.w. is there an up to date java VM on the X1000?