From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: setting an address with pure? Date: Tue, 14 Jul 2015 08:42:18 +0100 Organization: A noiseless patient Spider Message-ID: References: <2a4e8a0e-312c-4c99-977c-a1d1f41c3226@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="c762050aff3a30866fa7e79999b14776"; logging-data="17780"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/QmvaEEhDOM2Av0uU4rxHvrdTNbwVeKTY=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:tz/kVvo5lraNA7uF5vymX7va8hk= sha1:eMTu0HSBiKJQnUHZq4tZg/lO+mI= Xref: news.eternal-september.org comp.lang.ada:26812 Date: 2015-07-14T08:42:18+01:00 List-Id: Simon Wright writes: > "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 See also pragma Allow_Integer_Address!!!