comp.lang.ada
 help / color / mirror / Atom feed
From: "Rolf" <rolf.ebert_nospam_@gmx.net>
Subject: Named Address Spaces
Date: 20 Sep 2005 08:46:29 -0700
Date: 2005-09-20T08:46:29-07:00	[thread overview]
Message-ID: <1127231189.761731.126800@g14g2000cwa.googlegroups.com> (raw)

Some embedded processors have separate address spaces, like IO, EEPROM,
FLASH, ROM, RAM, external memory.  Accessing variables in the different
address spaces requires special assembler instructions for these
processors.  The AVR processors for example have special instructions
for reading and writing IO ports and for reading flash memory they
transfer byte by byte to a special register.  Obviously the compiler
has to know about these special instructions.

I am more concerned about the programmer visible implications of
separate address spaces.  It is still the programmer's responsibility
to decide where to place a variable, e.g. EEPROM or flash.  To my
knowledge, the language has no construct to specifiy a segment where to
place a variable.  GNAT has a pragma Linker_Section that helps placing
a variable into a special section, but that is not standard to my
knowledge (and then GNAT does not know that special sections must be
accessed differently, but that is a different issue.)

  Flash_String : constant String := "I live in read only memory";
  pragma Linker_Section (".progmem");

How do other compilers approach that problem?

As Ada has many constructs that help for embedded systems, is there a
standard way for placing variables and constants into specific separate
address spaces?

    Rolf




             reply	other threads:[~2005-09-20 15:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-20 15:46 Rolf [this message]
2005-09-20 16:46 ` Named Address Spaces Samuel Tardieu
replies disabled

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