comp.lang.ada
 help / color / mirror / Atom feed
* Ada subset for microcontrollers
@ 2001-05-17 11:41 David Kristola
  2001-05-17 16:08 ` Jerry Petrey
  2001-05-17 17:13 ` Jeffrey Carter
  0 siblings, 2 replies; 8+ messages in thread
From: David Kristola @ 2001-05-17 11:41 UTC (permalink / raw)


Hello,

Soon i'll be picking a microcontroller for a robot project.  While i'm 
sure i would have no problem learning PIC Basic or Interactive C, i 
would prefer to work in Ada, or a subset of Ada.  Is there an Ada 
subset compiler out there for any microcontrollers?

Thanks,


-- 
   --djk, keeper of arcane lore & trivial fluff
   --Home: David95036 plus 1 at america on-line
   --Spam: goto.hades@welovespam.com




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ada subset for microcontrollers
  2001-05-17 11:41 Ada subset for microcontrollers David Kristola
@ 2001-05-17 16:08 ` Jerry Petrey
  2001-05-19  7:22   ` David Kristola
  2001-05-17 17:13 ` Jeffrey Carter
  1 sibling, 1 reply; 8+ messages in thread
From: Jerry Petrey @ 2001-05-17 16:08 UTC (permalink / raw)




There is an Ada subset for the Mindstorms microcontroller using GNAT.
See: http://www.usafa.af.mil/dfcs/adamindstorms.htm for the latest Ada 
for Mindstorms downloads.

Jerry


---------------------------------------------------------------------------
David Kristola wrote:
> 
> Hello,
> 
> Soon i'll be picking a microcontroller for a robot project.  While i'm
> sure i would have no problem learning PIC Basic or Interactive C, i
> would prefer to work in Ada, or a subset of Ada.  Is there an Ada
> subset compiler out there for any microcontrollers?
> 
> Thanks,
---------------------------------------------------------------------------

-- 
-----------------------------------------------------------------------------
-- Jerry Petrey                                                
-- Senior Principal Systems Engineer - Navigation, Guidance, & Control
-- Raytheon Missile Systems          - Member Team Ada & Team Forth
-- NOTE: please remove <NOSPAM> in email address to
reply                  
-----------------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ada subset for microcontrollers
  2001-05-17 11:41 Ada subset for microcontrollers David Kristola
  2001-05-17 16:08 ` Jerry Petrey
@ 2001-05-17 17:13 ` Jeffrey Carter
  2001-05-20 15:28   ` Tor Fredrik Aas
  1 sibling, 1 reply; 8+ messages in thread
From: Jeffrey Carter @ 2001-05-17 17:13 UTC (permalink / raw)


David Kristola wrote:
> 
> Soon i'll be picking a microcontroller for a robot project.  While i'm
> sure i would have no problem learning PIC Basic or Interactive C, i
> would prefer to work in Ada, or a subset of Ada.  Is there an Ada
> subset compiler out there for any microcontrollers?

There's always the Lego Mindstorms subset described in a recent Ada
Letters article (2000 Sep). You can find it online (PDF) at

http://www.acm.org/sigada/ada_letters/sept2000/index.htm



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ada subset for microcontrollers
  2001-05-17 16:08 ` Jerry Petrey
@ 2001-05-19  7:22   ` David Kristola
  0 siblings, 0 replies; 8+ messages in thread
From: David Kristola @ 2001-05-19  7:22 UTC (permalink / raw)


On Thu, 17 May 2001 9:08:23 -0700, Jerry Petrey wrote
(in message <3B03F777.499FFF85@west.raytheon.com>):

> http://www.usafa.af.mil/dfcs/adamindstorms.htm

Thanks Jerry and Jeffrey, but the reason i'm looking for a new 
microcontroller is my LEGO Mindstorms RCX is too limited.  I want to 
add a gyroscope to a robot, and i'm considering a Futaba model.  It 
takes pulse width modulation (PWM) in, and returns PWM as well.  In 
order to hook that to an RCX, i would still need another 
microcontroller.  My current leading contender is the MC68HC11.

Thanks,

-- 
   --djk, keeper of arcane lore & trivial fluff
   --Home: David95036 plus 1 at america on-line
   --Spam: goto.hades@welovespam.com




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ada subset for microcontrollers
  2001-05-17 17:13 ` Jeffrey Carter
@ 2001-05-20 15:28   ` Tor Fredrik Aas
  2001-05-20 20:51     ` David Kristola
  0 siblings, 1 reply; 8+ messages in thread
From: Tor Fredrik Aas @ 2001-05-20 15:28 UTC (permalink / raw)



"Jeffrey Carter" <jeffrey.carter@boeing.com> wrote in message
news:3B0406D3.EF580628@boeing.com...
> David Kristola wrote:
> >
> > Soon i'll be picking a microcontroller for a robot project.  While i'm
> > sure i would have no problem learning PIC Basic or Interactive C, i
> > would prefer to work in Ada, or a subset of Ada.  Is there an Ada
> > subset compiler out there for any microcontrollers?
>
> There's always the Lego Mindstorms subset described in a recent Ada
> Letters article (2000 Sep). You can find it online (PDF) at
>
> http://www.acm.org/sigada/ada_letters/sept2000/index.htm

AFAIK the RCX uses a Hitachi H8 controller. I might be possible to run the
same code on larger controllers, even SH-8.

-f





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ada subset for microcontrollers
  2001-05-20 15:28   ` Tor Fredrik Aas
