comp.lang.ada
 help / color / mirror / Atom feed
From: "Peter Milliken" <peterm@resmed.com.au>
Subject: Re: Is it possible to build an Ada cross-compiler for an 8-bit embedded target now that gcc 3.X has support for Ada?
Date: Wed, 19 Nov 2003 06:55:52 +1100
Date: 2003-11-19T06:55:52+11:00	[thread overview]
Message-ID: <cPuub.611$W07.11450@nnrp1.ozemail.com.au> (raw)
In-Reply-To: vrih63aerng37f@corp.supernews.com

In the initial case, I wouldn't be that interested in tasking or floating
point support. I would like exception handling and run-time checking though
:-)

My current application space is of the order of 8K so my "needs" are fairly
modest from the perspective of Ada features. Whilst I know people have tiny
OS's and "tasking" for spaces this small I can't really imagine why you
would bother :-) A simple round robin scheduler synchronised to a timer
interrupt is more than sufficient for me, throw in some interrupt handling
for the few peripherals of the chip you are using and you have pretty much
used up your 8K anyway :-)

My knowledge of compiler technology is approximately nil, I am somewhat
surprised (although I probably shouldn't be :-)) at what you say is required
to go into the runtime libraries as opposed to code generated by the
compiler i.e. exception handling is the only surprise from the list you have
mentioned.

Is run-time checking generated by a compiler for which you have a code
generator? or is that more runtime work? I guess even if the compiler
generated the runtime checking you need the exception handling to catch it
:-) Although (hopefully), a really simple exception handling mechanism could
be easily achieved (as opposed to a full traceback system - one of the
micros I have just finished using had an 8 deep hardware stack that was
inaccessible from software - no way to perform a traceback :-)). But in the
initial case just catching the exception would be start.....

Anyway, doesn't look like I can get anything "off the shelf" from gcc 3.X -
perhaps I should start browsing the gnat/gcc 3.X source to get some idea of
where and what needs modifications.

Thanks for the replies,
Peter


"Randy Brukardt" <randy@rrsoftware.com> wrote in message
news:vrih63aerng37f@corp.supernews.com...
> "Peter Milliken" <peterm@resmed.com.au> wrote in message
> news:zgRsb.200$co2.10332@nnrp1.ozemail.com.au...
> > Subject pretty much says it all.
> >
> > Now that you can build an Ada compiler using gcc 3.X (well, according to
> the
> > build instructions of gcc 3.x :-)), I began to wonder whether it was
> > possible to build a cross-compiler for an 8-bit target processor. The
> 8-bit
> > processor family in question is already supported by gcc (I believe).
> >
> > When I say "possible", I just mean "follow the cross-compiling
> instructions
> > and out pops an Ada compiler" - I don't mean, "spend months of work
> patching
> > various files and then you might have an Ada compiler" :-)
>
> To not answer your actual question at all, but...
>
> As someone else pointed out, the biggest cost/overhead is porting the
> runtime libraries. Speaking for Janus/Ada, porting the code
> generator/compiler usually only takes a month or so (and that's for
building
> a code generator from scratch). But building the basic runtime support for
> exceptions, tasking, floating point (which usually has to be emulated on
> small processors), etc. can take a lot of time. In addition, that support
> can make programs quite large.
>
> Because of this, I think you'd have trouble making acceptable programs
with
> a general-purpose compiler like GCC.
>
> Janus/Ada was originally built for Z-80 and 8086 processors without much
> memory. Thus, we only load floating point and tasking support when they
are
> used. That isn't very valuable on standard systems like Windows these
days,
> but it matters a lot on 8-bit systems.
>
> The only reason that we don't support 8-bit processors is a lack of
demand.
> Everyone seems to use a different processor, and thus we cannot really
> justify the investment building code generators (easy) and runtime
libraries
> (not as easy) for each one.
>
> Of course, we're always interested in customization projects, but that
won't
> help you convince your manager...
>
>                    Randy Brukardt
>
>
>
>
>





  parent reply	other threads:[~2003-11-18 19:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-13 19:50 Is it possible to build an Ada cross-compiler for an 8-bit embedded target now that gcc 3.X has support for Ada? Peter Milliken
2003-11-13 21:02 ` Peter Milliken
2003-11-14  9:53 ` Peter Amey
2003-11-14 18:59   ` Mike Silva
2003-11-14 19:52     ` Martin Dowie
2003-11-17 21:57 ` Randy Brukardt
2003-11-18 16:03   ` Stephen Leake
2003-11-18 20:17     ` Randy Brukardt
2003-11-18 22:10       ` Stephen Leake
2003-11-19 20:12         ` Randy Brukardt
2003-11-19 22:23           ` Chad R. Meiners
2003-11-18 19:55   ` Peter Milliken [this message]
2003-11-18 20:11     ` Randy Brukardt
replies disabled

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