comp.lang.ada
 help / color / mirror / Atom feed
From: Lucretia <Lucretia9000@yahoo.co.uk>
Subject: Re: Why so hard to come up with a simple embedded Ada system?
Date: Sat, 17 Jul 2010 07:25:59 -0700 (PDT)
Date: 2010-07-17T07:25:59-07:00	[thread overview]
Message-ID: <80709715-dc28-4262-883d-72acc39933bb@s9g2000yqd.googlegroups.com> (raw)
In-Reply-To: 37da1783-b355-4d43-a9a8-7f0d4ba4da9c@t13g2000prf.googlegroups.com

On Jul 14, 5:55 am, use...@scriptoriumdesigns.com wrote:
> I'll just come out and say it - for a language that was designed for
> as much for embedded applications as for anything, it seems to be
> maddeningly difficult to actually get Ada on a modest embedded

I have to agree, sort of. I have some comments and some questions
regarding this :D

> platform.  By modest I mean low-end 32 bits, no MMU.  ARM7 or Cortex
> Mx would be my first choice.  I can be up and running on such a
> platform with C and a tasking library in a day (Rowley Crossworks,
> nice package).  Why can't I do the same with Ada?  Or rather, to avoid
> making this about me, why can't an embedded programmer - student,
> hobbyist or professional - who's heard about Ada and wants to give it
> a spin, including hard-realtime concurrency, just do it?
>
> If Ada fans (I include myself) want to see Ada get more exposure, this
> seems like not only a desirable step but a necessary one.  I can run C
> on a thousand such boards, and I can't (AFAIK) run Ada on one.
>
> Maybe this is all available, and I just haven't found out where.  Then
> that's a problem too, but I'll be happy to hear about it.
>
> All comments welcome.

With GCC, you can set up GCC, Binutils and Newlib/DietC/uClibc and
have a tasking environment on bare hardware - I've not tried it
myself, so cannot testify to the tasking side of things.

With GCC/GNAT you can do the same thing, but depending on hardware,
depends on what you get. By building for a target of <cpu>-elf, you
will get gnatbind and gnat1 (compiler), but you won't get an installed
runtime. See my site for more info on building these compilers (http://
archeia.com/an-ada95-hello-world-style-kernel.html).

At this point you would be where are with a C library (minus the
tasking and the large runtime). So, you would need to tinker with the
standard.ads package to configure the runtime that you are allowing
people to use, copying bits in from the GNAT source as and when GCC
asked for it. i.e. do you want the secondary stack available? Do you
want it dynamic or static? If so, you need the extra memory for it. Do
you want tasking? depending on the CPU, depends on whether the code is
there for it. Do you want tasking? See below for exceptions[*]. You'll
need to provide primitives that the runtime can use to implement it.
You can configure the runtime for what you want, but you have to
provide the underlying code to support it. Basic parts of the runtime
can be used though, quite easily.

For this kind of work, people just work with a compiler targeted for
the hardware (the target I mentioned above), but for Ada, should we be
creating our own --target=<target> so that we can build a runtime
within the normal GCC build system? Or should we be creating a port
specifically for the board, i.e. adding extra functionality into the
build system to support building for <cpu>-elf?

* On ARM, you can have SJLJ exception handling which isn't part of the
ARM ABI. For zero cost exceptions (part of the ABI), this needs to be
ported as the code just isn't there. I've looked into this recently
and I'm not stuck with the code, I'm stuck trying to work out how to
get a toolchain. I thought I'd try doing it on Maemo as I have an N900
available, but the SDK is based on Scratchbox and I'm on 64-bit and to
be honest, the SB people, point to the Maemo people and the Maemo
people don't give a shit, so don't help.

I think that made sense :D

Luke.



      parent reply	other threads:[~2010-07-17 14:25 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-14  4:55 Why so hard to come up with a simple embedded Ada system? usenet
2010-07-14  5:33 ` Jeffrey R. Carter
2010-07-14  6:27   ` usenet
2010-07-14 18:05     ` Jeffrey R. Carter
2010-07-14  7:23 ` Dmitry A. Kazakov
2010-07-17  8:45   ` MRE
2010-07-17  9:46     ` Dmitry A. Kazakov
2010-07-19 11:06       ` MRE
2010-07-19 17:34         ` Dmitry A. Kazakov
2010-07-19 18:39           ` Jeffrey R. Carter
2010-07-17 16:29     ` Georg Bauhaus
2010-07-18  0:26       ` usenet
2010-07-18 10:15         ` Simon Wright
2010-07-18 19:26           ` usenet
2010-07-18 11:48         ` jonathan
2010-07-18 15:26           ` Britt Snodgrass
2010-07-18 15:50             ` Britt Snodgrass
2010-07-19 23:00         ` Brian Drummond
2010-07-19 11:09       ` MRE
2010-07-14  8:03 ` anon
2010-07-14 11:43 ` jonathan
2010-07-14 12:36 ` jonathan
2010-07-14 12:46 ` Ludovic Brenta
2010-07-14 19:56 ` jonathan
2010-07-15  1:36 ` Steve D
2010-07-15  9:50   ` Alex R. Mosteo
2010-07-17 14:25 ` Lucretia [this message]
replies disabled

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