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]
Other format: [Raw text]

RE: ROMRAM start on ARM platform


Gary Thomas wrote:

> As for what you were trying to do, I'm not sure that MLT is the place
> to specify this directly.  Can you explain a little more how 
> the memory
> map changes with jumpers?  There may be other ways to solve this.

The EB40 has one single flash chip, an AT29LV1024 which is 128KB. The
board ships with the Angel boot monitor installed in the lower 64 KB;
these addresses are write-protected by hardware, leaving the upper 64KB
for application programs. There is a switch that changes the address
decoding so that only the upper half of the flash is visible and a reset
directly starts code located there. The write protection on the lower half
of the flash can be removed by soldering a bridge or jumper to the board,
which would then allow to overwrite the Angel monitor and use the entire
flash for (ecos) applications.

The ecos EB40 platform HAL only supports the board in the factory
configuration. Since 64KB is only sufficient for tiny programs, a very
minimal redboot for example, it would greatly enhance the boards usefulness
if all of the flash memory were available. The ecos .ldi file accounts for
the lower half of the flash being unavailable in the following way:

// eCos memory layout - Wed Apr 11 13:49:55 2001

// This is a generated file - do not edit

#include <cyg/infra/cyg_type.inc>

MEMORY
{
    sram : ORIGIN = 0x00000000, LENGTH = 0x2000
    ram : ORIGIN = 0x02000000, LENGTH = 0x80000
    rom : ORIGIN = 0x01000000, LENGTH = 0x20000
}

SECTIONS
{
    SECTIONS_BEGIN
    CYG_LABEL_DEFN(__reserved_bootmon) = 0x01000000; . =
CYG_LABEL_DEFN(__reserved_bootmon) + 0x10000;
    SECTION_rom_vectors (rom, ALIGN (0x8), LMA_EQ_VMA)
    SECTION_text (rom, ALIGN (0x1), LMA_EQ_VMA)
    SECTION_fini (rom, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_rodata (rom, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_rodata1 (rom, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_fixup (rom, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_gcc_except_table (rom, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_fixed_vectors (sram, 0x20, LMA_EQ_VMA)
    SECTION_data (ram, 0x02000000, FOLLOWING (.gcc_except_table))
    SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA)
    CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
    SECTIONS_END
}


My idea was to make the '__reserved_bootmon' stuff a configurable option,
so it could be enabled or disabled via cdl, but that would of course require
modification of the .ldi file and the related memory layout header (to
#include
the header files generated from cdl). The only other option would be to
create
an additional set of .ldi and .h files, named differently, and select
between
those sets via cdl. I feel that's a rather clumsy solution, especially if
there
were more than two memory layouts to choose between. Or, of course, I could
fork
the entire HAL (EB40-small vs. EB40-big), an even more awkward solution.

To me it still seems much more natural to handle these things via cdl,
instead of
detaching the memory layout definition from everything else and mandate use
of a
separate tool for this task, that is not even available on the prefered
development
platform.

tk

----------------------------------------------- 
Thomas Koeller, Software Development 

Basler Vision Technologies 
An der Strusbek 60-62 
22926 Ahrensburg 
Germany 

Tel +49 (4102) 463-390 
Fax +49 (4102) 463-46390

mailto:Thomas.Koeller@baslerweb.com 
http://www.baslerweb.com 



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


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