comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Package procedure as program entry in GPR project
Date: Sat, 26 Jan 2019 12:05:35 +0000
Date: 2019-01-26T12:05:35+00:00	[thread overview]
Message-ID: <lyfttfvd2o.fsf@pushface.org> (raw)
In-Reply-To: q2fvrk$nbp$1@franka.jacob-sparre.dk

"Randy Brukardt" <randy@rrsoftware.com> writes:

> "Jesper Quorning" <jesper.quorning@gmail.com> wrote in message 
> news:9c44582e-faff-4498-88e1-c8715471e857@googlegroups.com...
[...]
>> package My_Program_Package is
>>   procedure Program_Entry_Procedure;
>> end My_Program_Package;
>>
>> How do i make Program_Entry_Procedure as the program entry procedure
>> in a GPR project?
>
> I realize you are asking for GPR, so by definition you don't care
> about portability, but:
>
> Ada only requires Ada implementations to support library-level
> procedures as the main. See 10.2(29). A particular implementation can
> allow more, but there is no requirement.

This isn't a GPR thing, it's a GNAT thing: GNAT has no extensions here
beyond the requirement.

If you have a minimal bare-board project without any requirement for the
Ada runtime system, it's possible to do what you ask: see Maciej
Sobczak's 'Ada and SPARK on ARM Cortex-M' tutorial[1], in particular the
'First Chapter'[2].

It would be hard (and pointless) to attempt this for a program intended
to run on a typical operating system.

[1] http://www.inspirel.com/articles/Ada_On_Cortex.html
[2] http://www.inspirel.com/articles/Ada_On_Cortex_First_Program.html

  parent reply	other threads:[~2019-01-26 12:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-25 15:12 Package procedure as program entry in GPR project Jesper Quorning
2019-01-25 17:05 ` Jere
2019-01-25 21:42 ` Randy Brukardt
2019-01-26  1:47   ` Jesper Quorning
2019-01-26 12:05   ` Simon Wright [this message]
2019-01-26 12:08     ` Simon Wright
replies disabled

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