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: Questions about eb40a port


Hi Konsti

I used the eco2.0 b1 and the tools in the same package to compile my source 
code. I try that on both Linux and Cygwin, it works!! I don't have external 
memory in my eb40a, therefore I have to make some changes to the Memory layout 
file to make it works

For the RAM version:
I made some change to the .ldi file and the .h file for the RAM

Here are the changes for the .h file:

#define CYGMEM_REGION_ram (0x00000000)
#define CYGMEM_REGION_ram_SIZE (0x00020000)
#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)

Here are the changes for the .h file:

MEMORY
{
    ram  : ORIGIN = 0x00000000, LENGTH = 0x00020000
}

SECTIONS
{
    SECTIONS_BEGIN
    SECTION_fixed_vectors (ram, 0x20, LMA_EQ_VMA)
    SECTION_rom_vectors (ram, 0x00200, 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_fixup (ram, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_gcc_except_table (ram, ALIGN (0x4), 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
}

I try that and it works!!

This morning I try to work on the ROMRAM version, it seems working fine too.
For the ROMRAM version, you have to make sure the flash, ram and the data copy 
section is correct for your eb40a configuration. Take a look at the 
hal_platform_setup.h file to make sure it matches with your configuration

Wilson



----------------------------------------
This mail sent through www.mywaterloo.ca

-- 
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]