From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1ea992d578e9f621 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!i12g2000prf.googlegroups.com!not-for-mail From: Lucretia Newsgroups: comp.lang.ada Subject: Re: Restricted or no run time in Ada Date: Wed, 2 Jan 2008 13:33:18 -0800 (PST) Organization: http://groups.google.com Message-ID: <699060d5-9968-4148-b8d6-801058e8f0fa@i12g2000prf.googlegroups.com> References: NNTP-Posting-Host: 90.194.162.37 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1199309599 1512 127.0.0.1 (2 Jan 2008 21:33:19 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 2 Jan 2008 21:33:19 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: i12g2000prf.googlegroups.com; posting-host=90.194.162.37; posting-account=L2-UcQkAAAAfd_BqbeNHs3XeM0jTXloS User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.10) Gecko/20061201 Firefox/2.0.0.10 (Ubuntu-feisty),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:19154 Date: 2008-01-02T13:33:18-08:00 List-Id: 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.