comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: Ada on Nintendo DS ?
Date: Sat, 28 Apr 2012 03:19:40 -0400
Date: 2012-04-28T03:19:40-04:00	[thread overview]
Message-ID: <82zk9wcohf.fsf@stephe-leake.org> (raw)
In-Reply-To: slrnjplqtk.1lme.lithiumcat@sigil.instinctive.eu

Natasha Kerensikova <lithiumcat@gmail.com> writes:

> Moreover, I just happen to own a device that probably qualifies as
> embedded, with two ARM CPUs (one ARM7 and one ARM9), 4 MB RAM and a few
> DSPs. The device is known as Nintendo DS lite.
>
> So how do I compile code suitable to run on such a device?
>
> I haven't been able to find anything that perform such a task, but I
> have missed it?
>
> As far as I can tell, devkitARM is a toolchain derived from GCC that
> targets my hardware (it seems there is also some libraries to deal with
> DSPs and stuff, but I can care about this later on). 

It should be straight-forward to include Ada in that toolchain. The hard
part will be the Ada runtime library; it assumes some operating system,
similar to POSIX. It is possible to use no runtime, but then you lose
some features of Ada (exceptions, fixed point, tasking, new/free, etc).

Is there an OS on the Nintendo?

> On the other end, gnatdroid seems to successfully translate Ada code
> into binary that can be fed to ARM CPUs. 

gnatdroid is intended for Android, a specific operating system. It might
be useful as an example.

> Would anyone have an estimation or a bound on how difficult it can be?

If Nintendo has a decent operating system, Ada should Just Work (similar
to the ports you describe doing)

But if it doesn't, the level of difficulty really depends on your level
of experience; since you seem to be new at configuring compilers, it
will be hard and confusing :(.

Definitely set a goal of a runtimeless compiler, and see if you can make
that work. Then think about what parts of the Ada runtime you really
need.

> Maybe I should start with smaller steps, like writing C stuff going
> through devkitARM, and then only start aiming at Ada?

That can be useful just to understand how all the tools work together.
In particular, writing a simple program in C, and the same in Ada, can
be instructive in finding out why the Ada compiler isn't doing the right
thing.

But it also leads to the Dark Side :). (as in, "I know I can do this
simple program in C; I'll put off porting Ada just a little longer").

-- 
-- Stephe



  reply	other threads:[~2012-04-28  7:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-27 18:56 Ada on Nintendo DS ? Natasha Kerensikova
2012-04-28  7:19 ` Stephen Leake [this message]
2012-04-28 13:43   ` Natasha Kerensikova
2012-04-29 13:55     ` Robert A Duff
2012-04-28  9:22 ` Brian Drummond
2012-04-29 18:29   ` Rugxulo
2012-05-03 12:37   ` Ada on embedded devices (Was: Ada on Nintendo DS ?) Jacob Sparre Andersen
2012-05-04  9:12     ` Brian Drummond
2012-05-04 11:17       ` Britt
2012-05-04 16:36         ` Tero Koskinen
2012-05-09  2:24         ` Ada on embedded devices BrianG
2012-05-04 16:42     ` Ada on embedded devices (Was: Ada on Nintendo DS ?) Tero Koskinen
2012-05-05 14:25     ` Lucretia
2012-05-01  5:34 ` Ada on Nintendo DS ? Micronian Coder
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox