From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ad47c3851d906864 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.201.168 with SMTP id kb8mr6675887pbc.3.1335597577364; Sat, 28 Apr 2012 00:19:37 -0700 (PDT) Path: r9ni107344pbh.0!nntp.google.com!news1.google.com!news2.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Ada on Nintendo DS ? References: Date: Sat, 28 Apr 2012 03:19:40 -0400 Message-ID: <82zk9wcohf.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (windows-nt) Cancel-Lock: sha1:lpvUevy4GDHKNWFc9KFmlfIbNTQ= MIME-Version: 1.0 X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 30f874f9b9a09e029e66129195 X-Received-Bytes: 2886 Content-Type: text/plain; charset=us-ascii Date: 2012-04-28T03:19:40-04:00 List-Id: Natasha Kerensikova 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