[ECOS] EB40A: Running one Function from RAM,rest in FLASH

Michael Anburaj embeddedeng@hotmail.com
Wed Dec 10 16:24:00 GMT 2003


Hi Vinay,

You have two options here.

1. You build & link the RAM resident code for the RAM address space & locate 
it in Flash (can be done using the linker script). And at run time you 
should move this code from Flash to RAM. ItÂ’s very simple in GCC & the same 
is possible under ADS/SDT tool-chains too, using the scatter map (which is a 
linker script).

2. Build the RAM resident modules as position independent code (PIC) – 
possible with GCC & ADS/SDT tool-chains. Malloc space in RAM region & copy 
the code from flash to RAM & use function pointers to access these function.

Email me if you need more clarity on this.

Cheers,
-Mike.

>From: "Vinay.S" <vinay@hunolabs.com>
>Reply-To: <vinay@hunolabs.com>
>To: "Ecos-Discuss" <ecos-discuss@sources.redhat.com>
>Subject: [ECOS] EB40A: Running one Function from RAM,rest in FLASH
>Date: Wed, 10 Dec 2003 00:57:29 +0530
>
>hi!
>	Can somebody help me out?
>	I have a variant of ATMEL EB40A board,running ECOS.I have a code in which
>some functions need to run from RAM( due to timing constraints)and rest of
>code runs from flash.
>
>regards,
>Vinay
>
>
>
>--
>Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
>and search the list archive: http://sources.redhat.com/ml/ecos-discuss
>

_________________________________________________________________
Tired of slow downloads and busy signals?  Get a high-speed Internet 
connection! Comparison-shop your local high-speed providers here. 
https://broadband.msn.com


-- 
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