xc toolchain for other platforms?

Technical questions regarding the XTC tools and programming with XMOS.
User avatar
Obtuse
Member++
Posts: 29
Joined: Mon Jul 09, 2012 11:54 pm

Post by Obtuse »



Heater
Respected Member
Posts: 296
Joined: Thu Dec 10, 2009 10:33 pm

Post by Heater »

LyleHaze,

Wow, you must be in one of the last PPC hangouts around.

I'm kind of curious why any Amiga successor is using PPC rather than say ARM or even Intel. After all the Amiga was a 68xxx machine and the PPC is something totally different.

Anyway I thought I'd throw a potential solution to your problem into the pot.

Recently I have been playing around with the Cloud9 IDE, which as the name implies is an IDE in the cloud. If you want to give it a run it is hosted atc9.io

Cloud9 keeps all you files on the server and allows you to edit/compile/run from a browser based editor. Normal set up is for building server side programs in JavaScript, PHP, Python Ruby. But it can be used for C/C++. The editor has syntax highlighting for tens of other languages and presumable other languages can be added easily.

So the plan would be something like:

1) Get cloud9 up and running on your own servers. It's an opensource project so this should be possible.
2) Make adaptions for xc syntax highlighting and support.
3) Get it to use the XMOS tools to compile on the server.
4) Arrange for a process on the server to deliver the compiled binaries to a local client process that programs your XMOS devices.

The later could be done easily using node.js which is what cloud9 is built with.
User avatar
LyleHaze
Experienced Member
Posts: 71
Joined: Wed Apr 11, 2012 6:21 am

Post by LyleHaze »

Heater wrote:LyleHaze,

Wow, you must be in one of the last PPC hangouts around.

I'm kind of curious why any Amiga successor is using PPC rather than say ARM or even Intel. After all the Amiga was a 68xxx machine and the PPC is something totally different.
Thank you for the suggestion! Sorry if my response is delayed, I have been completely
immersed in a project, and I don't get much time away from the compiler.

Regarding the choice of PPC as a processor, there are many different opinions on what direction
AmigaOS should take, and there have been many debates on the subject. My own answer is
that I'll run whatever hardware the AmigaOS requires, and that is PPC at this time.
Heater wrote: Anyway I thought I'd throw a potential solution to your problem into the pot.

Recently I have been playing around with the Cloud9 IDE, which as the name implies is an IDE in the cloud. If you want to give it a run it is hosted atc9.io

Cloud9 keeps all you files on the server and allows you to edit/compile/run from a browser based editor. Normal set up is for building server side programs in JavaScript, PHP, Python Ruby. But it can be used for C/C++. The editor has syntax highlighting for tens of other languages and presumable other languages can be added easily.

So the plan would be something like:

1) Get cloud9 up and running on your own servers. It's an opensource project so this should be possible.
2) Make adaptions for xc syntax highlighting and support.
3) Get it to use the XMOS tools to compile on the server.
4) Arrange for a process on the server to deliver the compiled binaries to a local client process that programs your XMOS devices.

The later could be done easily using node.js which is what cloud9 is built with.
This thread has exposed me to quite a few interesting options, and each one has some
attractive possibilities. I WILL be going forward with this at some point, but I'm not sure
yet which path I might follow.

The suggestion you made is great, but (if I understand correctly) it also hosts a file area for
each possible user on the local server. That suggests at least SOME administration load,
which I'd like to avoid.. And we really don't need an IDE. I have already adapted a code
editor to highlight XC properly.. (A very easy modification of the C language highlighter)

At the moment (and subject to change at any time) I am leaning towards an e-mail based
compiler, which accepts a complete project directory as an lharced file. It will unarc the
file into an empty directory, "make >>result.txt", then archive up the entire directory and
use "reply" to send it back from whence it came. (POSSIBLY returning only those files
that have changed)

Using a linux OS offers great support for mail automation, and the only part I have to
watch carefully for is that file date/timestamps are preserved across the operation. Or
at least the relative order should be preserved so that make can rebuild only as needed.

Although I'm no linux guru, this sounds like a reachable goal. And from the Amiga end,
it should be pretty straightforward too.

Being only accessible as an e-mail processor reduces the overhead for security as well.
If any incoming mail does not have the correct attachment in the correct format, it will
simply be ignored and deleted.

