This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: porting to Atmel-AT91, stub memory-layout, .bss does



On 30-Oct-2000 Andreas Bürgel wrote:
> Hi,
> 
> I'm porting eCos to a custom board with the Atmel AT91 processor
> (ARM7TDMI-core, 8kB on-chip SRAM), using the edb7xxx as template.
> After processor-reset the processor has the following memory map:
> 
> 0x00000000 - 0x000FFFFF  external device such as boot-PROM/Flash
> 0x00300000 - 0x0031FFFF  8kB on-chip SRAM
> 0xFFC00000 - 0xFFFFFFFF  on-chip peripherals I/O
> other address-space is reserved
> 
> So I wrote the following ldi-file:
> MEMORY
> {
>     rom : ORIGIN = 0, LENGTH = 0x80000
>     reserved : ORIGIN = 0x100000, LENGTH = 0x200000
>     onchip_ram : ORIGIN = 0x300000, LENGTH = 0x2000
>     reserved2 : ORIGIN = 0x302000, LENGTH = 0xff8fe000
>     peripheral : ORIGIN = 0xffc00000, LENGTH = 0x3fffff
> }
> 
> SECTIONS
> {
>     SECTIONS_BEGIN
>     SECTION_rom_vectors    (rom, 0,           LMA_EQ_VMA)
>     SECTION_rodata         (rom, ALIGN (0x4), LMA_EQ_VMA)
>     SECTION_text           (rom, ALIGN (0x4), LMA_EQ_VMA)
>     SECTION_data           (rom, ALIGN (0x4), LMA_EQ_VMA)
>     SECTION_bss            (onchip_ram, 0x300000, LMA_EQ_VMA)
>     SECTIONS_END
> }
> 
> When I'm compiling the GDB-Stub, the linkers says
> "/tools/H-i686-pc-linux-gnu/arm-elf/bin/ld: address 0x302dbc of
> /boeller/home/andreas/develop/eCos/AT91/install/bin/gdb_module.img
> section .bss is not within region onchip_ram"
> 
> Who eats up the on-chip ram space? The stub isn't much more than a
> skeleton.

The two largest contributors here seem to be the startup stack (4K)
and the GDB remote communication buffers (4K).  Even if you could 
totally eliminate them, which you can't, you'd barely be under 
your 8K total.

But then what?  What do you expect to do with a system that has
no other memory?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]