views:

536

answers:

4

Note: I know very little about the GCC toolchain, so this question may not make much sense.

Since GCC includes an Ada front end, and it can emit ARM, and devKitPro is based on GCC, is it possible to use Ada instead of C/C++ for writing code on the DS?

Edit: It seems that the target that devKitARM uses is arm-eabi.

+2  A: 

(Disclaimer: I don't know Ada)

Possibly.

You might be able to build devKitPro to use Ada, however, the pre-provided binaries (at least for OS X) do not have Ada support compiled in.

However, you will probably find yourself writing tons of C "glue" code to interface with the various hardware registers and the like.

Dre
+1  A: 

One thing to consider when porting a language to the nintendo DS is the relatively small stack it has (16KB). There are possible workarounds such as swapping the SRAM stack content into DRAM (4MB) when stack gets full or just have the whole stack in DRAM (assumed to be auwfully slow).

And I second Dre on the fact that you'll have to provide yourself glu between the ADA library function you'd like to use and existing libraries on the DS (which are hopefully covering most of the hardware stuff).

sylvainulg
Yeah, watch out so you don't get a stack overflow. :)
unwind
+5  A: 

devkitPro is not a toolchain, compiler or indeed any software package. The toolchain used to target the DS is devkitARM, one of the toolchains provided by devkitPro.

It may be possible to build the ada compiler but I doubt very much if you'll ever manage to get anything useful running on the DS itself. devkitPro will certainly never provide an ada compiler as part of the packages we produce.

WinterMute
For those who don't know, WinterMute is the maintainer and creator of devkitPro.
LiraNuna
A: 

On a practical plane, it is not possible.

On a theoretical plane, you could use one custom ADA parser (I found this one on the ANTLR site, but it is quite old) in order to translate ADA to C/C++, and then feed that to devkitpro.

However, the effort of building such translator is probably going to be equal (if not higher) to creating the game itself.

egarcia