comp.lang.ada
 help / color / mirror / Atom feed
From: Lucretia <lucretia9@lycos.co.uk>
Subject: Re: Restricted or no run time in Ada
Date: Wed, 2 Jan 2008 13:33:18 -0800 (PST)
Date: 2008-01-02T13:33:18-08:00	[thread overview]
Message-ID: <699060d5-9968-4148-b8d6-801058e8f0fa@i12g2000prf.googlegroups.com> (raw)
In-Reply-To: VNSej.364255$kj1.184664@bgtnsc04-news.ops.worldnet.att.net

On Jan 2, 8:49 pm, a...@anon.org (anon) wrote:
> Your going down the wrong path!
>
> First, there is no "pragma" other than "pragma No_Run_Time;" that
> will allow GNAT to build code without a runtime code. Even then,
> the code is not ROM bootable.

That pragma is deprecated for a start.

Why wouldn't it be ROM bootable?

> Second, The Ada main procedure (Ada program) has no startup address
> or routine that can be directly linked and make a kernel, that can be
> executed by a ROM startup! You must use the BINDER process to build
> that start code. But the "GNAT BIND" does not allow stand-alone aka
> ROM bootable kernel.

In my test I create a simple bit of asm that gets called by grub and
then it boots into my main Ada application. I also link with LD.

> The GNAT binder perform a number of steps, that have to be preform
> to insure that the program will work properly. Such as:
>         1. Checks that a program is consistent [ RM 10 ].

True enough.

>         2. Checks that an acceptable order of elaboration exists
>            for the program [ RM 10 ].

This was something I was worried about.

>         3. Generates a main program incorporating the given
>            elaboration order. This program is a small Ada package
>            (body and spec) that must be subsequently compiled
>            using the GNAT compiler.
>         4. Determines the set of object files required by the
>            given main program.
>
> So, for Ada only code, you must write a new Ada binder to preform
> those steps to build a stand-alone code. And create the main program
> (describe in step 3) that allows ROM bootable programs..

Or use the gnatbind as a base.

> Time allowed just to write and test as new binder 6 months at least!
>
> Another way is to use existing Ada 95 code projects that are out there.
> That you can download the source code and study how they got around
> this. But this way mean no Ada only code, and does violates the Ada RM.

MarteOS actually uses gnat, they have ported the compiler to their os.
I don't know if it uses gnatbind. Not sure of pragmas either.

How do big companies use GNAT to create ROM bootable applications
then?

Luke.



  reply	other threads:[~2008-01-02 21:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-02 19:19 Restricted or no run time in Ada Lucretia
2008-01-02 20:49 ` anon
2008-01-02 21:33   ` Lucretia [this message]
2008-01-03  3:50     ` anon
2008-01-02 22:23   ` Simon Wright
2008-01-02 23:06     ` Lucretia
2008-01-03  5:14       ` roderick.chapman
2008-01-03  7:30         ` Lucretia
2008-01-03  8:00         ` Lucretia
2008-01-03  8:40           ` Lucretia
2008-01-03  9:58         ` anon
2008-01-03 10:22           ` Lucretia
2008-01-03 17:30             ` anon
2008-01-03 20:05               ` Vadim Godunko
2008-01-03 20:22                 ` Lucretia
2008-01-04  9:23                   ` Maxim Reznik
2008-01-04 23:23                     ` Brian May
2008-01-04 12:46                   ` Georg Bauhaus
2008-01-04 13:53                     ` Vadim Godunko
2008-01-04 14:13                     ` Maxim Reznik
2008-01-04 14:15   ` Lucretia
replies disabled

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