public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] memory address for redboot and application
@ 2006-09-13 15:09 qin zhao
  2006-09-13 15:14 ` Andrew Lunn
  0 siblings, 1 reply; 6+ messages in thread
From: qin zhao @ 2006-09-13 15:09 UTC (permalink / raw)
  To: ecos-discuss

Hi,

I'm working on AT91RM9200 EK. I need to do some test, such as reading
data from and writing data to the memory of at91rm9200. But before
doing that, I need to know the memory address of redboot and my
application, i.e. target.ld, so that I will not destroy them during
the test. Does anybody know where it is or how to find it? Thanks!

Best Regards,

Qin

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] memory address for redboot and application
  2006-09-13 15:09 [ECOS] memory address for redboot and application qin zhao
@ 2006-09-13 15:14 ` Andrew Lunn
  2006-09-13 15:16   ` Claudio Di Vittorio
  2006-09-14  9:45   ` qin zhao
  0 siblings, 2 replies; 6+ messages in thread
From: Andrew Lunn @ 2006-09-13 15:14 UTC (permalink / raw)
  To: qin zhao; +Cc: ecos-discuss

On Wed, Sep 13, 2006 at 05:09:31PM +0200, qin zhao wrote:
> Hi,
> 
> I'm working on AT91RM9200 EK. I need to do some test, such as reading
> data from and writing data to the memory of at91rm9200. But before
> doing that, I need to know the memory address of redboot and my
> application, i.e. target.ld, so that I will not destroy them during
> the test. Does anybody know where it is or how to find it? Thanks!

As you said, target.ld. This is build from .ldi files in
<HAL>/include/pkgconf/ . Take a look at these files for your HAL.
You can also use 

arm-elf-objdump --headers

