EmbeddedRelated.com
Forums
Memfault Beyond the Launch

how to copy from FLASH to RAM

Started by hema...@gmail.com August 18, 2007
Hi everyone,
Can anybody help me how to copy code from FLASH to RAM.Because I think we cann't execute directly our code from FLASH with INTERRUPTS.So I need to copy my code from FLASH to RAM.If anybody has done already this,can you give me the example codes,so that I can better understand.Is there any other method to execute code from FLASH without copying to RAM with interrupts.
>>> I think we cann't execute directly our code from FLASH with INTERRUPTS

I don't know why you say this. Explain please, I see no reasons about
that.
To copy Flash to RAm, see this :

// Copy time critical code and Flash setup code to RAM
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, &RamfuncsLoadEnd -
&RamfuncsLoadStart);
// Call Flash Initialization to setup flash waitstates
// This function must reside in RAM
InitFlash();

RamfuncsRunStart, RamfuncsLoadStart, and RamfuncsLoadEnd variables are
defined from the cmd file as this :

internfuncs :
{
main.obj(.text) // Replace with
all object that needed run in RAM
}
LOAD = FLASH_CODE, PAGE = 0 // Load in Flash
RUN = H0RAM_P, PAGE = 0 // Run in
Internal RAM
LOAD_START(_RamfuncsLoadStart),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart)
I hope it will help? There is SPRU*** Ti documentations about this, don't
remember the numbers.

Veuillez rondre h...@gmail.com
Envoypar : c...
Pour : c...
cc :

Objet : [c28x] how to copy from FLASH to RAM

Hi everyone,
Can anybody help me how to copy code from FLASH to RAM.Because
I think we cann't execute directly our code from FLASH with INTERRUPTS.So
I need to copy my code from FLASH to RAM.If anybody has done already
this,can you give me the example codes,so that I can better understand.Is
there any other method to execute code from FLASH without copying to RAM
with interrupts.





Memfault Beyond the Launch