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: Andrew Lunn <andrew at lunn dot ch>
- To: Harshit Suri <h dot r dot suri at gmail dot com>
- Cc: eCos Discussion <ecos-discuss at ecos dot sourceware dot org>
- Date: Thu, 27 Jan 2005 09:37:47 +0100
- Subject: Re: [ECOS] cyg_user_start fails to start
- References: <a2ced48c05012617425ba8cede@mail.gmail.com>
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