on the elf images for redboot and the application to see where it is
loaded and what RAM it uses.

       Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] memory address for redboot and application
  2006-09-13 15:14 ` Andrew Lunn
@ 2006-09-13 15:16   ` Claudio Di Vittorio
  2006-09-14  9:45   ` qin zhao
  1 sibling, 0 replies; 6+ messages in thread
From: Claudio Di Vittorio @ 2006-09-13 15:16 UTC (permalink / raw)
  To: qin zhao; +Cc: ecos-discuss

did you tryied with

RedBoot> fis list

it shows you the FLASH and MEM location of flash

--- Andrew Lunn <andrew@lunn.ch> ha scritto: 

> On Wed, Sep 13, 2006 at 05:09:31PM +0200, qin zhao
> wrote:
> > Hi,
> > 
> > I'm working on AT91RM9200 EK. I need to do some
> test, such as reading
> > data from and writing data to the memory of
> at91rm9200. But before
> > doing that, I need to know the memory address of
> redboot and my
> > application, i.e. target.ld, so that I will not
> destroy them during
> > the test. Does anybody know where it is or how to
> find it? Thanks!
> 
> As you said, target.ld. This is build from .ldi
> files in
> <HAL>/include/pkgconf/ . Take a look at these files
> for your HAL.
> You can also use 
> 
> arm-elf-objdump --headers
> 
> on the elf images for redboot and the application to
> see where it is
> loaded and what RAM it uses.
> 
>        Andrew
> 
> -- 
> Before posting, please read the FAQ:
> http://ecos.sourceware.org/fom/ecos
> and search the list archive:
> http://ecos.sourceware.org/ml/ecos-discuss
> 
> 



	
	
		
___________________________________ 
Yahoo! Messenger with Voice: chiama da PC a telefono a tariffe esclusive 
http://it.messenger.yahoo.com

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] memory address for redboot and application
  2006-09-13 15:14 ` Andrew Lunn
  2006-09-13 15:16   ` Claudio Di Vittorio
@ 2006-09-14  9:45   ` qin zhao
  2006-09-14 11:51     ` Andrew Lunn
  1 sibling, 1 reply; 6+ messages in thread
From: qin zhao @ 2006-09-14  9:45 UTC (permalink / raw)
  To: qin zhao, ecos-discuss

Hi,

I did look at xxx_ram.ldi and it has the following lines:


MEMORY
{
    ram : ORIGIN = 0, LENGTH = 0x800000
    sram : ORIGIN = 0x70000000, LENGTH = 0x4000
}

SECTIONS
{
    SECTIONS_BEGIN
    SECTION_fixed_vectors (ram, 0x20, LMA_EQ_VMA)
    SECTION_rom_vectors (ram, 0x40000, LMA_EQ_VMA)
    SECTION_RELOCS (ram, ALIGN (0x1), LMA_EQ_VMA)
    SECTION_text (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_rodata (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_rodata1 (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_got (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_gcc_except_table (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_eh_frame (ram, ALIGN (0x04), LMA_EQ_VMA)
    SECTION_data (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA)
    CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
    SECTIONS_END
}

where I could not find the information for redboot and application.

Also I did use arm-elf-objdump --headers and got the following:

a.out:     file format elf32-littlearm

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .debug_aranges 000017a0  00000000  00000000  00018830  2**3
                  CONTENTS, READONLY, DEBUGGING
  1 .debug_pubnames 000037ef  00000000  00000000  00019fd0  2**0
                  CONTENTS, READONLY, DEBUGGING
  2 .debug_info   00059e38  00000000  00000000  0001d7bf  2**0
                  CONTENTS, READONLY, DEBUGGING
  3 .debug_abbrev 00009702  00000000  00000000  000775f7  2**0
                  CONTENTS, READONLY, DEBUGGING
  4 .debug_line   0000de71  00000000  00000000  00080cf9  2**0
                  CONTENTS, READONLY, DEBUGGING
  5 .debug_frame  00003824  00000000  00000000  0008eb6c  2**2
                  CONTENTS, READONLY, DEBUGGING
  6 .debug_str    00009a15  00000000  00000000  00092390  2**0
                  CONTENTS, READONLY, DEBUGGING
  7 .fixed_vectors 00000140  00000020  00000020  0009bdc0  2**5
                  CONTENTS, READONLY
  8 .rom_vectors  00000040  00040000  00040000  00008000  2**0
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  9 .text         0000feb0  00040040  00040040  00008040  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
 10 .fini         00000000  0004fef0  0004fef0  0009bf00  2**0
                  CONTENTS
 11 .rodata       00000450  0004fef0  0004fef0  00017ef0  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 12 .rodata1      00000000  00050340  00050340  0009bf00  2**0
                  CONTENTS
 13 .got          00000000  00050340  00050340  0009bf00  2**0
                  CONTENTS
 14 .fixup        00000000  00050340  00050340  0009bf00  2**0
                  CONTENTS
 15 .gcc_except_table 00000000  00050340  00050340  0009bf00  2**0
                  CONTENTS
 16 .eh_frame     00000008  00050340  00050340  00018340  2**0
                  ALLOC
 17 .data         000004e4  00050348  00050348  00018348  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 18 .bss          0000651c  0005082c  0005082c  0001882c  2**4
                  ALLOC
 19 .comment      000007e0  00000000  00000000  0009bf00  2**0
                  CONTENTS, READONLY
 20 .debug_ranges 00002448  00000000  00000000  0009c6e0  2**0
                  CONTENTS, READONLY, DEBUGGING

from which I also could not find memory address for redboot and
application. Could you give me some hint how to understand the above
two files? Thank you very much.

Best Regards,
Qin

On 9/13/06, Andrew Lunn <andrew@lunn.ch> wrote:
> On Wed, Sep 13, 2006 at 05:09:31PM +0200, qin zhao wrote:
> > Hi,
> >
> > I'm working on AT91RM9200 EK. I need to do some test, such as reading
> > data from and writing data to the memory of at91rm9200. But before
> > doing that, I need to know the memory address of redboot and my
> > application, i.e. target.ld, so that I will not destroy them during
> > the test. Does anybody know where it is or how to find it? Thanks!
>
> As you said, target.ld. This is build from .ldi files in
> <HAL>/include/pkgconf/ . Take a look at these files for your HAL.
> You can also use
>
> arm-elf-objdump --headers
>
> on the elf images for redboot and the application to see where it is
> loaded and what RAM it uses.
>
>       Andrew
>

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] memory address for redboot and application
  2006-09-14  9:45   ` qin zhao
@ 2006-09-14 11:51     ` Andrew Lunn
  2006-09-14 13:13       ` Nick Garnett
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Lunn @ 2006-09-14 11:51 UTC (permalink / raw)
  To: qin zhao; +Cc: ecos-discuss

On Thu, Sep 14, 2006 at 11:45:33AM +0200, qin zhao wrote:
> Hi,
> 
> I did look at xxx_ram.ldi and it has the following lines:

this is for the application.
 
 
> MEMORY
> {
>    ram : ORIGIN = 0, LENGTH = 0x800000
>    sram : ORIGIN = 0x70000000, LENGTH = 0x4000

These two tell you where you have RAM and SRAM. Not very interesting
in its own.

> }
> 
> SECTIONS
> {
>    SECTIONS_BEGIN
>    SECTION_fixed_vectors (ram, 0x20, LMA_EQ_VMA)
>    SECTION_rom_vectors (ram, 0x40000, LMA_EQ_VMA)

This is saying that the application is loaded at address 0x40000. The
memory below that, except a small amount at 0x20 is not being used by
the application. However RedBoot is probably using that memory.

> where I could not find the information for redboot and application.
> 
> Also I did use arm-elf-objdump --headers and got the following:
> 
> a.out:     file format elf32-littlearm
> 
> Sections:
> Idx Name          Size      VMA       LMA       File off  Algn
>  0 .debug_aranges 000017a0  00000000  00000000  00018830  2**3
>                  CONTENTS, READONLY, DEBUGGING
>  1 .debug_pubnames 000037ef  00000000  00000000  00019fd0  2**0
>                  CONTENTS, READONLY, DEBUGGING
>  2 .debug_info   00059e38  00000000  00000000  0001d7bf  2**0
>                  CONTENTS, READONLY, DEBUGGING
>  3 .debug_abbrev 00009702  00000000  00000000  000775f7  2**0
>                  CONTENTS, READONLY, DEBUGGING
>  4 .debug_line   0000de71  00000000  00000000  00080cf9  2**0
>                  CONTENTS, READONLY, DEBUGGING
>  5 .debug_frame  00003824  00000000  00000000  0008eb6c  2**2
>                  CONTENTS, READONLY, DEBUGGING
>  6 .debug_str    00009a15  00000000  00000000  00092390  2**0
>                  CONTENTS, READONLY, DEBUGGING

All the sections above contain debug information and are not loaded
onto the target.

>  7 .fixed_vectors 00000140  00000020  00000020  0009bdc0  2**5
>                  CONTENTS, READONLY

This shows that 0x140 bytes are loaded to address 0x20.

>  8 .rom_vectors  00000040  00040000  00040000  00008000  2**0
>                  CONTENTS, ALLOC, LOAD, READONLY, CODE

0x40 bytes at address 0x40000

>  9 .text         0000feb0  00040040  00040040  00008040  2**2
>                  CONTENTS, ALLOC, LOAD, READONLY, CODE

0xfeb0 bytes at 0x40040

> 10 .fini         00000000  0004fef0  0004fef0  0009bf00  2**0
>                  CONTENTS
> 11 .rodata       00000450  0004fef0  0004fef0  00017ef0  2**2
>                  CONTENTS, ALLOC, LOAD, READONLY, DATA
> 12 .rodata1      00000000  00050340  00050340  0009bf00  2**0
>                  CONTENTS
> 13 .got          00000000  00050340  00050340  0009bf00  2**0
>                  CONTENTS
> 14 .fixup        00000000  00050340  00050340  0009bf00  2**0
>                  CONTENTS
> 15 .gcc_except_table 00000000  00050340  00050340  0009bf00  2**0
>                  CONTENTS
> 16 .eh_frame     00000008  00050340  00050340  00018340  2**0
>                  ALLOC
> 17 .data         000004e4  00050348  00050348  00018348  2**2
>                  CONTENTS, ALLOC, LOAD, DATA
> 18 .bss          0000651c  0005082c  0005082c  0001882c  2**4
>                  ALLOC

This is the last section which uses memory, ie 0x651c bytes at
0x5082c. The heap will start at (0x5082c + 0x651c) and go to the top
of memory.

   Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] memory address for redboot and application
  2006-09-14 11:51     ` Andrew Lunn
@ 2006-09-14 13:13       ` Nick Garnett
  0 siblings, 0 replies; 6+ messages in thread
From: Nick Garnett @ 2006-09-14 13:13 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: qin zhao, ecos-discuss

Andrew Lunn <andrew@lunn.ch> writes:

> 
> >  7 .fixed_vectors 00000140  00000020  00000020  0009bdc0  2**5
> >                  CONTENTS, READONLY
> 
> This shows that 0x140 bytes are loaded to address 0x20.

Actually, since this section doesn't have the LOAD flag, nothing will
get loaded. This section just supplies a set of labels for the VSR and
virtual vector tables, which are shared with RedBoot.


-- 
Nick Garnett                                 eCos Kernel Architect
http://www.ecoscentric.com            The eCos and RedBoot experts


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-09-14 13:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-13 15:09 [ECOS] memory address for redboot and application qin zhao
2006-09-13 15:14 ` Andrew Lunn
2006-09-13 15:16   ` Claudio Di Vittorio
2006-09-14  9:45   ` qin zhao
2006-09-14 11:51     ` Andrew Lunn
2006-09-14 13:13       ` Nick Garnett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).