One question I _DO_ have (if any Linux geeks with mail processing experience are reading
along, or laughing along, or possibly crying by now) is if/how to get quick response to
incoming e-mail. Assuming that I am using say a Google GMail address, how rapidly can I
check for incoming mail before the GServer gets upset? Or is there some way for the GMail
server to signal the linux box when new mail is waiting? Obviously I'd like to keep the cycle
time as quick as possible for the end user. and if I can avoid making my own mail server
well, easier is better.

Again, I appreciate all the great ideas, And hopefully I'll be able to host an xc compiler for
Amiga users in the near future.

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

Post by pstnotpd »

LyleHaze wrote:At the moment (and subject to change at any time) I am leaning towards an e-mail based compiler, which accepts a complete project directory as an lharced file. It will unarc the file into an empty directory, "make >>result.txt", then archive up the entire directory and use "reply" to send it back from whence it came. (POSSIBLY returning only those files that have changed)
That sounds really complicated to me.

Does AmigaOS have SSH/SFTP/SCP ports? You mentioned FTP at the top of this post. An automated solution with uploading files and downloading the results seems a more "mature" solution as there are loads of examples how to do something like this.

Anyway, I've been playing around with bochs on x86_68 linux and though it works it's really slow (for todays standards). I can't get it over 100Mhz processor speed. So I don't think thats the way to go.
User avatar
LyleHaze
Experienced Member
Posts: 71
Joined: Wed Apr 11, 2012 6:21 am

Post by LyleHaze »

pstnotpd,

I'd like to discuss this further..PLEASE understand I do not mean to sound stubborn. I'm just not experienced in this stuff so I need a bit more information.

Regarding sockets available, we have what seems to be a reasonable TCP stack, but I have not
had any reason to get into it any deeper than a web browser of e-mail client yet.

One advantage we DO have is that most of our applications include an ARexx port so it's generally pretty easy to automate tasks, and to use multiple apps to reach a goal if needed. I once wrote a complete "Digital DJ" app commercially that took good advantage of these features.. But back to topic:

We do have FTP, but I only use it from within my local network. I'm not too keen on opening FTP access to the outside world if I can avoid it.

Regarding Bochs on a linux box, We did a lot of talk about x86 emulation, but my current "target" would be to use a retired windows machine as follows: Wipe windows, install x86 Linux of some sort. Install the linux version of XDE on that. Configure procmail to receive any mail addressed to it and if an attachment ending in .lha is found, unarc it to an empty directory, make >>results.txt, and arc it all back up into a reply message

Complicated? Well yeah. I can see that. But I don't have to emulate anything, as I am running on an x86. and I don't have to open FTP ports to the outside world, as it's all handled as e-mail in both directions, I don't need to "administer" a user list, as it will just process emails and reply to sender.

And as best I can tell, Linux has some pretty extensive scripting abilities.

Once it's working I can write up a script in about 5 minutes that will support it on the Amiga side by just typing xmake into a shell, (or clicking on a build icon, if you prefer rodents)

And I can distribute that to the Amiga community so that everyone can "build" projects for their embedded XMOS chips without requiring any emulators or second computers.. which was the original goal. It also lets those users "in" without requiring them to install or configure FTP or other software on their end. It's just an app that sends and receives E-Mails. possibly independently, possibly by using an existing email application. My one little linux box would be an available xc compiler for the Amiga community.

Anyway, as I said before.. I do NOT mean to argue.. I'm just trying to explain what I see as problems with an FTP solution, compared to an E-Mail solution.

And regarding your previous comments, I don't know if XMOS will allow me to do this, but talking about it here is not a bad first step in any case.

Thanks for the discussion! Keep it coming if you'd like, especially if you see bad things in my future!
User avatar
pstnotpd
XCore Addict
Posts: 161
Joined: Sun Jun 12, 2011 11:47 am

Post by pstnotpd »

LyleHaze wrote: I'd like to discuss this further..PLEASE understand I do not mean to sound stubborn. I'm just not experienced in this stuff so I need a bit more information.
Oops, if I give the impression I want to argue I apologize. That's not the case at all. I rather like throwing ideas around when I see a project like this and I tend to be rather terse when I do. :o) (English not being my native language doesn't help either....)
LyleHaze wrote: We do have FTP, but I only use it from within my local network. I'm not too keen on opening FTP access to the outside world if I can avoid it.
If you'd be able to use SSH/SFTP/SCP you'd have pretty sophisticated security availabe. If you intend to offer this as a "cloud" service you can even make it subscription based.
LyleHaze wrote: Regarding Bochs on a linux box.......
Understandable. I was just curious if emulation would be fast enough and, at least with bochs, I now doubt it is or will be in the near future.
LyleHaze wrote: And as best I can tell, Linux has some pretty extensive scripting abilities.
Yip!
LyleHaze wrote: ..., I don't know if XMOS will allow me to do this, ...
Well, if XMOS is monitoring.... how about open-sourcing the XC command line bits? Then we don't have to do this ;o)
LyleHaze wrote: Thanks for the discussion! Keep it coming if you'd like, especially if you see bad things in my future!
I'd like to help if possible, but for me it has been ages since I've done anything with AmigaOS and that was on the old 68k machines. I don't own an X1000 (yet? It's kinda hard to get hold of at the mo).... so we're in kind of the same predicament.
User avatar
LyleHaze
Experienced Member
Posts: 71
Joined: Wed Apr 11, 2012 6:21 am

