Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » DSDP - Real-Time Software Components (RTSC) » XDC on Mac OS X
XDC on Mac OS X [message #3582] Fri, 29 May 2009 01:21 Go to next message
Amichi Amar is currently offline Amichi AmarFriend
Messages: 5
Registered: July 2009
Junior Member
Hello,

I'd like to use the XDC tools on my Mac and would like to help getting the
toolset working on OS X.

Are the sources and instructions on how to build the suite available? I
understand there is a bootstrap process somewhere as some xdc tools are
built with xdc.

If someone could help out a little we could get a good amount of folks
using Macs working with RTSC.

Cheers,

Amichi
Re: XDC on Mac OS X [message #3617 is a reply to message #3582] Fri, 29 May 2009 14:54 Go to previous messageGo to next message
Dave Russo is currently offline Dave RussoFriend
Messages: 172
Registered: July 2009
Senior Member
Amichi Amar wrote:
> Hello,
>
> I'd like to use the XDC tools on my Mac and would like to help getting
> the toolset working on OS X.
> Are the sources and instructions on how to build the suite available? I
> understand there is a bootstrap process somewhere as some xdc tools are
> built with xdc.
I working on getting the sources through the eclipse IP process. We
have one of two source trees approved at this point and, while it has
taken a while to get this far, I expect the second tree to go more quickly.

There is a bootstrap to build the RTSC tools because we use the RTSC
tools to build itself.
> If someone could help out a little we could get a good amount of folks
> using Macs working with RTSC.
>
It is possible to help out now. The RTSC tools include a number of
native executables (e.g., xs, xdc, and xdcpkg, see
http://rtsc.eclipse.org/docs-tip/Command_Line_Tools). One of the first
steps in the bootstrap is build these commands using the RTSC build
engine. In order for this to happen, we need a target and a platform
for OS X.

Part 2 of the RTSC tutorial provides an overview and examples of what is
required, but native targets are often _much_ easier that targets for
embedded platforms. My guess is that there is a gcc compiler for OS X,
so it should be easy to create a target that inherits from
gnu.targets.ITarget. Since it's ok to only support Intel-based Macs (at
least initially), we can probably just use the host.platforms.PC platform.

Once we have an OS X target, we can either put it in the gnu.targets
package or create a new package and maintain it in
http://dev.eclipse.org/svnroot/dsdp/org.eclipse.rtsc/contrib /targets/trunk.
The complete sources to the gnu.targets package are included in any
XDCtools distribution (and will eventually be maintained in our eclipse
SVN repository).

Beyond targets and platforms, there are a few other packages that will
have to be extended to support OS X; e.g., all the graphical tools rely
on SWT (which relies on some native code) but I assume the native code
required for OS X already exists.

Bottom line: a good first step is to create a target and platform that
builds one of the tutorial "hello world" examples
( http://dev.eclipse.org/svnroot/dsdp/org.eclipse.rtsc/trainin g/ec2009/trunk/src/part2/examples/hello)
to run natively on OS X.
> Cheers,
>
> Amichi
>
Re: XDC on Mac OS X [message #3649 is a reply to message #3617] Fri, 29 May 2009 21:56 Go to previous messageGo to next message
Amichi Amar is currently offline Amichi AmarFriend
Messages: 5
Registered: July 2009
Junior Member
Alright, i'll take a crack at this and post back what results.

Thanks.

Amichi
Re: XDC on Mac OS X [message #3682 is a reply to message #3649] Sat, 30 May 2009 00:24 Go to previous messageGo to next message
Dave Russo is currently offline Dave RussoFriend
Messages: 172
Registered: July 2009
Senior Member
Amichi Amar wrote:
> Alright, i'll take a crack at this and post back what results.
>
On interesting "complication" is that we typically build _everything_
from a Linux server - including the Windows and Solaris binaries.
Rather than creating a cross compiler for Windows that runs on Linux, we
have targets that rsh the compile command to a machine that can run a
native compiler.

The gnu.targets.ITarget meta-module does this "transparently" if you set
the remoteHost configuration parameter; see
http://rtsc.eclipse.org/cdoc-tip/index.html#gnu/targets/ITar get.html#remote.Host
and the gnu/targets/ITarget.xs implementation.

Don't let this block you if it becomes to convoluted. It might be
sufficient to assume the build will occur from OS X. If we can use this
technique, however, we might be able to include OS X support in our
"normal" builds.


> Thanks.
>
> Amichi
>
Re: XDC on Mac OS X [message #3714 is a reply to message #3617] Sat, 06 June 2009 04:15 Go to previous messageGo to next message
Amichi Amar is currently offline Amichi AmarFriend
Messages: 5
Registered: July 2009
Junior Member
> It is possible to help out now. The RTSC tools include a number of
> native executables (e.g., xs, xdc, and xdcpkg, see

There currently isn't a cross compiler from windows to os x so I need to
build xs, xdc etc from scratch to get them onto os x. Are these sources
available?

Otherwise, I could put together a target (simple copy of the Linux86
target) - but I have no way to test anything out (i.e. can't build native
code etc).

So, what to do?

Amichi
Re: XDC on Mac OS X [message #3738 is a reply to message #3714] Mon, 08 June 2009 17:11 Go to previous message
Dave Russo is currently offline Dave RussoFriend
Messages: 172
Registered: July 2009
Senior Member
Amichi Amar wrote:
>> It is possible to help out now. The RTSC tools include a number of
>> native executables (e.g., xs, xdc, and xdcpkg, see
>
> There currently isn't a cross compiler from windows to os x so I need to
> build xs, xdc etc from scratch to get them onto os x. Are these sources
> available?
We're working on getting the xdc, xs, sources available; we still need
to get them through the eclipse IP process.

>
> Otherwise, I could put together a target (simple copy of the Linux86
> target) - but I have no way to test anything out (i.e. can't build
> native code etc).
>
> So, what to do?
Good question. It's tricky but possible ...

We use the xdc tools on Linux to build Solaris executables _without_ a
Linux-to-Solaris cross compiler. I think we can do the same with OS X.

The way it works is to create a target (like gnu.targets.Sparc) which
can be setup to remotely execute the compiler/linker/archiver on a
different host. Recall that targets simply provide _any_ command
sufficient to convert a .c to a .obj. Without a cross-compiler, the
target supplies a command that simply rsh's to an appropriate host and
does the compile.

When building on Linux, for example, the Linux host will rsh the
compiler command to a specified Solaris host (see the remoteHost config
param of the gnu.targets.ITarget interface
http://rtsc.eclipse.org/cdoc-tip/index.html#gnu/targets/ITar get.html#remote.Host).
The current gnu.targets.ITarget requires a network file system seen by
both hosts.

We even use this technique to build Windows executables from a Linux
host _without_ a cross-compiler(!). This has additional complications
because the file systems are so different between *nix and Windows, but
among *nix hosts the process is fairly easy.

> Amichi
>
Previous Topic:List of RTSC defined make macros
Next Topic:Re-throwing an error
Goto Forum:
  


Current Time: Thu Apr 25 10:28:19 GMT 2024

Powered by FUDForum. Page generated in 0.04386 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top