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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f682e320f3b1bea8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-08-08 07:17:29 PST Date: Fri, 08 Aug 2003 16:17:11 +0200 From: =?ISO-8859-1?Q?Rodrigo_Garc=EDa?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020513 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Importing ld memory defintions into ada code References: <8cd0c91f.0308080200.3755802a@posting.google.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: lglpc31.epfl.ch Message-ID: <3f33b0ed$1@epflnews.epfl.ch> X-Trace: epflnews.epfl.ch 1060352237 128.178.76.8 (8 Aug 2003 16:17:17 +0200) Organization: EPFL Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed.tiscali.ch!solnet.ch!solnet.ch!130.59.10.21.MISMATCH!irazu.switch.ch!news-zh.switch.ch!switch.ch!epflnews.epfl.ch!not-for-mail Xref: archiver1.google.com comp.lang.ada:41252 Date: 2003-08-08T16:17:11+02:00 List-Id: Rich wrote: > Is it possible to use the linker directive definitions for memory > sections in ada? > I want to create a constant in ada that is initialised to the ld > memory definition. > i.e. > > ld file; > > MEMORY { > Buffer : ORIGIN = 0x00000000, LENGTH = 256 > dram_memory : ORIGIN = ., LENGTH = 1M - 256 > } > > Ada file; > > MY_BUFFER : constant ADDRESS_TYPE := Import ld definition of buffer. > > I would prefer to do this the other way around but i seriously doubt > that is possible. > > If none of this is possible then i will just have to make duplicate > definitions of the same value. > > Regards, > Rich Try with a representation attribute (see RM 13.3) to do it the other way round: for My_Buffer'Address use System.Storage_Elements.To_Address (address); Rodrigo