5

注意:我对 GCC 工具链知之甚少,所以这个问题可能没有多大意义。

由于 GCC 包含一个 Ada 前端,并且它可以发出 ARM,而 devKitPro 是基于 GCC 的,是否可以使用 Ada 而不是 C/C++ 在 DS 上编写代码?

编辑:似乎 devKitARM 使用的目标是 arm-eabi。

4

5 回答 5

6

devkitPro 不是工具链、编译器或任何软件包。用于针对 DS 的工具链是 devkitARM,它是 devkitPro 提供的工具链之一。

可能可以构建 ada 编译器,但我非常怀疑您是否能够设法在 DS 本身上运行任何有用的东西。devkitPro 肯定不会在我们生产的软件包中提供 ada 编译器。

于 2009-11-05T22:15:44.263 回答
6

是的,有可能,请参阅我的项目https://github.com/Lucretia/tamp并根据我的脚本构建交叉编译器。然后您就可以使用 Ada 来定位 NDS。我还构建了一个基本的 RTS,它将为您提供本地异常处理。

还有@Martin Beckett,为什么认为 Ada 直接针对 DoD 的东西?几年前他们放弃了授权,Ada 很容易用于任何项目,您确实意识到 Ada 是一种通用编程语言,不是吗?

于 2011-03-08T21:28:00.310 回答
2

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 glue 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).

于 2008-11-05T10:58:57.553 回答
2

(免责声明:我不认识艾达)

可能。

可能能够构建 devKitPro 以使用 Ada,但是,预先提供的二进制文件(至少对于 OS X)没有编译 Ada 支持。

但是,您可能会发现自己编写了大量的 C“胶水”代码来与各种硬件寄存器等接口。

于 2008-09-28T03:46:42.213 回答
0

在实际平面上,这是不可能的。

在理论上,您可以使用一个自定义的 Ada 解析器(我在ANTLR站点上找到了这个,但它很旧)将 Ada 翻译成 C/C++,然后将其提供给 devkitpro。

但是,构建这种翻译器的工作量可能与创建游戏本身相同(如果不是更高的话)。

于 2010-06-02T07:27:14.227 回答