This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Running code from external ram on the AT91SAM7SE
On 11/6/07, Andrew Lunn <andrew@lunn.ch> wrote:
> > Thanks for the assembly clarification.
> > I've verified it: it's the RAM startup that gets called. I'm getting
> > into start because the start address is set in the ELF file (first,
> > the CPSR register is set and then the start is called)
> >
> > The init_flag is not zero, not even the first time the code gets
> > called, that explains the looping.
>
> That is significant and probably indicates a bigger problem.
>
> Are you sure your data section is getting loaded? Do an
> arm-elf-objdump --headers on your image and see what flags are on the
> data section.
>
> Andrew
>
I have checked the flags on the data section: (see below for the
complete output of objdump --header)
15 .data 00000264 20000180 202047d0 00010180 2**2
CONTENTS, ALLOC, LOAD, DATA
The one thing I find strange is that it says DATA and not CODE. I
would have expected to see CODE. My experience with PowerPC based
platforms is that the data section is flagged as CODE, is this perhaps
different for ARM?
Tom
main: file format elf32-littlearm
Sections:
Idx Name Size VMA LMA File off Algn
0 .debug_aranges 000006d0 00000000 00000000 000103e4 2**0
CONTENTS, READONLY, DEBUGGING
1 .debug_pubnames 00000be7 00000000 00000000 00010ab4 2**0
CONTENTS, READONLY, DEBUGGING
2 .debug_info 0000a004 00000000 00000000 0001169b 2**0
CONTENTS, READONLY, DEBUGGING
3 .debug_abbrev 00001970 00000000 00000000 0001b69f 2**0
CONTENTS, READONLY, DEBUGGING
4 .debug_line 000055c5 00000000 00000000 0001d00f 2**0
CONTENTS, READONLY, DEBUGGING
5 .debug_frame 00001180 00000000 00000000 000225d4 2**2
CONTENTS, READONLY, DEBUGGING
6 .debug_str 000026ea 00000000 00000000 00023754 2**0
CONTENTS, READONLY, DEBUGGING
7 .rom_vectors 00000040 20200000 20200000 00008000 2**0
CONTENTS, ALLOC, LOAD, READONLY, CODE
8 .text 000045b4 20200040 20200040 00008040 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
9 .fini 00000000 202045f4 202045f4 00025e3e 2**0
CONTENTS
10 .rodata 000001da 202045f4 202045f4 0000c5f4 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
11 .rodata1 00000000 202047d0 202047d0 00025e3e 2**0
CONTENTS
12 .fixup 00000000 202047d0 202047d0 00025e3e 2**0
CONTENTS
13 .gcc_except_table 00000000 202047d0 202047d0 00025e3e 2**0
CONTENTS
14 .fixed_vectors 00000140 20000040 20000040 00025e40 2**5
CONTENTS, READONLY
15 .data 00000264 20000180 202047d0 00010180 2**2
CONTENTS, ALLOC, LOAD, DATA
16 .bss 000081e0 200003e4 200003e4 000003e4 2**5
ALLOC
17 .comment 00000168 00000000 00000000 00025f80 2**0
CONTENTS, READONLY
18 .debug_ranges 000000c8 00000000 00000000 000260e8 2**0
CONTENTS, READONLY, DEBUGGING
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss