This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: Memory maps with gcc and eCos
- To: "Crossgcc (E-mail)" <crossgcc at sources dot redhat dot com>, ecos-discuss at sourceware dot cygnus dot com
- Subject: [ECOS] RE: Memory maps with gcc and eCos
- From: "Simpkins, Andy" <Andy dot Simpkins at Transcomm dot uk dot com>
- Date: Fri, 24 Aug 2001 16:07:53 +0100
> -----Original Message-----
> From: Gary Thomas [mailto:gthomas@redhat.com]
> Sent: 24 August 2001 15:16
> To: Simpkins, Andy
> Cc: ecos-discuss@sourceware.cygnus.com
> Subject: RE: [ECOS] memory map question
>
>
>
> On 24-Aug-2001 Simpkins, Andy wrote:
> > Hi there,
> >
> > I am trying to map some data to a specific address in FLASH
> on my custom
> > target board (ARM7TDMI core)
> >
> > The data is defined as
> >
> > unsigned char globalArchive[] __attribute__ ((section
> (".ivoryDataStore")))
> > =
> > {0x04, 0x18, 0x00, 0x00, 0x81);
> >
> >
> > I have added the following to arm.ld
> >
> >#define SECTION_ivoryDataStore(_region_, _vma_, _lma_) \
> > .ivoryDataStore _vma_ : _lma_ \
> > { FORCE_OUTPUT; *(.ivoryDataStore) } \
> > > _region_
> >
> > And have attempted to define ivoryDataStore in my memory
> map of the config
> > tool (1.3.1)
> > I kind of hoped that the name would have shown up in the
> drop down box for
> > Linker-defined, as it didn't I had to specify it as user defined...
> >
> > i.e.
> > Name - User-defined: ivoryDataStore
> > - Known Size: 0x2000
> > Final Location (VMA) - Absolute: 0xe0000
> >
> > however when I compile my code I get the following :
> >
> >
> > arm-elf-gcc *.o ../../API/*/*.o -L /i/eCOSbuilds/a166_install/lib/
> > -Ttarget.ld -nostdlib -Xlinker -Map -Xlinker mapfile.txt
> > /tools/H-i686-pc-cygwin/arm-elf/bin/ld: warning: no memory
> region specified
> > for
> > section `.ivoryDataStore'
>
> Does .ivoryDataStore end up in your "target.ld" file (the
> linker script)? If
> not, it's a problem with the macros & sections.
>
not quite, I get
__ivoryDataStore = 0xe0000; . = __ivoryDataStore + 0x20000;
where as the items that apper in the eCos config tool as 'linker defined'
look like
.rodata ALIGN (0x4) : { . = . ; *(.rodata*) } > rom
I assumed that this is because the code is at an absolute address, however I
can not understand why I get a doubble underscore at the start instead of a
period...
By forcing the file target.ld to contain the ivoryDataStore entry as
.ivoryDataStore 0xe0000 : { . = . ; *(.ivoryDataStore*) } > rom
my build works (i.e. the data ends up in the correct memory location.
As you suggested theer is obiously a script error somewhere; I shall post my
findings..
Andy