D on GBA/NDS Progress, Thanks to OOPMan

Originally posted: April 2nd, 2007

This time around I didn't have much success combining GDC with DevKitARM on my own. But, OOPMan has gotten it working on Linux (minus standard libraries like Phobos or Tango).

Fortunately, I was able to use OOPMan's instructions to successfully build native Windows binaries of GDC+DevKitARM (again, minus standard D libraries) using MSYS/MinGW. So hats off to him :) (FYI, I haven't had a chance yet to actually test the binaries I built)

Regarding specific versions, I was able to build off of GCC 4.1.1/GDC 0.22/DKA r20, and off of GCC 4.1.2/GDC 0.23/DKA r20 (the latest versions at the time I'm writing this).

I'll upload the Windows binaries for GCC 4.1.2/GDC 0.23/DKA r20 when I get a chance later today, so anyone who wants to can play around with it.

After that, I plan to combine OOPMan's instructions and buildscript into the actual DevKitARM buildscripts, and write up some *very* detailed how-to-build documentation for any Windows users who have no experience building any form of GCC (Something I could have used a year or so ago. The information is out there, but it usually requires some strong familiarity with Unix-like systems and the open source scene).

[UPDATE 2:00a 4/3/2007]: I've uploaded the windows binaries. I didn't build the crts or tools, just the compiler, so you should extract the archive over top of an existing installation of DevKitARM r20. I haven't tried using this for any DS apps, but it seems to work with a simple C GBA app (the small sample included in GBAForVS6, although I had to change the generated makefile to use "arm-eabi-*" instead of "arm-elf-*").

It also works with a simple D GBA app, but with a caveat: The lack of phobos or tango prevents many of the language's features from being usable (for instance, trying to use structs and classes will generate linker errors).

I've uploaded the D GBA app I used, including project files for Visual Studio 6 and the pre-built ROM image. If you want to compile it yourself, you will have to edit the makefile to point to your DevKitARM-with-D directory. The makefile also assumes that you have GBAForVS6 installed (you'll also have to specify the directory for that in the makefile, too). If you don't want to use GBAForVS6, or don't have Visual Studio 6, you'll probably need to make additional changes to the makefile.

D on GBA Screenshot

D on GBA Screenshot

[Update 11:00a 4/3/2007]: If you try to compile the sample D app, there's one other thing I forgot to mention. You'll need to first download a regular (ie, non-GBA/DS) D compiler like DMD. Then go into the sample app's makefile and change DINCDIR (below the "Nothing below here should need to be changed" line, ironically) to point to the regular D compiler's phobos directory. For DMD this should be "{your dmd dir here}\src\phobos".

Note that this doesn't mean you'll be able to use phobos. The compiler just needs to be able to grab the "object.d" file there. If you don't do this, you'll get the error: "object.d: module object cannot read file 'object.d'"

Yes, setting up to compile a D app on GBA does take some work at the moment. But it should get easier as this "D for GBA/DS" project progresses. One of my personal goals on this project is to make it as easy as possible to get a D project up and running on GBA/DS.

1 comment for "D on GBA/NDS Progress, Thanks to OOPMan"

  1. 2007-04-03 07:01

    oopman Says:
    April 3rd, 2007 at 1:36 am

    Good work, nice to see you were able to get something out of the instructions I listeded...

Leave a comment