This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: How to make certain functions run from RAM while otherfunctions still run from ROM
- From: Jesper Skov <jskov at redhat dot com>
- To: Shaojie Wu <swu at zmicro dot com>
- Cc: eCos Discuss <ecos-discuss at sources dot redhat dot com>
- Date: 22 Mar 2002 08:07:48 +0100
- Subject: Re: [ECOS] How to make certain functions run from RAM while otherfunctions still run from ROM
- References: <CPEMIFLBDJPGALOIBNKOIEEKCBAA.swu@zmicro.com>
On Tue, 2002-03-19 at 19:18, Shaojie Wu wrote:
> Hi,
>
> I have used eCos and GNU, and successfully built both ROM and ROMRAM
> firmware
> for a custom board with ARM7 chip. I also implemented the function to
> update
> the firmware using Xmodem in the ROMRAM version. Since the RAM on the board
> is only 128KB and the firmware is getting bigger and bigger, finally I
> will choose ROM version firmware, but there is a problem: During the
> firmware download process, the program will freeze, because the
> function( saved in ROM) to update the firmware will be erased. So it
> seems the only solution is to copy that function to RAM and run
> from there during the firmware update process.
>
> My question is: How to write/modify the linker file or code to make
> certain functions run from RAM while other functions still run from ROM.
> Thanks a lot.
Look at the flash driver code. Some of these place the functions in a
special .2ram section which is copied to RAM on startup.
Jesper
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss