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!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Best representation for spares Date: Sun, 16 Feb 2014 20:50:33 +0200 Organization: Tidorum Ltd Message-ID: References: <215f6df2-a7ec-42f4-ac82-656d5b12bf61@googlegroups.com> <8383f5d6-3f66-415b-ab3f-8801fa377a6b@googlegroups.com> <8200939f-9bbd-44dd-848c-00c663f37121@googlegroups.com> <1e41e2d6-7ff8-445d-9c14-14c49b244bcf@googlegroups.com> <64d96ab9-ef9e-46b1-ac3b-3924766abaf6@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: individual.net qO2f9p0yMrxB5yXrXn8hggXJqA0s5ZZn4QeEmM7Zpem5NcXp/1 Cancel-Lock: sha1:q4Cstu7ed98jSzUPr+MGVATz6Vc= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 In-Reply-To: <64d96ab9-ef9e-46b1-ac3b-3924766abaf6@googlegroups.com> Xref: news.eternal-september.org comp.lang.ada:18624 Date: 2014-02-16T20:50:33+02:00 List-Id: On 14-02-16 18:26 , Rego, P. wrote: > On Sunday, February 16, 2014 10:40:11 AM UTC-3, Rego, P. wrote: >> I did not get. Is is better to use >> Auxiliary_Peripherals_Register_Map: >> Auxiliary_Peripherals_Register_Map_Type >> := (others => <>); >> or just initialize in system initialization? >> (or both?) > > Now I guess RPi board talked to me :-) > I tried to use both approaches joint and separately, and in all > initialization attempts from definition I got an > > raised STORAGE_ERROR : stack overflow (or erroneous memory access) > > which only was resolved when I removed both initializations > kinds. So it seems to be safer to initialize the registers > in run-time, inside a specific initialize procedure. Oho, Raspberry Pi? Probably not bare-board, so which OS? In general OSes, I/O registers are typically *not* directly accessible from user processes, so the exception is probably coming from an erroneous memory access. That is, the address of the MMIO register is not accessible to your process, which runs in its own virtual memory address space. If this is the reason for the error, it will happen also if you use an assignment statement to set the register from some initialization procedure. You either have to use a driver, or take some action to map the MMIO address into your process space. I don't know how this works on the RPi. I found some advice at https://sites.google.com/site/semilleroadt/raspberry-pi-tutorials/gpio; I assume some moore googling will bring lots of info. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .