This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: cyg_user_start fails to start
- From: Harshit Suri <h dot r dot suri at gmail dot com>
- To: Harshit Suri <h dot r dot suri at gmail dot com>, eCos Discussion <ecos-discuss at ecos dot sourceware dot org>
- Date: Thu, 27 Jan 2005 10:50:04 -0800
- Subject: Re: [ECOS] cyg_user_start fails to start
- References: <a2ced48c05012617425ba8cede@mail.gmail.com> <20050127083747.GA26130@lunn.ch>
- Reply-to: Harshit Suri <h dot r dot suri at gmail dot com>
Thanks Andrew we have 1 MByte of external SRAM so i tried changing the
hal_platform_setup.h :
FROM ldr r2,=0x02010000
TO ldr r2,=0x020FFFFF
It still doesnt work this time some LEDs on the at91eb40a board stay
permanently on.
did i make the incorrect change?
thanks
On Thu, 27 Jan 2005 09:37:47 +0100, Andrew Lunn <andrew@lunn.ch> wrote:
> On Wed, Jan 26, 2005 at 05:42:15PM -0800, Harshit Suri wrote:
> > The board is based on at91eb40a and has 1MegaByte of external SRAM.
>
> > Code works perfectly in RAMROM startup mode also ONLY IF
> > readBuffer is given a small enough size eg.
> > char readBuffer[1600]={'c'};
>
> This makes it very easy to track down the problem....
>
> Take a look at /packages/hal/arm/at91/eb40a/current/include/hal_platform_setup.h
>
> Around line 115 is:
>
> #if defined(CYG_HAL_STARTUP_ROMRAM)
> ldr r0,=0x01000000 // Relocate FLASH/ROM to on-chip RAM
> ldr r1,=0x02000000 // RAM base & length
> ldr r2,=0x02010000
> 20: ldr r3,[r0],#4
> str r3,[r1],#4
> cmp r1,r2
> bne 20b
> ldr r0,=30f
> mov pc,r0
> 30:
> #endif
>
> This bit of code copies the image from ROM to RAM. As you can see if
> copies a fixed amount.....
>
> Andrew
>
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss