comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
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: Tue, 18 Nov 2003 14:11:08 -0600
Date: 2003-11-18T14:11:08-06:00	[thread overview]
Message-ID: <vrkv9ptmdl7653@corp.supernews.com> (raw)
In-Reply-To: cPuub.611$W07.11450@nnrp1.ozemail.com.au

"Peter Milliken" <peterm@resmed.com.au> wrote in message
news:cPuub.611$W07.11450@nnrp1.ozemail.com.au...
> 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 :-)

Right. Which is why we went to the lengths of keeping the floating point and
tasking separate.

> 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.

Well, we probably have more use of the Janus/Ada runtime libraries than some
other compilers do. (We use the heap more extensively, for instance.) But
anything that takes more than a handful of instructions ends up in the
runtime. Even multiply and divide end up there on processors that don't
support those operations in the instruction set.

> 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.....

I can't speak for compilers in general (of course), but in Janus/Ada, the
checking itself is part of the generated code. If the check fails, then a
call is made to the runtime to raise the exception. Obviously, you could
live without exception handling, but you'd still need some sort of routine
to report the error (send the error string(s) to a debug port, say).

The traceback stuff in Janus/Ada doesn't take that much code, but if you're
trying to get your program into 8K, you'd probably be better off without it.

> 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.

Sounds like a plan. Good luck.

               Randy.






      reply	other threads:[~2003-11-18 20:11 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
2003-11-18 20:11     ` Randy Brukardt [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