comp.lang.ada
 help / color / mirror / Atom feed
Subject: Re: Importing ld memory defintions into ada code
Date: Fri, 08 Aug 2003 16:17:11 +0200
Date: 2003-08-08T16:17:11+02:00	[thread overview]
Message-ID: <3f33b0ed$1@epflnews.epfl.ch> (raw)
In-Reply-To: 8cd0c91f.0308080200.3755802a@posting.google.com

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




  reply	other threads:[~2003-08-08 14:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-08 10:00 Importing ld memory defintions into ada code Rich
2003-08-08 14:17 `  [this message]
2003-08-09 16:02 ` John R. Strohm
replies disabled

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