comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: setting an address with pure?
Date: Tue, 14 Jul 2015 08:38:36 +0100
Date: 2015-07-14T08:38:36+01:00	[thread overview]
Message-ID: <lyvbdnjiir.fsf@pushface.org> (raw)
In-Reply-To: 2a4e8a0e-312c-4c99-977c-a1d1f41c3226@googlegroups.com

"RasikaSrinivasan@gmail.com" <RasikaSrinivasan@gmail.com> writes:

> Does it have to be pure?
>
> I use Pragma Restrictions( No_Elaboration_Code );

I don't have any objection to elaboration code per se, I just wanted to
get as near to Pure as I could.

I did use that restriction for a Cortex Reset_Handler, which is called
by the hardware before any elaboration occurs at all.

> then :
>
>    DACMAP : DAC_CR_Type
>           with Volatile ,
>           Address => System'To_Address( 16#NNNN_NNNN# ) ;
>
> I am not sure if this is what you are aiming for but appears to work
> so for. NNNN_NNNN above is the base address of the DAC map as provided
> by the STM32 Ref Manual.

This was just what I wanted, thanks very much!

This is actually in the secret documentation: I would refer to the
gcc.gnu.org version, but it's unreachable at this moment.

http://docs.adacore.com/gnat_rm-docs/html/gnat_rm/gnat_rm/implementation_defined_attributes.html#attribute-to-address


  reply	other threads:[~2015-07-14  7:38 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-10 11:48 Q: setting an address with pure? Simon Wright
2015-07-10 12:03 ` G.B.
2015-07-10 14:38   ` Simon Wright
2015-07-10 22:37 ` Randy Brukardt
2015-07-11  7:47   ` Simon Wright
2015-07-13 19:10     ` Randy Brukardt
2015-07-14  9:36       ` Mark Lorenzen
2015-07-13 23:41   ` RasikaSrinivasan
2015-07-14  7:38     ` Simon Wright [this message]
2015-07-14  7:42       ` Simon Wright
2015-07-11 10:35 ` Q: " Brian Drummond
2015-07-11 13:30   ` Simon Wright
2015-07-11 14:03     ` AdaMagica
2015-07-11 14:27       ` Simon Wright
2015-07-13 18:53         ` Randy Brukardt
2015-07-13 19:50           ` Simon Wright
2015-07-14 12:24     ` Brian Drummond
2015-07-15 15:50       ` rrr.eee.27
2015-07-15 18:45         ` Simon Wright
2015-07-16  9:21         ` Brian Drummond
2015-07-16 18:54           ` Simon Wright
2015-07-16 19:14           ` Randy Brukardt
replies disabled

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