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: about porting ecos in S3C4510B development board


On Fri, 2004-02-13 at 03:51, Hu Ying wrote:
> Hi Jonathan,
> 
>    can you give me one example on how to modify the RAM base address? I
> tried but still got the same problem.
> 
>    The following are my *.ldi and *.h files:
> 
> 
> *****************
> *****rom.ldi
>     // 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
> {
>     ram : ORIGIN = 0, LENGTH = 0x2000000
>     rom : ORIGIN = 0x2800000, LENGTH = 0x200000
> }
> 
> SECTIONS
> {
>     SECTIONS_BEGIN
>     SECTION_rom_vectors (rom, 0x2800000, 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 (ram, 0x20, LMA_EQ_VMA)
>     SECTION_data (ram, 0x30000, FOLLOWING (.gcc_except_table))
>     SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA)
>     CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
>     SECTIONS_END
> }

This doesn't look right to me - the RAM used by the ROM mode should
simply start at 0x20 and flow upward (unless you have fixed space like
for MMU tables as is done on some ARM platforms).  Certainly you don't
want to be changing this (SECTION_data) value to be the same as what it
used by your RAM setup - they need to be distinct and not overlapping.

> 
> *************
> ****ram.ldi
> // eCos memory layout - Tue Feb 29 14:11:30 2000
> 
> // This is a generated file - do not edit
> 
> #include <cyg/infra/cyg_type.inc>
> 
> MEMORY
> {
>     ram : ORIGIN = 0x000000, LENGTH = 0x02000000
> }
> 
> SECTIONS
> {
>     SECTIONS_BEGIN
>     SECTION_fixed_vectors (ram, 0x200, LMA_EQ_VMA)
>     SECTION_rom_vectors (ram, 0x00030000, 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
> }
> 
> 
> ***************
> *****rom.h
> // eCos memory layout - Wed Apr 11 13:49:55 2001
> 
> // This is a generated file - do not edit
> 
> #ifndef __ASSEMBLER__
> #include <cyg/infra/cyg_type.h>
> #include <stddef.h>
> 
> #endif
> #define CYGMEM_REGION_ram (0)
> #define CYGMEM_REGION_ram_SIZE (0x2000000)
> #define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)
> #define CYGMEM_REGION_rom (0x2800000)
> #define CYGMEM_REGION_rom_SIZE (0x200000)
> #define CYGMEM_REGION_rom_ATTR (CYGMEM_REGION_ATTR_R)
> #ifndef __ASSEMBLER__
> extern char CYG_LABEL_NAME (__heap1) [];
> #endif
> #define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1))
> #define CYGMEM_SECTION_heap1_SIZE (0x2000000 - (size_t) CYG_LABEL_NAME
> (__heap1))
> 
> 
> ****************
> *****ram.h
> // eCos memory layout - Tue Feb 29 14:11:30 2000
> 
> // This is a generated file - do not edit
> 
> #include <cyg/infra/cyg_type.h>
> #include <stddef.h>
> 
> #define CYGMEM_REGION_ram (0)
> #define CYGMEM_REGION_ram_SIZE (0x02000000)
> #define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)
> #ifndef __ASSEMBLER__
> extern char CYG_LABEL_NAME (__heap1) [];
> #endif
> #define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1))
> #define CYGMEM_SECTION_heap1_SIZE (0x02000000 - (size_t) CYG_LABEL_NAME
> (__heap1))
> 
> 
> Thanks!
> 
> 
> 
> -----Original Message-----
> From: ecos-discuss-owner@ecos.sourceware.org
> [mailto:ecos-discuss-owner@ecos.sourceware.org]On Behalf Of Jonathan Larmour
> Sent: Thursday, February 12, 2004 10:22 PM
> To: ying_hu@alliedtelesyn.com
> Cc: Ecos-Discuss (E-mail)
> Subject: Re: [ECOS] about porting ecos in S3C4510B development board
> 
> 
> Hu Ying wrote:
> > Hi Jonathan,
> >
> >    Thanks for your help.Now Redboot is working.
> >
> >     I followed the example on provided in the book "Embedded software
> > development with eCos", by Anthony J.Massa, P.300
> >
> > But when I tried to load file using Redboot, I got the following error
> > message:
> >
> >  Copyright (C) 2000, 2001, 2002, Red Hat, Inc.
> >
> > RAM: 0x00000000-0x02000000, 0x00024628-0x02000000 available
> > RedBoot> load -v -m ymodem
> > *** Abort! Attempt to load S-record to address: 0x00020000, which is not
> in
> > RAM
> > xyzModem - CRC mode, 1(SOH)/1(STX)/0(CAN) packets, 3 retries
> >
> > what does cause this problem?
> 
> Your RedBoot is using quite a bit of RAM, and the RAM app is built to use
> an address within it. You need to change the RAM base address in the mlt
> files.
> 
> Jifl
> --
> eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
> Visit us at Embedded World 2004, Nürnberg, Germany, 17-19 Feb, Stand 12-449
> --["No sense being pessimistic, it wouldn't work anyway"]-- Opinions==mine
> 
> 
> --
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


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


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