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: "eibach at gdsys dot de" <eibach at gdsys dot de>
- Cc: ecos-discuss at ecos dot sourceware dot org
- Date: Fri, 28 Jan 2005 16:42:43 -0800
- Subject: Re: [ECOS] cyg_user_start fails to start
- References: <DIIE.00000ADF000762C3@gdproxy2.gdsys.de>
- Reply-to: Harshit Suri <h dot r dot suri at gmail dot com>
Thankyou for ure help Andrew,Gary,Dirk
I'm including a step by step note showing steps for resolving the
problem. This is for the benefit for anyone else who might run into
the same problem
1) Change the RX and the TX buffer sizes for the serial port
1.1) Change the CDL file to make configtool provide a larger upper
limit for buffer size for serial port.
1. Open file
ecoscvs/ecos/packages/devs/serial/arm/at91/current/cdl/ser_arm_at91.cdl
2. Change the legal_values in cdl_option
CYGNUM_IO_SERIAL_ARM_AT91_SERIAL1_BUFSIZE to
Legal_values 0 to 65535
1.2) Go to the directory where you built your ROMRAM eCOS library.
Open configtool.
1. Open your ROMRAM .ecc file.
2. Click Serial Device Drivers ï Hardware Serial Device Drivers ï
Atmel AT91 Serial Device Drivers ï Atmel AT91 serial port 1 driver
3. Change the Buffer size for the Atmel AT91 serial port 1 driver to 32000
4. Click Save and close file
2) Change the memory initialization assembly code
1. Open ecoscvs/ecos/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.
Change the length of FLASH to be copied to 1Mbytes
FROM ldr r2,=0x02010000
TO ldr r2,=0x02100000
2. Save and exit the file
3) Change the heap size
1. Open file
~/ecos/ecoscvs/ecos/packages/hal/arm/at91/eb40a/current/include/pkgconf/mlt_arm_at91_eb40a_romram.h
2. Edit the following section:
//original
#define CYGMEM_SECTION_heap1_SIZE (0x00040000 - (size_t)
CYG_LABEL_NAME (__heap1))
//modified version
#define CYGMEM_SECTION_heap1_SIZE (0x02100000 - (size_t)
CYG_LABEL_NAME (__heap1))
4) Rebuild eCOS library to reflect changes you just made. Then link
your application code with that library
1. Go to shell prompt and delete all the install, build and mlt
subdirectories recursively. This shall make sure that a new clean
library is built.
2. Click Build ï Generate Build Tree
3. Click Build ï Clean
4. Click Build ï Library
5. Exit configtool
6. Now build your application code with ROMRAM startup.
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss