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: Representation clauses and side-efects on STM32F411 ravenscar runtime Date: Sun, 02 Aug 2015 16:19:33 +0100 Organization: A noiseless patient Spider Message-ID: References: <55bddbe2$0$3384$426a74cc@news.free.fr> <55be2e9e$0$3318$426a74cc@news.free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: mx02.eternal-september.org; posting-host="fbe1d5b0173017f7cc2ccfa8ad3bc8c1"; logging-data="14080"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+EAdNscswMXchV+oSgDyF7dnlhh5KrJpY=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:bFNfmgEEywYz/f79+HHikGimwbE= sha1:GgyOJD8xJ9fet5f5kIAUUcPU2Hs= Xref: news.eternal-september.org comp.lang.ada:27328 Date: 2015-08-02T16:19:33+01:00 List-Id: Frédéric Praca writes: > Yes, I've done this later in the code defining the whole register : > USART1 : USART_Registers with Volatile, > Address => System'To_Address (USART1_Base); I wrote a script[1] to convert the output of -fdump-ada-spec on stm32f429xx.h into something more useful, and I made the record definitions Volatile rather than the object declarations. I can't now remember why .. ah, the log says that -fdump-ada-spec didn't handle the case where record components were marked volatile (_IO) in the C source, so defining the whole record as Volatile was the next step. [1] https://sourceforge.net/p/stm32f4-gnat-rts/code/ci/default/tree/stm32f429i-disco-bsp/transform.sed