comp.lang.ada
 help / color / mirror / Atom feed
From: "John R. Strohm" <strohm@airmail.net>
Subject: Re: Importing ld memory defintions into ada code
Date: Sat, 9 Aug 2003 11:02:59 -0500
Date: 2003-08-09T11:02:59-05:00	[thread overview]
Message-ID: <bh366p$28e@library1.airnews.net> (raw)
In-Reply-To: 8cd0c91f.0308080200.3755802a@posting.google.com

"Rich" <rich_ard_james@yahoo.co.uk> wrote in message
news:8cd0c91f.0308080200.3755802a@posting.google.com...
> 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.

As I read this, you are saying that you want to control the buffer location
FROM THE LINKER CONTROL FILE.  (Caps for emphasis.)  Presumably, this is
because you have to tie multiple processors together, using shared memory,
and some of the processors are programmed in something other than Ada.  (If
they were all in Ada, you'd use Ada rep specs in a shared package.)

Can you do an assembly language routine, that just returns the value of an
external symbol, which will be bound by the linker, and use "pragma
interface(assembly)" to tie it together?





      parent reply	other threads:[~2003-08-09 16:02 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 ` 
2003-08-09 16:02 ` John R. Strohm [this message]
replies disabled

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