Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Tango on ARM

Moderators: larsivi kris

Posted: 10/16/07 03:23:11

Has anyone been able to get Tango working an ARM architecture? If so, how? I'm trying to get Tango to run on a Gumstix (Verdex XL6P, specifically.) It's basically an xscale processor (armv5te core) running Linux 2.6. Should be very cool if I can get it to work.

I've had to do a bunch to get it to compile, and now that it's all compiling, I'm missing a few symbols. Surprisingly few, actually.. From memory, the are log10l, _Unwind_GetIP, _Unwind_GetGR. I'm not certain all of the changes I made are valid, and they're certainly not fit for public inquiry. Hell, I don't even know if the GDC I got to compile is generating good code.

I will be doing more investigating tomorrow and throughout the week, but if anyone's done it, some hints would be appreciated. If not, expect to hear more about it (and poke me if you don't.)

~John

Author Message

Posted: 10/16/07 05:17:46

There was one guy who did some work on it ages ago ... forget his name, but worked for Nokia I think? I suspect you'll need to make changes to Thread.d?

log10l() is Layout.d, so you could change the datatype in there to be 'double' instead (a typedef) and change the log10l() to be log10() instead. I'll ask Sean to give some advice on the other symbols

Posted: 10/16/07 05:59:00

Sean notes that those missing functions look like exception-handling code :)

Posted: 10/30/07 02:50:12

Ok. I finally got some simple code to compile, link, and run. I've uploaded the diff of all the changes I had to make to Tango to get it all to compile. I think some of the changes fix some legitimate bugs, and others are hacks to compiling and linking running on the Gumstix. Here it is: http://www.glue.umd.edu/~teqdruid/arm-1.patches

Unfortunately, exception handling doesn't work. The following program produces the following output:

import tango.io.Stdout;
void main() {
	Stdout("Hello").newline;

	try {
		throw new Exception("My Exception");
		Stdout("No exception thrown").newline;
	} catch (Exception e) {
		Stdout("Caught exception").newline;
		Stdout(e).newline;
	}

	Stdout("Exiting now...").newline;
}
[root@rbs ~]# ./test
Hello
Aborted

Any hints to fix?

Since python or c++ are my alternatives for this project, not having exception handling is not a deal-breaker :) I'm not certain the repercussions of all the changes though... What else is probably broken?

Thanks

Posted: 10/30/07 07:25:23

I thought the Nokia guys had managed to get this working with exceptions?

Posted: 10/30/07 10:02:05

I think the Nokia lead is a red herring, as it's now 9 months since they ended their tests. Much more interesting would be the Debian efforts. I'll get their mantainer for GDC to look at this.

Posted: 10/30/07 21:09:11

John; Do you have time to join IRC? Look for me and/or arthur-.

Posted: 10/30/07 23:53:14

larsivi wrote:

John; Do you have time to join IRC? Look for me and/or arthur-.

Probably not for a little while. I'll probably be looking at this again on Thursday evening, at which point I'll drop on IRC. Freenode? Which channel?

Thanks

Posted: 10/31/07 13:44:49

The usual channel, #d.tango on Freenode.