This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TMS320F28069: copy Flash to RAM for standalone booting

Part Number: TMS320F28069
Other Parts Discussed in Thread: CONTROLSUITE, , MOTORWARE

Tool/software: Code Composer Studio

Hi

I'm working with with TMS320F28069M. after i developed my application, now i want to program it into Flash instead of RAM(directly program). i found these lines in "Controlsuite" examples:(Example_2806xFlash project)

extern Uint16 RamfuncsLoadStart;
extern Uint16 RamfuncsLoadEnd;
extern Uint16 RamfuncsRunStart;
extern Uint16 RamfuncsLoadSize;

...

memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (Uint32)&RamfuncsLoadSize);

InitFlash();

but these line does not cause MCU to standalone boot from Flash.

after i searched into Motorware projects, i found "proj_labc" project that worked correctly with standalone Flash, after i analyzed the main file, i found the difference is memory copy function, in this project, the original memcpy is not used, instead, a simple function wrote :

void memCopy(uint16_t *srcStartAddr,uint16_t *srcEndAddr,uint16_t *dstAddr)
{

while(srcStartAddr <= srcEndAddr)
{
*dstAddr++ = *srcStartAddr++;
}

return;
}

what wrong with "memcpy" function?!

i don't have any idea why "memCopy" function worked but original "memcpy" not worked!

please help me

Sincerely Rodger