comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Drummond <brian@shapes.demon.co.uk>
Subject: Re: Runtime startup code for the GNAT Runtime...and a bit of humble pie.
Date: Wed, 27 Mar 2013 22:58:19 +0000 (UTC)
Date: 2013-03-27T22:58:19+00:00	[thread overview]
Message-ID: <kivtib$r17$1@dont-email.me> (raw)
In-Reply-To: kiv08v$5d6$1@dont-email.me

On Wed, 27 Mar 2013 14:38:23 +0000, Simon Clubley wrote:

> On 2013-03-27, Brian Drummond <brian@shapes.demon.co.uk> wrote:
>>
> Oh, sorry, I didn't mean to imply that I was seeing poor code in C as a
> result of marking the type itself as volatile, as I am not.

>> The only case of incorrect code generation seen so far has been where a
>> local procedure has been installed as an interrupt handler, and a local
>> variable (volatile) shared between it and the main.
>> Now it is unclear to me whether a local variable is even permitted to
>> be shared with an interrupt handler - or even if the handler is ever
>> permitted to be a local procedure. (

> Even if it appeared to work, I would be _very_ uncomfortable with the
> idea of a local procedure as a interrupt handler. Interrupt handlers are
> supposed to be a global, not localised, concept able to be executed at
> any time.

Agree absolutely. I have also verified that the AVR-Ada compiler 
prohibits local procedures as handlers, and intend to update the MSP 
tools accordingly.

>> However my reading of the Ravenscar profile only supports attaching
>> handlers via pragmas, in library level units - calling Ada.Interrupts.*
>> is a Program Error...
> I would need to read the Ravenscar profile in detail, but I thought the
> idea of a pragma based approach was that the vector table was defined
> during linking instead of at runtime.

Exactly.

> If so, I wonder how that would be compatible with the Atmel SAM7S setup
> I describe above. You may need to create a dummy interrupt table during
> linking and have the startup code populate the SAM7S interrupt registers
> from it.

I see no objection to copying a constant array to the actual interrupt 
registers during startup, should that be necessary.

- Brian

  reply	other threads:[~2013-03-27 22:58 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-18 20:59 Runtime startup code for the GNAT Runtime...and a bit of humble pie Diogenes
2013-03-18 21:14 ` Robert A Duff
2013-03-19  0:07 ` Diogenes
2013-03-19 10:04   ` Brian Drummond
2013-03-19 12:51     ` Simon Clubley
2013-03-19 18:16       ` Ludovic Brenta
2013-03-20  1:05         ` Simon Clubley
2013-03-20 10:13           ` Mike H
2013-03-20 20:44             ` Ludovic Brenta
2013-03-19 21:43       ` Randy Brukardt
2013-03-20  8:24         ` Dmitry A. Kazakov
2013-03-21  0:16           ` Randy Brukardt
2013-03-21 19:08             ` Shark8
2013-03-21 23:34               ` Randy Brukardt
2013-03-22 16:39                 ` Jacob Sparre Andersen
2013-03-23 10:56                   ` Thomas Løcke
2013-03-19 23:13       ` Brian Drummond
2013-03-20  0:54         ` Simon Clubley
2013-03-20 11:50           ` Brian Drummond
2013-03-20 13:18             ` Simon Clubley
2013-03-26 11:04               ` Brian Drummond
2013-03-26 22:38                 ` Simon Clubley
2013-03-27 11:34                   ` Brian Drummond
2013-03-27 14:38                     ` Simon Clubley
2013-03-27 22:58                       ` Brian Drummond [this message]
2013-03-20 14:17           ` Lucretia
2013-03-20 15:00             ` Lucretia
2013-03-21 16:39             ` Brian Drummond
2013-03-23  4:35 ` Diogenes
2013-03-26 21:27 ` Diogenes
2013-03-26 21:57   ` Shark8
2013-03-27  0:28     ` Diogenes
2013-03-27  2:27       ` Shark8
2013-03-27 10:05       ` Brian Drummond
2013-03-27 12:23         ` Simon Wright
2013-03-27 19:07   ` Randy Brukardt
2013-03-27 21:10     ` Diogenes
replies disabled

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