[ECOS] How to make certain functions run from RAM while other functions still run from ROM

Jesper Skov jskov@redhat.com
Fri Mar 22 02:50:00 GMT 2002


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



More information about the Ecos-discuss mailing list