@ 2001-05-20 20:51     ` David Kristola
  2001-05-21  7:40       ` Tor Fredrik Aas
  0 siblings, 1 reply; 8+ messages in thread
From: David Kristola @ 2001-05-20 20:51 UTC (permalink / raw)


On Sun, 20 May 2001 8:28:51 -0700, Tor Fredrik Aas wrote
(in message <9e8nem$lvn$1@snipp.uninett.no>):

> AFAIK the RCX uses a Hitachi H8 controller. I might be possible to run the 
> same code on larger controllers, even SH-8.

The Lego RCX uses a special byte code interpreter that was designed to 
work in the Lego environment.  The last time i checked, the Ada subset 
compiler for the RCX really generated NQC (Not Quite C, a C subset 
invented by David Baum to program the RCX).  NQC compiles down to the 
byte code used by the RCX.  Perhaps the latest version of the 
Ada-to-RCX compiler does the same thing.  However, since the firmware 
that runs inside the RCX is proprietary, and the license only allows me 
to copy it to my RCX, and the environment would undoubtedly be 
different if i used an SH-8...  I'm not sure i can get to where i want 
to go by that route.

It would be an interesting project to create my own Ada-subset compiler 
for a microcontroller, but i just don't have the time.


-- 
   --djk, keeper of arcane lore & trivial fluff
   --Home: David95036 plus 1 at america on-line
   --Spam: goto.hades@welovespam.com




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ada subset for microcontrollers
  2001-05-20 20:51     ` David Kristola
@ 2001-05-21  7:40       ` Tor Fredrik Aas
  2001-05-21 20:15         ` Stephen Leake
  0 siblings, 1 reply; 8+ messages in thread
From: Tor Fredrik Aas @ 2001-05-21  7:40 UTC (permalink / raw)



> The Lego RCX uses a special byte code interpreter that was designed to
> work in the Lego environment.  The last time i checked, the Ada subset
> compiler for the RCX really generated NQC (Not Quite C, a C subset
> invented by David Baum to program the RCX).  NQC compiles down to the
> byte code used by the RCX.  Perhaps the latest version of the
> Ada-to-RCX compiler does the same thing.  However, since the firmware
> that runs inside the RCX is proprietary, and the license only allows me
> to copy it to my RCX, and the environment would undoubtedly be
> different if i used an SH-8...  I'm not sure i can get to where i want
> to go by that route.
>
> It would be an interesting project to create my own Ada-subset compiler
> for a microcontroller, but i just don't have the time.
>

Of cource you are right, I see this now that I actually read the
documentation....

But a solution might reveal itself if you try LegOS, it uses the gcc-h8 port
and thus you can use C to program it. I don't know if it's possible to make
GNAT or some other compiler stop at assembler stage and the hand over the
source to gas-h8.

This is just an idea on top of my head, I don't know much about the GNAT
backend or anything...

Good luck !

--
Tor Fredrik Aas






^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ada subset for microcontrollers
  2001-05-21  7:40       ` Tor Fredrik Aas
@ 2001-05-21 20:15         ` Stephen Leake
  0 siblings, 0 replies; 8+ messages in thread
From: Stephen Leake @ 2001-05-21 20:15 UTC (permalink / raw)


"Tor Fredrik Aas" <tfaas@sensewave.com> writes:

> But a solution might reveal itself if you try LegOS, it uses the gcc-h8 port
> and thus you can use C to program it. I don't know if it's possible to make
> GNAT or some other compiler stop at assembler stage and the hand over the
> source to gas-h8.

All compilers in the Gnu Compiler Collection (the now official acronym
expansion of gcc) generate assembler as one of the steps in
compilation. 

If you have a gcc C compiler, you can have a gcc Ada compiler with a
little work. Not complete Ada, since that requires an OS that supports
tasking, but a good subset.

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2001-05-21 20:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-17 11:41 Ada subset for microcontrollers David Kristola
2001-05-17 16:08 ` Jerry Petrey
2001-05-19  7:22   ` David Kristola
2001-05-17 17:13 ` Jeffrey Carter
2001-05-20 15:28   ` Tor Fredrik Aas
2001-05-20 20:51     ` David Kristola
2001-05-21  7:40       ` Tor Fredrik Aas
2001-05-21 20:15         ` Stephen Leake

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