comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Drummond <brian@shapes.demon.co.uk>
Subject: Re: understanding runtime support
Date: Tue, 15 May 2012 16:38:56 +0000 (UTC)
Date: 2012-05-15T16:38:56+00:00	[thread overview]
Message-ID: <jou0r0$fmc$1@dont-email.me> (raw)
In-Reply-To: 878vgtrilb.fsf@adaheads.sparre-andersen.dk

On Tue, 15 May 2012 09:47:44 +0200, Jacob Sparre Andersen wrote:

> mjsilva@scriptoriumdesigns.com writes:
>> On Monday, May 14, 2012 1:04:56 PM UTC-7, Patrick wrote:
> 
>>> Now it seems I am supposed to roll my own runtime or other low level
>>> solution, [...]

Good discussion, and you are not alone in finding this frustrating.
I have also started learning how to build gcc with Ada support for 
embedded targets. There are other interested parties, for platforms 
including the Nintendo DS, and Android.

> If you want to use Arduino as your target system, there is a
> ready-to-compile GNAT version (AVR-Ada), which doesn't support the
> Ravenscar profile yet, but is likely to get there.

>> Sadly, there does not seem to be a cookbook as to how to create such a
>> bare metal port for other devices/families.
> 
> Apparently not. - Maybe it is time to write one?

Or port one.

http://wiki.osdev.org/Bare_Bones

This shows it's quite a complicated process even in C, where support for 
different targets is more pervasive despite the relative merits of the 
languages.

Translating this tutorial to Ada looks (a) feasible to me, and (b) a good 
way to discover the answers to some of the questions in this thread.

It shows how the C "main" is linked to a minimal C rts (written partly in 
assembler, specific to x86 but very small) and accesses basic services 
through that rts.

Part of the problem is that Ada expects more from a rts than C does. One 
approach is to expect less (for example get simple examples to build and 
do something with "pragma no-run-time"). Then use that as a basis for 
creating a minimal runtime for a new platform. The AVR-Ada rts would be a 
useful starting point, as would the (Gnat 3.15 era) run time 
documentation which was discussed here recently.

- Brian



  parent reply	other threads:[~2012-05-15 16:39 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-11  3:49 understanding runtime support Patrick
2012-05-13  4:49 ` Shark8
2012-05-13 15:26   ` Patrick
2012-05-14  4:37     ` Shark8
2012-05-14  8:24     ` Ludovic Brenta
2012-05-14 11:31       ` Patrick
2012-05-14 18:34         ` Shark8
2012-05-14 20:04           ` Patrick
2012-05-14 21:02             ` mjsilva
2012-05-15  6:48               ` Randy Brukardt
2012-05-15 15:22                 ` mjsilva
2012-05-15 15:41                   ` Lucretia
2012-05-15 16:05                   ` Lucretia
2012-05-15 16:29                     ` mjsilva
2012-05-15 17:02                       ` Lucretia
2012-05-16 17:51                 ` Tero Koskinen
2012-05-17  6:39                   ` Simon Wright
2012-05-17 18:09                     ` Tero Koskinen
2012-05-17 18:15                     ` John B. Matthews
2012-05-15  7:47               ` Jacob Sparre Andersen
2012-05-15 16:27                 ` Jeffrey Carter
2012-05-15 16:38                 ` Brian Drummond [this message]
2012-05-15 16:49                   ` Patrick
2012-05-15 16:50                   ` Patrick
2012-05-15 14:24               ` Lucretia
2012-05-14 22:52             ` Shark8
2012-05-15  0:04               ` Patrick
2012-05-15  7:39               ` Dmitry A. Kazakov
2012-05-15 14:19       ` Lucretia
2012-05-15  7:26 ` Ludovic Brenta
2012-05-15 14:31   ` Lucretia
2012-05-16 16:24   ` tmoran
2012-05-17  0:15     ` Randy Brukardt
2012-05-15 14:48 ` Lucretia
2012-05-15 14:55 ` Lucretia
2012-05-15 15:32   ` Mike Silva
2012-05-15 16:04     ` 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