Subject: | |
From: | |
Reply To: | |
Date: | Mon, 15 Nov 1999 11:17:19 -0800 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
> "Carlisle, Martin" wrote:
> >
> > One of our faculty, Barry Fagin, is pursuing an Ada interface for
> > programming the Lego Mindstorms. My understanding is that his current idea
> > is to translate Ada to NQC. This route seems a lot simpler to me than
> > attempting to complete the ECGS combination with GNAT.
>
> I suppose it depends how large a subset he is planning to translate.
> If he is expecting to translate full Ada, he would be wise to start
> with an existing front end.
I have the Mindstorms set (never too old to be a kid :) and I would
say that one thing to keep in mind is that NQC targets the firmware
provided by Lego with the Mindstorms kit. This firmware does provide
multiple tasks, but is severly limited in other areas. For instance
the entire useable memory consists of 32 variables (each 32-bit ints
I think) and also recursive function calls are not allowed. There are
other restrictions too. Thus the name, NQC - which stands for Not-Quite-C.
Prof. Fagin would probably want to call his compiler Not-Quite-Ada
because much of what you would expect from an Ada compilation system
and runtime is just not possible with the Lego firmware.
These restrictions are what led some people to develop LegOS which
replaces the Lego firmware and targets the chip in the RCX. There
was a pretty good article about LegOS in the last issue of Dr. Dobbs.
Also a good resource for info on Mindstorms and what people are
doing with it is www.lugnet.com, a site with lego oriented newsgroups.
Look for the robotics related newsgroups there.
>
> We also have a technology which might be relevant, an Ada 95 compiler
> that uses optimized ANSI C as its intermediate representation. This
> might or might not be easier to use than GNAT as a starting point for
> this effort.
Something like this would probably allow you to work with LegOS. You
could generate C from your Ada code and then compile the C along with the
LegOS kernel code to build a system image (I believe that with LegOS you
have to link your program with the kernel and download the whole thing in
one piece).
Chris Daly
Rational Software
|
|
|