Post by LyleHaze »

@pstnotpd,
No you were not rude at all..

I'm just trying to make sure that _I_ and not seen as rude..
I am obviously talking about something I don't really understand very well, and it is easy to appear rude instead of just stupid. ;)

On the bright side, taking on projects that I don't know much about is a great way to learn more!
Porting Seghers tools to the new Amiga is one example, and I'm beginning to understand a little bit about XC too, though I'm still just a beginner.

One other reason why I am looking to the email client method is because I SHOULD be able to do it with nothing more than scripting on both the Amiga and the Linux compiler box. That saves me from leaning a new system or language.

Looking forward to doing it, hopefully in a "few more weeks".. always so much to do, so little time.
Actually the biggest delay now is finding a spare drive for the old Windows box so I won't have to wipe the windows install. It's always nice to leave a path to go back, just in case.

I'll have to look and see if it's IDE or SATA..

Anyway, thanks again for the feedback.. it's all one big learning process for me.
User avatar
pstnotpd
XCore Addict
Posts: 161
Joined: Sun Jun 12, 2011 11:47 am

Post by pstnotpd »

@LyleHaze

That's a misunderstanding then :o)

Would an IcarOS installation come close, scripting wise at least, to the setup your are using?

If so I can try to simulate the idea using virtual machines.

You mentioned you also have a native PPC debian linux running, but I assume you'd like it running under AmigaOS 4?
User avatar
Obtuse
Member++
Posts: 29
Joined: Mon Jul 09, 2012 11:54 pm

Post by Obtuse »

However it is done, it would need to be accomplished directly
from Amiga OS. Web, email, windowed emulation, as long as you
can see both sides of the two programs at once.

XDE has a simulator, but of course there is no file available
to simulate how the XMOS chip is integrated onto the motherboard,
and so it's not really of much use to us. Just having the build
environment available is all we really need at this point.

The email option sounds about best at this point in time.

click-click-click take a break. click-click back to work. :)
User avatar
LyleHaze
Experienced Member
Posts: 71
Joined: Wed Apr 11, 2012 6:21 am

Post by LyleHaze »

pstnotpd wrote:@LyleHaze

Would an IcarOS installation come close, scripting wise at least, to the setup your are using?

If so I can try to simulate the idea using virtual machines.
I have never played with Icaros or any of the AROS systems. They are sure to be similar, but I don't know how close they might be. I _THINK_ Icaros emulates older Amiga systems, while OS4 continues to evolve, but they both have common roots.
pstnotpd wrote:@LyleHaze
You mentioned you also have a native PPC debian linux running, but I assume you'd like it running under AmigaOS 4?
Yes. Part of the discussion was If/How to run xc compiler "natively". While we DO have PPC debian running, the edit/compile/build cycle would involve at least two complete reboots to get into Debian for compiling, then booting back into AmigaOS to load the object into the XMOS chip and run it.
It's better than no solution at all, but not really very practical.

Last night I played a bit with the Amiga end of a build script, assuming an E-Mail server as I described before. one command will archive all the .c, .h, .xc, .xn, and makefile into a single file, preserving file dates. That part was easy.
Then I went looking for the easiest way to send and receive mail from a script. We have recently had Python added to the OS, and it LOOKED like a good choice! But my experience with Python is nil.

I googled some info, tried a few things I found, but my example code has trouble running it. I don't know enough about it all to even guess where the problem is! If all else fails, I'm sure I can use a complete mail application and control it from ARexx.. but I'll probably give Python another try before I do that.

Another option is Rebol, which is very probably available on both Amiga and Linux. Though it might be an older version, probably well enough for this purpose.

Once that is together, I'll have no more excuses, it'll be time to put Linux on that old windows box and learn procmail.. This is just one big educational experience after another. :)