comp.lang.ada
 help / color / mirror / Atom feed
From: anon@anon.org (anon)
Subject: Re: How do I go about creating a minimal GNAT runtime?
Date: Sat, 21 Feb 2009 16:41:27 GMT
Date: 2009-02-21T16:41:27+00:00	[thread overview]
Message-ID: <X8Wnl.391570$Mh5.65742@bgtnsc04-news.ops.worldnet.att.net> (raw)
In-Reply-To: 0zPnl.16758$YU2.10131@nlpi066.nbdc.sbc.com

First, thing you need to do, is to decide on what you want your RTL system 
for. That we can not help you.

As for the 64k RTL, Forget it.  The size depends upon what you want the 
RTL to be able to do. And are you talking about Stand-Alone OS or using 
limited links into the OS.

Well there are many ways to try to do the job. Here are a few ideas.

  First. Use "pagma Ravenscar ;". Limits some of the RTL. In some 
  cases, it can reduce the dead code. 

  Second, use "pragma Restrictions" and "pragma Suppress" to remove 
  unused packages and checks that add a large group of routines that you 
  may not need, such as exceptions. Which means, trap your own errors 
  instead of letting the compiler do it.

  Third, use simple replacement packages like GNAT.IO instead of 
  Ada.Text_IO which contains routines for files and stream I/O as well 
  as exceptions. This, is not standard but it can remove alot of dead code.

  Fourth, you can always fall back and use mix languages, like using C for 
  the RTL. But at some point you will use another lang. becase GNAT and 
  other version of Ada mostly use links to the OS. for files and interrupts 
  handling. 

    One person, back in the late 1990s rewote the GNAT Ada RTL packages 
    to use mostly "pragma Import" statement to the C and OS compiler 
    libraries.  But that not true Ada it C.

  And then there the obsolete feature "pragma No_Run_Time ;". This 
  statement allows the 4K footprint. Note: Will this feature be there in 
  the next version of GNAT Ada? Only time will tell. 

Now, for simpler full feature RTL (based on RM), you might rework the 
GNAT RTL, but there is not a lot that you can do. You might save a 
little memory but for the amount of time you spend, it not worth it.
No where near the limits you are looking for. 

The only way is to write a miminal RTL is to write a Stand-Alone OS. But 
be prepared to spend years of research and writting code just to find out 
your OS will no longer work on those PC at that time. Outdated before you 
start! You need a plan wih team that can get job done within a year or 
so. But that's a full time job.


In <0zPnl.16758$YU2.10131@nlpi066.nbdc.sbc.com>, Dimonax <dimonax@nospam.net> writes:
>On Sat, 24 Jan 2009 12:47:54 -0800, Lucretia wrote:
>
>> Hi (again),
>> 
>
>Hi!
> 
>Actually I've been learning my way around the Ada Runtime for similiar 
>reasons. I say similiar because the goal is different.
>
>I'm a demoscene hacker. Anyone who knows that is knows that a demo 
>usually requires a very small footprint.(Look up the 4k demos that have 
>been posted up online.)
>
>While my goals arent that lofty, I would like to build a runtime that I 
>could fit into a demo that's less than 1024k if at all possible. 64k is 
>preferred.
>
>I want the concurrency features mostly, but I love the power of the full 
>typing system.
>
>It's pretty easy to build executables using shared libraries (-bargs -
>shared under gnat-gcc) that are tiny. But I need to get the whole system 
>down as tiny as possible.
>
>So, sound like we have similiar plans even though the goals are different?
>
>Anyone else here looking to do the same?
>
>Freejack
>




  reply	other threads:[~2009-02-21 16:41 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-24 20:47 How do I go about creating a minimal GNAT runtime? Lucretia
2009-01-25 11:13 ` Ludovic Brenta
2009-01-25 11:18   ` Ludovic Brenta
2009-01-25 14:00     ` Lucretia
2009-01-25 14:00   ` Lucretia
2009-01-25 19:43     ` Ludovic Brenta
2009-01-25 20:30 ` xavier grave
2009-01-26  6:52 ` anon
2009-01-26 21:36 ` anon
2009-02-10  2:34 ` Exceptions (was Re: How do I go about creating a minimal GNAT runtime?) anon
2009-02-16  1:41 ` How do I go about creating a minimal GNAT runtime? Hibou57 (Yannick Duchêne)
2009-02-21  9:11 ` Dimonax
2009-02-21 16:41   ` anon [this message]
2009-02-21 21:14     ` Dimonax
2009-02-22  1:36       ` anon
2009-02-27 23:42   ` Randy Brukardt
2009-03-01  1:12     ` Dimonax
2009-03-01 19:13       ` anon
2009-03-02 22:07         ` Randy Brukardt
2009-03-03  2:00           ` anon
2009-03-03 22:23             ` lucretia
2009-03-04  0:03               ` anon
2009-03-11 12:54   ` gautier_niouzes
replies disabled

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